Add subtitle field to media objects

This commit is contained in:
2023-02-23 10:56:21 -05:00
parent 16d1dcc125
commit 0f44df2b9b
5 changed files with 44 additions and 4 deletions

View File

@ -69,10 +69,24 @@ class Video(ScrobblableMixin):
def get_absolute_url(self):
return reverse("videos:video_detail", kwargs={'slug': self.uuid})
@property
def subtitle(self):
if self.tv_series:
return self.tv_series
return ""
@property
def imdb_link(self):
return f"https://www.imdb.com/title/{self.imdb_id}"
@property
def info_link(self):
return self.imdb_link
@property
def link(self):
return self.imdb_link
@classmethod
def find_or_create(cls, data_dict: Dict) -> "Video":
"""Given a data dict from Jellyfin, does the heavy lifting of looking up