INTERACT FORUM
More => Old Versions => Media Center 14 (Development Ended) => Topic started by: Diverdown1964 on August 02, 2009, 08:09:16 pm
-
It's been a long time since I've posted here, but 14 has prompted it.
I've been using Media Center for a long time...I think since version 8 (Jukebox). I always describe it to people as the best value out there. I don't know how you continue to provide the host of features that you do at the price point that you do. I now manage all of my media from music to photos to movies with it, and it continues to impress.
One thing that I always found lacking was extensibility. THe COM based SDK seemed focused solely on playing features, and I wanted to be be able to expose the collection to other environments. The web services features hold that promise. From the online documentation, I should be able to use the query method to do what I need. However, I have as yet been unable to use Visual Studio to create the appropriate proxy class. What address do I use to access the WSDL?
Thanks, and again, congratulations on an all around excellent product.
-
Thanks. With the Web Services Interface, you just start the server, then use a browser to get the docs.
http://wiki.jrmediacenter.com/index.php/Web_Service_Interface
-
Thanks Jim
I actually had gotten that far, but the docs appear to simply list out the available web service methods. I'm having trouble finding the address of the WSDL.
Cheers
-
Did you try what I suggested above, with your browser? The IP address is the one where you're running Library Server.
The response is the WSDL. You can read about this method here:
http://www.w3.org/TR/wsdl
It gives you the list of commands you can use.
-
I did. That URL returns an HTML doc, where I was expecting XML. I hacked around a little and saw what I thought I was after at http://<machine>/MCWS/v1/wsdl. Unfortunately, VIsual Studio doesn't seem to recognize it as valid when adding a web reference to a project.
Cheers
-
Each command in the WISDL you should see (portion below) is documented, with examples. Try the "Click Here".
To use in another program, I believe you only need to be able to send an HTML command on the correct port.
List of functions
Playback
Pause
Set the pause state.
Parameters:
State: The new pause state (0: unpaused, 1: paused, -1: toggle) (default: -1)
Zone: The zone the command is targetted for. (default: -1)
ZoneType: The type of value provided in 'Zone' (id: zone id; index: zone index; name: zone name (default: id)
Response:
Examples:
Click here
Next
Advance to the next track.
Parameters:
Zone: The zone the command is targetted for. (default: -1)
ZoneType: The type of value provided in 'Zone' (id: zone id; index: zone index; name: zone name (default: id)
Response:
Examples:
Click here
Previous
Advance to the previous track.
Parameters:
Zone: The zone the command is targetted for. (default: -1)
ZoneType: The type of value provided in 'Zone' (id: zone id; index: zone index; name: zone name (default: id)
Response:
Examples:
Click here
....
-
... I hacked around a little and saw what I thought I was after at http://<machine>/MCWS/v1/wsdl. Unfortunately, VIsual Studio doesn't seem to recognize it as valid when adding a web reference to a project.
Should be in this form:
http://localhost/MCWS/v1/doc
or
http://<ip address or machine name>/MCWS/v1/doc
-
We are using a REST interface, which is a little more straight-forward than a full SOAP interface. It makes returning binary objects (like a piece of cover art) easier.
Because of this, we have to use WSDL 2.0 since WSDL 1.0 doesn't support REST.
The bad news is that Microsoft .NET doesn't support WSDL 2.0.
Hopefully it won't be too hard to make your own REST wrapper or find someone else's for the .NET environment.
-
Thanks guys. Got it. I was missing the REST piece - haven't worked with it before. I'll dig a little over the next little while and see what I come up with. Whatever it is, I'll share with the community. In the short term, here's a link thaqt talks about using REST services with the MS Development tools.
http://msdn.microsoft.com/en-ca/netframework/dd547388.aspx
Turns out that there's a VS add in that helps support it.
I'll be primarily interested in database info with what I'm doing, not so much remote control. I'll pass on any requests once I start getting my feet wet.
Thanks again for this!
-
One more quick question. What is the syntax of the query method? Let's say I'd like to find all tracks in my library by the band Boston. I would think that I would use the URL:
http://<servername>/MCWS/v1/Files/Search&Query=Boston
but doing that results in:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<rsp stat="fail">Function 'Files/Search&Query=Boston' not found.</rsp>
What am I missing?
Thanks
-
One more quick question. What is the syntax of the query method? Let's say I'd like to find all tracks in my library by the band Boston. I would think that I would use the URL:
http://<servername>/MCWS/v1/Files/Search&Query=Boston
but doing that results in:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<rsp stat="fail">Function 'Files/Search&Query=Boston' not found.</rsp>
What am I missing?
Thanks
Try this:
http://localhost/MCWS/v1/Files/Search?Query=Boston&Output=mpl
Also, remember that we're still building this interface out, so just request functions as you need them.
Thanks.
-
Perfect - that works!
Now - is there any way that I can search on a specific library field? If so, I'd like to be able to differentiate "Boston" from "Boston Pops", etc....
Thanks
-
Do you guys have any plans to extend this to support ViewItems and other items from the automation interface? I wrote a .NET plugin "server" a while ago that supports what I need from the automation interface but I would prefer to use your built-in Web Service which has the potential to be faster among other benefits. I would be glad to list all the functions that I added to my "server" if you are interested. Thanks.
-
I would be glad to list all the functions that I added to my "server" if you are interested. Thanks.
Yes, please.
This is a background priority project, but we hope to continue improving the web service interface.
Feature requests are very welcome.
-
Here is a list of functions that I need:
1) GetViewItem
input: ViewItem name/path
returns: name/path, random thumbnail (thumbnail file name) for one of the files, number of child ViewItems, number of files, files duration
2) GetChildViewItems
input: ViewItem name/path
returns: list of child ViewItems with data as above
3) GetViewItemFiles
input: ViewItem name/path, sort string (as in Sort2()) or "shuffle"
returns: list of files sorted appropriately
4) GetFileThumbnail
input: file name or id, thumbnail size
returns: thumbnail file name with path
5) FillFileTemplate
input: file name or id, template string
returns: filled template string
6) GetFileTag
input: file name or id, field name
returns: tag value
-
Yes, please
This is a background priority project, but we hope to continue improving the web service interface.
Feature requests are very welcome.
Perhaps I'm looking at the documentation wrong, but I can't seem to retrieve anything useful about the now playing list, apart from a string of numbers, which I assume corresponds to a database ID for each song in the list? Is there any way we can retrieve info for each song? I currently just want the name and artist of the currently playing song..
Cheers
Kane
-
I'll second cncb's request as well for the interface!
-
Perhaps I'm looking at the documentation wrong, but I can't seem to retrieve anything useful about the now playing list, apart from a string of numbers, which I assume corresponds to a database ID for each song in the list? Is there any way we can retrieve info for each song? I currently just want the name and artist of the currently playing song..
Cheers
Kane
Just a polite bump - can you advise when you expect any extra functionality to be added to the web service? It doesn't seem as though you can do something as simple as retrieving the name of the currently playing song in a particular zone.
From what I can see, I can get the "FileKey", but this is essentially just the unique ID for that file.. There doesn't seem to be a GetFileByFileKey method to retrieve info about that file??
Or am I looking at things incorrectly?
Thanks,
Kane
-
Hi, just wondering. Are there a way to get the current playlists and playlist tree from Media Center? I know I can get them via Remote Server but that doesn't bring up the playlists tree just all my current playlists in one row.
Thanks.