From 56387bd8e65236166a1b28f10ec63e8134e7ec5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 24 Dec 2023 01:01:02 +0200 Subject: [PATCH 1/2] Add PlexGuid.is_special property --- plextraktsync/plex/PlexGuid.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plextraktsync/plex/PlexGuid.py b/plextraktsync/plex/PlexGuid.py index 598fa43aa30..0c14f52fd3e 100644 --- a/plextraktsync/plex/PlexGuid.py +++ b/plextraktsync/plex/PlexGuid.py @@ -77,6 +77,13 @@ def unsupported(self): """Known providers that can't be synced""" return self.provider in ["youtube", "xmltv"] + @property + def is_special(self): + if self.media_type != "episodes": + raise ValueError("is_special is not valid for non-episodes") + + return self.pm.season_number == 0 + @cached_property def show_id(self): if not self.is_episode: From 455cadeb59f1dab298cb1822b7333c59fe6ff6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 24 Dec 2023 01:01:19 +0200 Subject: [PATCH 2/2] Skip episodes from Specials --- plextraktsync/media/MediaFactory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plextraktsync/media/MediaFactory.py b/plextraktsync/media/MediaFactory.py index 7c1851488d2..5a70a2e0d30 100644 --- a/plextraktsync/media/MediaFactory.py +++ b/plextraktsync/media/MediaFactory.py @@ -62,6 +62,10 @@ def resolve_guid(self, guid: PlexGuid, show: Media = None): try: if show: + if guid.is_special: + self.logger.warning(f"Skipping Special: {guid.title_link}", extra={"markup": True}) + return None + tm = self.trakt.find_episode_guid(guid, show.seasons) else: tm = self.trakt.find_by_guid(guid)