Cleanup unused trakt.collected
MODIFY
plextraktsync/trakt_api.py
plextraktsync/trakt_api.py
from plextraktsync.factory import factory, logger, logging
from plextraktsync.path import pytrakt_file
from plextraktsync.plex_api import PlexGuid, PlexLibraryItem
-from plextraktsync.pytrakt_extensions import ShowProgress
class ScrobblerProxy:
@@ -296,13 +295,6 @@ def remove_from_watchlist(self, m, batch=False):
else:
trakt.sync.remove_from_watchlist(item)
- @nocache
- @rate_limit()
- @retry()
- def collected(self, tm: TVShow):
- data = tm.collection_progress(specials=True)
- return ShowProgress(**data)
-
def find_by_guid(self, guid: PlexGuid):
if guid.type == "episode" and guid.is_episode:
ts: TVShow = self.search_by_id(

MODIFY
tests/test_trakt_progress.py
tests/test_trakt_progress.py
trakt: TraktApi = factory.trakt_api()
-def test_trakt_collection_progress():
- show = TVShow('Game of Thrones')
- collected = trakt.collected(show)
- assert isinstance(collected, ShowProgress)
- s01e01 = collected.get_completed(1, 1)
- assert isinstance(s01e01, bool)
-
-
def test_trakt_watched_progress():
show = TVShow('Game of Thrones')
data = show.watched_progress()
@@ -27,5 +19,4 @@ def test_trakt_watched_progress():
if __name__ == '__main__':
- test_trakt_collection_progress()
test_trakt_watched_progress()

Cleanup unused trakt.collected