mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 13:06:34 +00:00
Add a default thumbnail URL before metadata is available
This commit is contained in:
parent
a904d60ad8
commit
281268772a
@ -1202,6 +1202,8 @@ class Media(models.Model):
|
||||
|
||||
@property
|
||||
def thumbnail(self):
|
||||
if not self.has_metadata:
|
||||
return f'https://i.ytimg.com/vi/{self.key}/maxresdefault.jpg'
|
||||
return self.get_metadata_first_value('thumbnail', '')
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user