Skip to content

Commit

Permalink
Merge pull request #1854 from glensc/plex-id-vod
Browse files Browse the repository at this point in the history
Update provider/tv.plex.provider.vod to match PlexId.METADATA
  • Loading branch information
glensc authored Mar 11, 2024
2 parents cbac241 + 4f7aedd commit e94b555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plextraktsync/plex/PlexIdFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def from_url(url: str):
https://app.plex.tv/desktop/#!/server/abcdefg/playHistory?filters=metadataItemID%3D6041&filterTitle=&isParentType=false
https://app.plex.tv/desktop/#!/provider/tv.plex.provider.discover/details?key=%2Flibrary%2Fmetadata%2F5d7768532e80df001ebe18e7
https://app.plex.tv/desktop/#!/provider/tv.plex.provider.discover/details?key=/library/metadata/5d776a8e51dd69001fe24eb8'
https://app.plex.tv/desktop/#!/provider/tv.plex.provider.vod/details?key=%2Flibrary%2Fmetadata%2F5d776b1cad5437001f7936f4
"""

result = urlparse(url)
Expand All @@ -50,6 +51,8 @@ def from_url(url: str):
id = key[len("/library/metadata/"):]
if fragment.path == "!/provider/tv.plex.provider.discover/details":
return PlexId(id, provider=PlexId.METADATA)
if fragment.path == "!/provider/tv.plex.provider.vod/details":
return PlexId(id, provider=PlexId.METADATA)
return PlexId(int(id), server=server)

if "filters" in parsed:
Expand Down
2 changes: 1 addition & 1 deletion plextraktsync/sync/Sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
# Remove known match from trakt watchlist, so that the search would not be attempted.
# Example, trakt id 187634 where title mismatches:
# - "The Vortex": https://trakt.tv/movies/the-vortex-2012
# - "Big Bad Bugs": https://app.plex.tv/desktop/#!/provider/tv.plex.provider.vod/details?key=%2Flibrary%2Fmetadata%2F60185c5891c237002b37653d
# - "Big Bad Bugs": https://app.plex.tv/desktop/#!/provider/tv.plex.provider.vod/details?key=%2Flibrary%2Fmetadata%2F5d776b1cad5437001f7936f4
del self.trakt_wl[m]
elif m in self.trakt_wl:
if self.config.update_plex_wl:
Expand Down

0 comments on commit e94b555

Please sign in to comment.