diff --git a/src/invidious.cr b/src/invidious.cr
index d357ad5e..5af868c5 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -439,7 +439,11 @@ get "/watch" do |env|
host_params = env.request.query_params
host_params.delete_all("v")
- thumbnail = "https://i.ytimg.com/vi/#{id}/maxresdefault.jpg"
+ if fmt_stream.select { |x| x["label"].starts_with? "hd720" }.size != 0
+ thumbnail = "https://i.ytimg.com/vi/#{video.id}/maxresdefault.jpg"
+ else
+ thumbnail = "https://i.ytimg.com/vi/#{video.id}/hqdefault.jpg"
+ end
templated "watch"
end
@@ -1525,7 +1529,11 @@ get "/embed/:id" do |env|
host_params = env.request.query_params
host_params.delete_all("v")
- thumbnail = "https://i.ytimg.com/vi/#{id}/maxresdefault.jpg"
+ if fmt_stream.select { |x| x["label"].starts_with? "hd720" }.size != 0
+ thumbnail = "https://i.ytimg.com/vi/#{video.id}/maxresdefault.jpg"
+ else
+ thumbnail = "https://i.ytimg.com/vi/#{video.id}/hqdefault.jpg"
+ end
rendered "embed"
end
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index b6119468..8ee9b568 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -18,7 +18,7 @@
-
+