Better error handling

This commit is contained in:
Deluan
2022-12-28 10:19:52 -05:00
committed by Deluan Quintão
parent 949331ed24
commit bc09de6640
8 changed files with 37 additions and 43 deletions
+1 -2
View File
@@ -38,8 +38,7 @@ func (a *albumArtworkReader) LastUpdated() time.Time {
func (a *albumArtworkReader) Reader(ctx context.Context) (io.ReadCloser, string, error) {
var ff = fromCoverArtPriority(ctx, a.a.ffmpeg, conf.Server.CoverArtPriority, a.album)
ff = append(ff, fromPlaceholder())
r, source := extractImage(ctx, a.artID, ff...)
return r, source, nil
return selectImageReader(ctx, a.artID, ff...)
}
func fromCoverArtPriority(ctx context.Context, ffmpeg ffmpeg.FFmpeg, priority string, al model.Album) []sourceFunc {