Hi there,
I’m developing a Plex statistics tool and I’m struggling to fully retrieve all the media data contained within a tv-show Plex library.
As an example:
- I fire an request to retrieve all the media in an library, if its an movie library I get all the movies, with the movie data and if there are any parts, I get those as well.
http://255.255.255.255:5000/library/sections/10/all?X-Plex-Token=asdasdasd_sdfsdfsdffs
- But if its a tvShow library, then it is expected of me (I assume) to then fire a metadata request for every tvShow, then for every season to retrieve all episode data.
http://255.255.255.255:5000/library/metadata/99999/children?X-Plex-Token=asdasdasd_sdfsdfsdffs
Returns the seasons of a tvshow
And then for every season:
http://255.255.255.255:5000/library/metadata/77777/children?X-Plex-Token=asdasdasd_sdfsdfsdffs
Returns the episodes of that season
This is incredibly inefficient as my test servers get easily overloaded, and request start timing out if I even attempt to do parallel requests.
So my question, Is there an API endpoint (or query parameters) which will return the full dataset of a tvShow library with tvshows → seasons → episodes → episodeData → episodeParts (if any)?
Thanks in advance!