Add support to resolve also tv episodes
MODIFY
plex_trakt_sync/media.py
plex_trakt_sync/media.py
@@ -31,7 +31,7 @@ class MediaFactory:
def __init__(self, trakt: TraktApi):
self.trakt = trakt
- def resolve(self, pm: PlexLibraryItem):
+ def resolve(self, pm: PlexLibraryItem, tm=None):
try:
provider = pm.provider
except NotFound as e:
@@ -47,6 +47,9 @@ def resolve(self, pm: PlexLibraryItem):
)
return None
+ if tm:
+ tm = self.trakt.find_episode(tm, pm)
+ else:
tm = self.trakt.find_by_media(pm)
if tm is None:
logger.warning(f"Skipping {pm}: Not found on Trakt")

Add support to resolve also tv episodes