Hi Everybody
I would like to build a client for a set top box. To achieve this, i need to retrieve data from the plex server, and export the result as an xml file with all associated resources. This should work fine for me.
So I need to retrieve for each item all the information (just like the great Plex Export does) but i need mainly the actual media path on the system (C:\Video\Movietitle\movie.avi) (Plex export does not export the actual media path).
Do you know how i can retrieve this info ? I cannot find anything about this on the forum ? Do you have any API documentation ?
Thanks for the help !
Plex media server just generates XML output, which contains all this info. You retrieve the information per library section. So point your browser at:
http://plexmediaserver:32400/library/sections
Now pull out the numerical ‘key’ field for the section you want (let’s assume it’s 1). Now go to:
http://plexmediaserverip:32400/library/sections/1/all
The resultant page will give you all the details about the library:
< video >. - the video tag gives info about the actual file (plots, mpaa , etc)
< media > - media tag gives info about the video’s media (duration, type, resolution)
< part > - gives in for about the actual files. It has two main attributes:
[list]
[] key - this is the path to use in conjunction with the PMS web server to get the file via http
[] file - this is the ptch to the media as seen by the plex media server
[/list]
It’s pretty easy to parse and understand once you’ve seen it.
Thank you !
I’ve tried in my browser but there is no result, just blank page. I’ve two sections : I’ve tried http://localhost:32400/library/sections/1/all and http://localhost:32400/library/sections/2/all, nothing is displayed in the browser, just blank with no error. Any idea ?
Thanks for the help
Some browsers won’t render the XML, such as safari on iPhone/iPad. I’ve used IE8 and Chrome before and both display the results.
If you still have no luck, check the plex media server.log file, you should have an entry which matches your http request. If you haven’t then there is some communications problem.
Thanks, this works fine ! For the Movies, this works fine, i can find the actual file path, but for the TV Shows, it is different, :
For example, i have this :
Where can i find actual file path for TV shows ?
Thanks !
Yes, tv is slightly different as it has to cope with seasons. You just need to drill down a bit further.
The ‘key’ attribute helps you to do this. For tv shows, simply follow the path shown in this value:
http://plexmediaseeverip:32400/library/metadata/7044/children
This will give you a view of seasons. You then need to drill down into the particular season, or choose to view all episodes.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.