Fix thumbnails
This commit is contained in:
parent
61e2c27151
commit
eb2f360f08
@ -318,6 +318,7 @@ def watch():
|
|||||||
except:
|
except:
|
||||||
audioUrl = False
|
audioUrl = False
|
||||||
|
|
||||||
|
print(info['video']['thumbnail'])
|
||||||
video={
|
video={
|
||||||
'title':info['video']['title'],
|
'title':info['video']['title'],
|
||||||
'description':Markup(markupString(info['video']['description'])),
|
'description':Markup(markupString(info['video']['description'])),
|
||||||
@ -810,7 +811,7 @@ def getYoutubePosts(ids):
|
|||||||
video.videoTitle = vid.title
|
video.videoTitle = vid.title
|
||||||
if config['nginxVideoStream']:
|
if config['nginxVideoStream']:
|
||||||
hostName = urllib.parse.urlparse(vid.media_thumbnail[0]['url']).netloc
|
hostName = urllib.parse.urlparse(vid.media_thumbnail[0]['url']).netloc
|
||||||
video.videoThumb = vid.media_thumbnail[0]['url'].replace(hostName, config['serverName']).replace("hqdefault", "mqdefault")+"?hostname="+hostName
|
video.videoThumb = vid.media_thumbnail[0]['url'].replace("https://{}".format(hostName), "").replace("hqdefault", "mqdefault")+"?host="+hostName
|
||||||
else:
|
else:
|
||||||
video.videoThumb = vid.media_thumbnail[0]['url'].replace('/', '~')
|
video.videoThumb = vid.media_thumbnail[0]['url'].replace('/', '~')
|
||||||
video.views = vid.media_statistics['views']
|
video.views = vid.media_statistics['views']
|
||||||
|
Reference in New Issue
Block a user