Include trakt match in output
MODIFY
plex_trakt_sync/commands/inspect.py
plex_trakt_sync/commands/inspect.py
from plexapi.server import PlexServer
from plex_trakt_sync.config import CONFIG
from plex_trakt_sync.plex_api import PlexApi
+from plex_trakt_sync.trakt_api import TraktApi
@click.command()
@@ -15,6 +16,7 @@ def inspect(input):
token = CONFIG["PLEX_TOKEN"]
server = PlexServer(url, token)
plex = PlexApi(server)
+ trakt = TraktApi()
if input.isnumeric():
input = int(input)
@@ -30,3 +32,11 @@ def inspect(input):
video = media.media[0].parts[0].videoStreams()[0]
print(f"Video: '{video.codec}'")
+
+ try:
+ print(f"Provider: {m.provider}")
+ print(f"Id: {m.id}")
+ tm = trakt.find_movie(m)
+ print(f"Trakt match: {tm}")
+ except Exception as e:
+ print(f"Error: {e}")

Include trakt match in output