More descriptive error when artist.jpg not found
This commit is contained in:
parent
0ffef05cc3
commit
94c6d47181
|
@ -2,7 +2,6 @@ package artwork
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
|
@ -80,7 +79,7 @@ func fromArtistFolder(ctx context.Context, artistFolder string, pattern string)
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
if len(matches) == 0 {
|
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])
|
filePath := filepath.Join(artistFolder, matches[0])
|
||||||
f, err := os.Open(filePath)
|
f, err := os.Open(filePath)
|
||||||
|
|
Loading…
Reference in New Issue