Remove deprecated non-guid based methods
MODIFY
plextraktsync/media.py
plextraktsync/media.py
@@ -133,16 +133,6 @@ def resolve_any(self, pm: PlexLibraryItem, tm=None):
return None
- @deprecated("use resolve_any")
- def resolve(self, pm: PlexLibraryItem, tm=None):
- try:
- guid = pm.guid
- except (PlexApiException, RequestException) as e:
- logger.error(f"Skipping {pm}: {e}")
- return None
-
- return self.resolve_guid(guid, tm)
-
def resolve_guid(self, guid: PlexGuid, tm=None):
if guid.provider in ["local", "none", "agents.none"]:
logger.warning(f"{guid.pm.item}: Skipping guid {guid} because provider {guid.provider} has no external Id")

MODIFY
plextraktsync/plex_api.py
plextraktsync/plex_api.py
from plexapi.server import PlexServer, SystemAccount, SystemDevice
from trakt.utils import timestamp
-from plextraktsync.decorators.deprecated import deprecated
from plextraktsync.decorators.memoize import memoize
from plextraktsync.decorators.nocache import nocache
from plextraktsync.decorators.rate_limit import rate_limit
@@ -128,12 +127,6 @@ def __init__(self, item):
def is_legacy_agent(self):
return not self.item.guid.startswith('plex://')
- @property
- @memoize
- @deprecated("Use .guids directly")
- def guid(self):
- return self.guids[0]
-
@nocache
@rate_limit()
def get_guids(self):

MODIFY
plextraktsync/trakt_api.py
plextraktsync/trakt_api.py
from trakt.tv import TVEpisode, TVSeason, TVShow
from plextraktsync import pytrakt_extensions
-from plextraktsync.decorators.deprecated import deprecated
from plextraktsync.decorators.memoize import memoize
from plextraktsync.decorators.nocache import nocache
from plextraktsync.decorators.rate_limit import rate_limit
@@ -218,11 +217,6 @@ def find_by_guid(self, guid: PlexGuid):
return self.search_by_id(guid.id, id_type=guid.provider, media_type=guid.type)
- @memoize
- @deprecated("Use find_by_guid")
- def find_by_media(self, pm: PlexLibraryItem):
- return self.find_by_guid(pm.guid)
-
@rate_limit()
def search_by_id(self, media_id: str, id_type: str, media_type: str):
if id_type == "tvdb" and media_type == "movie":
@@ -259,10 +253,6 @@ def find_episode_guid(self, tm: TVShow, guid: PlexGuid, lookup=None):
return self.find_by_guid(guid)
return None
- @deprecated("Use find_episode_guid")
- def find_episode(self, tm: TVShow, pe: PlexLibraryItem, lookup=None):
- return self.find_episode_guid(tm, pe.guid, lookup)
-
def flush(self):
"""
Submit all pending data

Remove deprecated non-guid based methods