python-plexapi
python-plexapi copied to clipboard
Get media object for Plex Discover
What is your feature request?
Currently, it's not possible to get Movie object by plex discover guid, i.e plex://movie/5d7768ba96b655001fdc0408 that resolves to Plex Discover item:
- https://app.plex.tv/desktop/#!/provider/tv.plex.provider.discover/details?key=/library/metadata/5d7768ba96b655001fdc0408
Plex Web makes such request by guid:
- https://discover.provider.plex.tv/library/metadata/5d7768ba96b655001fdc0408?includeConcerts=1&includeExtras=1&includeOnDeck=1&includePopularLeaves=1&includePreferences=1&includeReviews=1&includeChapters=1&includeStations=1&includeExternalMedia=1&asyncAugmentMetadata=1&asyncCheckFiles=1&asyncRefreshAnalysis=1&asyncRefreshLocalMediaAgent=1&X-Plex-Product=Plex%20Web&X-Plex-Version=redacted&X-Plex-Client-Identifier=redacted&X-Plex-Platform=redacted&X-Plex-Platform-Version=redacted&X-Plex-Features=external-media%2Cindirect-media%2Chub-style-list&X-Plex-Model=hosted&X-Plex-Device=redacted&X-Plex-Device-Screen-Resolution=redacted&X-Plex-Token=redacted&X-Plex-Provider-Version=redacted&X-Plex-Text-Format=plain&X-Plex-Drm=redacted&X-Plex-Language=en
Are there any workarounds?
plex = PlexServer(baseurl=url, token=token)
account = plex.myPlexAccount()
movie = account.fetchItem(f'https://discover.provider.plex.tv/library/metadata/5d7768ba96b655001fdc0408')
# or
movie = account.fetchItem(f'https://metadata.provider.plex.tv/library/metadata/5d7768ba96b655001fdc0408')
movie = account._toOnlineMetadata(movie)[0]
print(movie)
print(movie.userRating)
Code Snippets
No response
Additional Context
No response