From e2f896dd6a78ce45f528d16bd1bd1307594f6517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 27 Apr 2021 21:23:37 +0300 Subject: [PATCH] Skip print media details for type show --- plex_trakt_sync/commands/inspect.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plex_trakt_sync/commands/inspect.py b/plex_trakt_sync/commands/inspect.py index 22fb9bca87..926f71e553 100644 --- a/plex_trakt_sync/commands/inspect.py +++ b/plex_trakt_sync/commands/inspect.py @@ -32,11 +32,12 @@ def inspect(input): print(f"Guid: '{media.guid}'") print(f"Guids: {media.guids}") - audio = media.media[0].parts[0].audioStreams()[0] - print(f"Audio: '{audio.audioChannelLayout}', '{audio.displayTitle}'") + if media.type in ["episode", "movie"]: + audio = media.media[0].parts[0].audioStreams()[0] + print(f"Audio: '{audio.audioChannelLayout}', '{audio.displayTitle}'") - video = media.media[0].parts[0].videoStreams()[0] - print(f"Video: '{video.codec}'") + video = media.media[0].parts[0].videoStreams()[0] + print(f"Video: '{video.codec}'") print(f"Provider: {m.provider}") print(f"Id: {m.id}")