Skip to content

Commit

Permalink
handle videos without thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored May 24, 2024
1 parent 7311736 commit 755c7ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tutubo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ def featured_videos(self):

@property
def thumbnail_url(self):
return self.featured_videos[0]["image"]
try:
return self.featured_videos[0]["image"]
except:
return None

@property
def as_dict(self):
Expand Down

0 comments on commit 755c7ce

Please sign in to comment.