From c0e495345b61a782b9abcc7eb6fac2e6080adf06 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Thu, 16 Apr 2026 21:17:43 +0200 Subject: [PATCH] fix(ui): coverArt filetype generalized, added support for png,webp --- internal/ui/cmds_api.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/ui/cmds_api.go b/internal/ui/cmds_api.go index bdc5c1e..3754719 100644 --- a/internal/ui/cmds_api.go +++ b/internal/ui/cmds_api.go @@ -2,11 +2,14 @@ package ui import ( "bytes" - "image/jpeg" + "image" + _ "image/jpeg" + _ "image/png" "path/filepath" "github.com/MattiaPun/SubTUI/v2/internal/api" tea "github.com/charmbracelet/bubbletea" + _ "golang.org/x/image/webp" ) func attemptLoginCmd() tea.Cmd { @@ -149,7 +152,7 @@ func getCoverArtCmd(songID string) tea.Cmd { return nil } - img, err := jpeg.Decode(bytes.NewReader(imgData)) + img, _, err := image.Decode(bytes.NewReader(imgData)) if err != nil { return nil }