what i’m seeing right now is that plex for iOS and plex media player do not send hello and bye messages, instead pms sends a add and delete message on port 32415 which is not the documented way.
@justme1968 There was briefly an implementation of this in a PlexPy PR here, but it was pulled in favor of pulling the active servers from the web API (here) (which itself looks like it is now in a different form).
I don’t know of anywhere it’s currently documented unfortunately.
i now have a version of my code that can handle server and player auto discovery without any polling for pms, pht, pmp, iOS and android devices by combining gdm, server broadcast messages and the /clients and /resources endpoins.
i now have nearly all documented commands implemented and can control the various plex clients.
one of the missing things is playback of a complete album. if i use playMedia with the album key i get an 500: Could not find that item error message. using the same key to get the meta data or with the mirror command works. playing single titles and movies works.
the iOS app used as a remote seems to use a playQueue but i can find no documentation about this and wireshark does not help as there is no message related to playQueues other than the reference in the playMedia command.
what i’m seeing right now is that plex for iOS and plex media player do not send hello and bye messages, instead pms sends a add and delete message on port 32415 which is not the documented way.
are there any more docs ?
GDM is actually a slightly modified version of SSDP. Raw packet is as follows
M-SEARCH * HTTP/1.1 Host: 239.0.0.250:1900
Sent via UDP broadcast to 239.0.0.250 on port 32414
thanks. in the mean time i have my module running in a first version. it can handle (nearly) all plex clients and control them, create playlists and playques, browse the pms database, there is a proxy player that can be used to stream media from pms to other media players that are integrated in fhem (sonos for example).
the main problem was that some (older?) embedded players and some combination of player and module os will not reliably work with udp multicast but just with udp broadcast and there some will only work with the real netmask and not with 255.255.255.255.
now i’m using alternating broadcasts and multicasts for both client and server discovery and it works very reliably for all clients that i came across till now (android,iOS, pht, pmp, fire tv, …). still working on the dreambox client. as it does not advertise timeline capability but seems to support it anyway,
Can someone tell me how I can get the list of episodes of a given tv show with the ability to apply filters?
I know that http://[IP]:[PORT]/library/metadata/[SEASON KEY]/children allows to have the entire list but filters do not seem to be considered here. I assume because filters need to be used with api starting with http://[IP]:[PORT]/library/sections.
However, when I request http://[IP]:[PORT]/library/sections/[SECTION ID]/all, I get the list of all the tv shows in that section. But I can’t find how to get the list of seasons of a given tv show nor how to get the list of episodes of a given season.
Actually, I need that to filter episodes of a given tv show according to this criteria:
Unwatched episodes
Episodes with a given language subtitle (that seems to have been added to PMS on january 2014.
Create a collection based on these criteria and sync this collection (that will allow to have synced episodes only when subtitles are available).
Thanks you very much for the help you’ll provide me.
@radar You might want to check out how one of the current projects such as PlexPy grabs the metadata for a show. If you find they are doing something not documented there help out a future person like yourself by documenting it in the Wiki ;).
Can someone tell me how I can get the list of episodes of a given tv show with the ability to apply filters?
I know that http://[IP]:[PORT]/library/metadata/[SEASON KEY]/children allows to have the entire list but filters do not seem to be considered here. I assume because filters need to be used with api starting with http://[IP]:[PORT]/library/sections.
However, when I request http://[IP]:[PORT]/library/sections/[SECTION ID]/all, I get the list of all the tv shows in that section. But I can’t find how to get the list of seasons of a given tv show nor how to get the list of episodes of a given season.
Actually, I need that to filter episodes of a given tv show according to this criteria:
Unwatched episodes
Episodes with a given language subtitle (that seems to have been added to PMS on january 2014.
Create a collection based on these criteria and sync this collection (that will allow to have synced episodes only when subtitles are available).
Thanks you very much for the help you’ll provide me.
Try this http://[IP]:[PORT]/library/sections/[SECTION ID]/all?type=4&unwatched=1. That will list all unwatched episodes in the library, but I don’t know how to do it for just one show without an external script.
I also don’t know how to filter by subtitle language.
I have a powershell script that used to get the IMDB ID from GUID in the json response i got from:
“$url`:$port/library/sections/5/all?X-Plex-Token=$Token”
The problem is that GUID seems to be missing in my response now. I havent changed anything. Anybody knows whats wrong?
I have a powershell script that used to get the IMDB ID from GUID in the json response i got from:
“$url`:$port/library/sections/5/all?X-Plex-Token=$Token”
The problem is that GUID seems to be missing in my response now. I havent changed anything. Anybody knows whats wrong?
Does anybody know where I can find some information about how to use the api through websocket !? it seems that plexpy is using it but the api is very hard to discover / poorly documented with Plex imo… it’s a shame because it would boost the third party integration !
To give you some context, I have a node server running and I want to be able to listen to Plex event like play/pause/stop to perform some actions (dimming the lights for exemple…) I know some peoples managed to achieved this - @olivier9523 if you see this can you explain a little bit how you did it ?
Anyway, a link or push to the right direction might really help me setting up this feature thanks
I know there is a way to do it via insecure connections i.e. when security is set to required and one can access the data via the local ip address. Also know it is possible to get the cloud synced sections data via app.plex.tv/web/app
I mean to get the data securely i.e. making a secure call to app.plex.tv/web/app over https and get sections data.
I want to build a secure app. Need help understanding if this is possible at the moment of if there is scope for it in the future.
This way I get a list of the details regarding the tv show but I dont find how to have a list of the episodes currently imported for that show … any help ?
This way I get a list of the details regarding the tv show but I dont find how to have a list of the episodes currently imported for that show … any help ?
@justme1968 said:
i now have nearly all documented commands implemented and can control the various plex clients.
one of the missing things is playback of a complete album. if i use playMedia with the album key i get an 500: Could not find that item error message. using the same key to get the meta data or with the mirror command works. playing single titles and movies works.
the iOS app used as a remote seems to use a playQueue but i can find no documentation about this and wireshark does not help as there is no message related to playQueues other than the reference in the playMedia command.
any ideas?
From the XML, you can get all the [ratingKey]'s for a particular album and put them in an object and then iterate through that for playing a full album.
Just listen for the start and stop events from pms to handle the autoplay.
@justme1968 said:
thanks for the idea but actually in the mean time we have found the correct way to use playQueues.
The correct way, as in, Plex released their API and you were able to look it up officially? Or the “correct way” as in, you and everyone else had to hunt and forage until you stumbled on a method that works…
Why won’t Plex just document their programming interface already? It’s obviously going to remain a work in progress, so the idea they’re waiting for version X is stoops.
Boys and girls over at Highcharts did a nice job of indexing their API and making it searchable. Highcharts JS API Reference
Not sure why these geniuses find it so difficult.
unfortunately as in we found out ourselves as it is still not documented and it looks like plex has even stopped updating the little api description that exist for nearly two years.