ok, so we can pull info out of PMS using http on port 32400, however is it possible to update the contents (well, a limited set) over http too?
I'm guessing that something must be available, as remote PMS instances can update this info. All I want to do is be able to update the watched and resume fields, so that non-Plex clients can have this functionality..
You can changed the watched/unwatched status via following URL:
Set Watched: http://:32400/:/scrobble?key=&identifier=com.plexapp.plugins.library
Set UnWatched: http://:32400/:/unscrobble?key=&identifier=com.plexapp.plugins.library
where the = the number from the key attribute return from PMS.
eg if key for a movie was /library/metadata/554 then =554
then use
Watched: http://:32400/:/scrobble?key=554&identifier=com.plexapp.plugins.library
UnWatched: http://:32400/:/unscrobble?key=554&identifier=com.plexapp.plugins.library
ha ha - i’d just spend the last 30 mins sniffing the network. Glad to see I was checking out the right stuff - Thanks
I’ve also seen that resume information is passed as a /:/progress? type URL (as a byte offset or -1 for beginning) and I think I understand how the viewoffset in the XML is used to request a different starting time.
However I’m comfused by how the resume time is calculated. I assume it’s a byte offset, as you need to use this in the http request, however i’m not sure how the offset is arrived at?
Think the “/:/progress?key=2288&identifier=com.plexapp.plugins.library&time=77357” is issued via the PLEX Client back to PMS so that it can update the viewOffset attribute of the Video tag. The viewOffset gets set to the time value passed in URL. Time value looks like it’s milliseconds.
ah-ha - good thinking and right by the looks of it.
The XML contains two duration fields, one in the video tag and one in the media tag. As you can probably guess, the video one is sources remotely and the media one is gathered from the local file. I don;t suppose they match too often..
Anyway, I can see now that when I convert the durations, they conform to what I'm seeing in the metadata and what the player returns. I stopped teh video on 10mins and I can see that roughly that amount of time had elapsed.
I should now be able to use all of this to code up my plugin.. Ta..
Hmm - not sure what going on here. Coded up, but for some reason progress? is not updating the fields in PMS. I’ve even tried issueing manually and checking teh PMS logs, but there is no error info.
Anyone know what’s up?#
EDIT: D’Oh - my fault. It’s plugins not plugin. Shame PMS didn;t flag the error up sooner