mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-12-22 21:16:58 +00:00
Use proxied thumbnail URLs
This commit is contained in:
parent
3d21bbd2ae
commit
6091cda0e1
6
index.py
6
index.py
@ -1,3 +1,4 @@
|
||||
import configuration
|
||||
import cherrypy
|
||||
import json
|
||||
import youtube_dl
|
||||
@ -115,7 +116,8 @@ def generate_video_thumbnails(id):
|
||||
]
|
||||
return [{
|
||||
"quality": type[0],
|
||||
"url": "https://i.ytimg.com/vi/{}/{}.jpg".format(id, type[1]),
|
||||
"url": "{}/vi/{}/{}.jpg".format(configuration.website_origin, id, type[1]),
|
||||
"second__originalUrl": "https://i.ytimg.com/vi/{}/{}.jpg".format(id, type[1]),
|
||||
"width": type[2],
|
||||
"height": type[3]
|
||||
} for type in types]
|
||||
@ -212,7 +214,7 @@ class Second(object):
|
||||
"isListed": None,
|
||||
"liveNow": None,
|
||||
"isUpcoming": None,
|
||||
"dashUrl": "/api/manifest/dash/id/{}".format(info["id"]),
|
||||
"dashUrl": "{}/api/manifest/dash/id/{}".format(configuration.website_origin, info["id"]),
|
||||
"second__providedDashUrl": None,
|
||||
"adaptiveFormats": [{
|
||||
"index": None,
|
||||
|
Loading…
Reference in New Issue
Block a user