From 6091cda0e10a24e854ccfcc4d5eb65b5b22956a5 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Wed, 12 Aug 2020 02:06:59 +1200 Subject: [PATCH] Use proxied thumbnail URLs --- index.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.py b/index.py index 219e0bd..1312dbf 100644 --- a/index.py +++ b/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,