mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-11-22 15:47:30 +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 cherrypy
|
||||||
import json
|
import json
|
||||||
import youtube_dl
|
import youtube_dl
|
||||||
@ -115,7 +116,8 @@ def generate_video_thumbnails(id):
|
|||||||
]
|
]
|
||||||
return [{
|
return [{
|
||||||
"quality": type[0],
|
"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],
|
"width": type[2],
|
||||||
"height": type[3]
|
"height": type[3]
|
||||||
} for type in types]
|
} for type in types]
|
||||||
@ -212,7 +214,7 @@ class Second(object):
|
|||||||
"isListed": None,
|
"isListed": None,
|
||||||
"liveNow": None,
|
"liveNow": None,
|
||||||
"isUpcoming": 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,
|
"second__providedDashUrl": None,
|
||||||
"adaptiveFormats": [{
|
"adaptiveFormats": [{
|
||||||
"index": None,
|
"index": None,
|
||||||
|
Loading…
Reference in New Issue
Block a user