Add type property to TraktItem class
MODIFY
plextraktsync/trakt_api.py
plextraktsync/trakt_api.py
@@ -75,6 +75,14 @@ def __init__(self, item: Union[Movie, TVShow, TVSeason, TVEpisode], trakt: Trakt
self.item = item
self.trakt = trakt
+ @cached_property
+ def type(self):
+ """
+ Return "movie", "show", "season", "episode"
+ """
+ # NB: TVSeason does not have "media_type" property
+ return self.item.media_type[:-1]
+
class TraktApi:
"""

Add type property to TraktItem class