INTERACT FORUM
Networks and Remotes => Media Network => Topic started by: TMA-1 on November 16, 2010, 03:58:40 am
-
Hi,
Im looking in to the possibilities to make an Air-app for Android that will replace the WebRemote.
I have found how to make XML-requests to a library to get Artists, the artists albums, and the tracks of the album.
The thing is that I only succeed in getting the names, but I need more fields, like keys and LibraryLocation and such things to be able to make playbuttons and stuff like that.
How do I do that?
This is a request for the tracks of the album "Aladdin Sane":
http://localhost:52199/MCWS/v1/Library/Values?Field=Name&Files=[Album]=Aladdin Sane
I would need to do something like this:
http://localhost:52199/MCWS/v1/Library/Values?Field=Name,Key&Files=[Album]=Aladdin Sane
How can I get the keys together with the names?
-
Given a value, you can search to get files:
MCWS/v1/Files/Search?Query=[Album]=[Aladdin Sane] [Name]=[thing returned from values list]&Output=mpl
The resulting MPL will give all files and all information about the matching files.
Does that work?
We're also considering adding a set of browse functions to expose a WebRemote / WebPlay style hierarchy.
-
Given a value, you can search to get files:
MCWS/v1/Files/Search?Query=[Album]=[Aladdin Sane] [Name]=[thing returned from values list]&Output=mpl
The resulting MPL will give all files and all information about the matching files.
Does that work?
I think that might work. I have not started coding anything yet, Im just in the process of gathering information to evaluate if it would be possible at all.
We're also considering adding a set of browse functions to expose a WebRemote / WebPlay style hierarchy.
That sounds great!
-
Ok, I have started testing and I have run in to some trubble. When I through a flash-file make a xml-request I get a io-error. When I put the flash-file inside one of the WebRemote HTML-pages it works. I guess it has somehting to do with access-keys or something. Offcorse I can not get flash-support here but perhaps you know a trick to include an access key or login information in the xml-request-string somehow?
-
Ok, I have started testing and I have run in to some trubble. When I through a flash-file make a xml-request I get a io-error. When I put the flash-file inside one of the WebRemote HTML-pages it works. I guess it has somehting to do with access-keys or something. Offcorse I can not get flash-support here but perhaps you know a trick to include an access key or login information in the xml-request-string somehow?
If you have authentication enabled on the server, you need to include the token on your call or you might get failures.
For development, I would just turn off authentication on the server and worry about it later.
Also, I recommend using Fiddler (fiddlertool.com) to watch requests made on the client. It will let you easily compare working and non working requests and see the server's responses.
-
It worked when I turned authentication off. Thanks!
I'll bother with that later as you suggested :)
-
Hi again,
Slow progress here, but still progress =).
Im looking for a way to get the album art.
I can get it when I request info on the current playback (MCWS/v1/Playback/Info?Zone=-1). It is then stored in the item ImageURL (like this "MCWS/v1/File/GetImage?File=195"). This is great because I then have an url to load the image from. Is there a way to get this for each artist/album/track and not only for the current playback item?
I hope I make sense? =)
-
Use File/GetImage to get cover art.
And you might want to look at the new Browse functions which provides a user-customizable tree and artwork for each level.
-
I didn't know the new browse functions already were avaliable and I just had a look at them.
They're great! This will make it much simpler! Just what I was looking for. Ha ha! Thanks a lot! ;D
-
Ok, another question :)
I can now browse back and forth between most levels (audio/artists/albums) using "brows children" but as soon as I reach an album-level I have to use "get files" to get a list of the tracks?
How can I ditermin if the item im accessing can use "brows children" or it is an album and has to use "get files"?
-
I can now browse back and forth between most levels (audio/artists/albums) using "brows children" but as soon as I reach an album-level I have to use "get files" to get a list of the tracks?
How can I ditermin if the item im accessing can use "brows children" or it is an album and has to use "get files"?
The way Gizmo works is that it does a Browse/Children. If that returns no items, it switches to files.
Your code will have to have separate handling for browse items and files. The IDs and available functions are different between the two.
-
The way Gizmo works is that it does a Browse/Children. If that returns no items, it switches to files.
Your code will have to have separate handling for browse items and files. The IDs and available functions are different between the two.
Roger that. Thanks for your help.