Artwork reader for Artist

This commit is contained in:
Deluan
2022-12-31 16:58:07 -05:00
committed by Deluan Quintão
parent bf461473ef
commit 918fee3ea3
11 changed files with 99 additions and 24 deletions
+4
View File
@@ -2,6 +2,7 @@ package core
import (
"context"
"errors"
"sort"
"strings"
"sync"
@@ -224,6 +225,9 @@ func (e *externalMetadata) TopSongs(ctx context.Context, artistName string, coun
func (e *externalMetadata) getMatchingTopSongs(ctx context.Context, agent agents.ArtistTopSongsRetriever, artist *auxArtist, count int) (model.MediaFiles, error) {
songs, err := agent.GetTopSongs(ctx, artist.ID, artist.Name, artist.MbzArtistID, count)
if errors.Is(err, agents.ErrNotFound) {
return nil, nil
}
if err != nil {
return nil, err
}