From 024e378d8175623b13bca834867f419196461057 Mon Sep 17 00:00:00 2001 From: Karar Al-Remahy Date: Sat, 24 Apr 2021 13:43:46 +0200 Subject: [PATCH] fix: MQ instead of SD for rectangular thumbnails. (#127) --- CHANGELOG.md | 2 ++ internal/resolvers/youtube/load.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a22f910..43396a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Youtube thumbnails are now in medium quality instead of standard definition to get a rectangular shaped image. (#127) + ## 1.0.1 - Dev: You can now set the Base URL flag with the `CHATTERINO_API_BASE_URL` environment variable. (#123) diff --git a/internal/resolvers/youtube/load.go b/internal/resolvers/youtube/load.go index 9ba0d51d..fa08095a 100644 --- a/internal/resolvers/youtube/load.go +++ b/internal/resolvers/youtube/load.go @@ -58,8 +58,8 @@ func load(videoID string, r *http.Request) (interface{}, time.Duration, error) { } thumbnail := video.Snippet.Thumbnails.Default.Url - if video.Snippet.Thumbnails.Standard != nil { - thumbnail = video.Snippet.Thumbnails.Standard.Url + if video.Snippet.Thumbnails.Medium != nil { + thumbnail = video.Snippet.Thumbnails.Medium.Url } return &resolver.Response{