From 94c6d471816a4b9b535061f9b16f578d7b3210cd Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 13 Jan 2023 15:30:02 -0500 Subject: [PATCH] More descriptive error when artist.jpg not found --- core/artwork/reader_artist.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/artwork/reader_artist.go b/core/artwork/reader_artist.go index 22ad034e..3e659608 100644 --- a/core/artwork/reader_artist.go +++ b/core/artwork/reader_artist.go @@ -2,7 +2,6 @@ package artwork import ( "context" - "errors" "fmt" "io" "io/fs" @@ -80,7 +79,7 @@ func fromArtistFolder(ctx context.Context, artistFolder string, pattern string) return nil, "", err } if len(matches) == 0 { - return nil, "", errors.New("no matches for " + pattern) + return nil, "", fmt.Errorf(`no matches for "%s" in %s`, pattern, artistFolder) } filePath := filepath.Join(artistFolder, matches[0]) f, err := os.Open(filePath)