Skip to content

Commit

Permalink
Add title property to media
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 9, 2023
1 parent 038df36 commit b171e68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plextraktsync/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ def __init__(
self.trakt = trakt
self._show = None

@property
def title(self):
if self.plex:
return self.plex.title

return f"{self.trakt.title} ({self.trakt.year})"

@cached_property
def media_type(self):
return self.trakt.media_type
Expand Down

0 comments on commit b171e68

Please sign in to comment.