Use self.trakt_api.ratings proxy
@@ -104,14 +104,7 @@ def mark_watched_plex(self):
@property
def trakt_rating(self):
- if self.media_type == 'movies':
- rating = self.trakt_api.movie_ratings.get(self.trakt_id, None)
- elif self.media_type == 'episodes':
- rating = self.trakt_api.episode_ratings.get(self.trakt_id, None)
- elif self.media_type == 'shows':
- rating = self.trakt_api.show_ratings.get(self.trakt_id, None)
- else:
- raise RuntimeError(f"trakt_rating: Unsupported media type: {self.media_type}")
+ rating = self.trakt_api.ratings[self.media_type].get(self.trakt_id, None)
if rating:
return int(rating)
return None
