summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPerflyst <mail@perflyst.de>2021-04-08 11:14:36 +0200
committerGitHub <noreply@github.com>2021-04-08 11:14:36 +0200
commitb7eba3bc178b76a733a142f475cdb83921d591c1 (patch)
treee0eaed08d61dabf8228003a970cbdff81cc23f32
parent661d715446b524c91c5812b64cb038fe1fb175d0 (diff)
parent87c25f83a491a61727049876cd8343bdb3929103 (diff)
downloadinvidious-b7eba3bc178b76a733a142f475cdb83921d591c1.tar.gz
invidious-b7eba3bc178b76a733a142f475cdb83921d591c1.tar.bz2
invidious-b7eba3bc178b76a733a142f475cdb83921d591c1.zip
Merge pull request #1961 from SamantazFox/fix-thumbnails-url
Fix API giving ytimg instead of instance URLs for thumbnails
-rw-r--r--src/invidious/videos.cr18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index e6d4c764..38646311 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -1150,15 +1150,15 @@ end
def build_thumbnails(id)
return {
- {name: "maxres", host: "#{HOST_URL}", url: "maxres", height: 720, width: 1280},
- {name: "maxresdefault", host: "https://i.ytimg.com", url: "maxresdefault", height: 720, width: 1280},
- {name: "sddefault", host: "https://i.ytimg.com", url: "sddefault", height: 480, width: 640},
- {name: "high", host: "https://i.ytimg.com", url: "hqdefault", height: 360, width: 480},
- {name: "medium", host: "https://i.ytimg.com", url: "mqdefault", height: 180, width: 320},
- {name: "default", host: "https://i.ytimg.com", url: "default", height: 90, width: 120},
- {name: "start", host: "https://i.ytimg.com", url: "1", height: 90, width: 120},
- {name: "middle", host: "https://i.ytimg.com", url: "2", height: 90, width: 120},
- {name: "end", host: "https://i.ytimg.com", url: "3", height: 90, width: 120},
+ {host: HOST_URL, height: 720, width: 1280, name: "maxres", url: "maxres"},
+ {host: HOST_URL, height: 720, width: 1280, name: "maxresdefault", url: "maxresdefault"},
+ {host: HOST_URL, height: 480, width: 640, name: "sddefault", url: "sddefault"},
+ {host: HOST_URL, height: 360, width: 480, name: "high", url: "hqdefault"},
+ {host: HOST_URL, height: 180, width: 320, name: "medium", url: "mqdefault"},
+ {host: HOST_URL, height: 90, width: 120, name: "default", url: "default"},
+ {host: HOST_URL, height: 90, width: 120, name: "start", url: "1"},
+ {host: HOST_URL, height: 90, width: 120, name: "middle", url: "2"},
+ {host: HOST_URL, height: 90, width: 120, name: "end", url: "3"},
}
end