James / friends,
I've made some headway w/ this, still trying to do my part
I know James you're not a big Plex fan at the moment. The documentation is deplorable and I don't know about the API. With regards to the feedback of it, I'd ask did the old HTTP API for xbmc provide feedback either?
Regardless, heres an alternative approach to access the metadata from the Plex Media Server, much easier than directly querying the dbase.
I think I could manage to eventually get this but I'm hoping James could spin it up much faster.
Turns out PMS exposes XML natively already.
http://ip:32400/manage is the old native gui/player/WI to PMS.
http://ip:32400/shows some existing fields, some others such as /status/sessions arent transparently available w/o knowing they were already there.
In order to Generate XML
I believe one could pull
http://ip:32400/library/sections (this shows the different libaries Plex has vs the singular video / music libraries of XBMC)
This also shows the library type 'movie' vs 'show'
I'm sure if a plugin were developed we could hard code set that in config too if need be.
The ID of the sections needs to be capture
ex: section 2 = movies, section 3=tv
http://ip:32400/library/sections/2shows some defined views and presorts. I believe this is essentially what is shown when accessing via UPNP / DLNA
by going to
http://ip:32400/library/sections/2/allyou have essentially "generated xml" for the library that is section 2
We'd need to pare this down from the xmls that i see formated in VC, bu t
But I was able to direct play a movie and basics like stop/pause...etc
The part of that, that is important is the latter 1/2 of the command must be url encoded, the and key is found in this xml much easier than in the base.
https://forums.plex.tv/index.php/topic/15850-plex-9-remote-api/#entry101671https://forums.plex.tv/index.php/topic/15850-plex-9-remote-api/page-2#entry111620So for our needs we'd use the path found previously (/library/sections/2/all)
And we'd find the key in that xml for any specific 'title' which could be used for phrases
http://
PMS_IP:32400/system/players/
CLIENT_PLEX_IP/application/playMedia?path=http%3A%2F%2F
PMS_IPl%3A32400%2F
& suffix the following url encoded hereex
library%2Fsections%2F3%2Fall&key=%2Flibrary%2Fmetadata%2F3435