mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +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
|
@property
|
||||||
def thumbnail(self):
|
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', '')
|
return self.get_metadata_first_value('thumbnail', '')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user