mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 06:52:43 +01:00
refactor artist to use coverArt
fix cover art image caching
This commit is contained in:
@@ -42,19 +42,13 @@ class SubsonicSource implements MusicSource {
|
||||
|
||||
@override
|
||||
Stream<Artist> allArtists() async* {
|
||||
final getArtistsRes = await _pool.withResource(
|
||||
final res = await _pool.withResource(
|
||||
() => client.get('getArtists'),
|
||||
);
|
||||
|
||||
yield* _pool.forEach(getArtistsRes.xml.findAllElements('artist'), (
|
||||
artist,
|
||||
) async {
|
||||
final res = await client.get('getArtistInfo2', {
|
||||
'id': artist.getAttribute('id')!,
|
||||
});
|
||||
|
||||
return mapArtist(artist, res.xml.getElement('artistInfo2'));
|
||||
});
|
||||
yield* Stream.fromIterable(
|
||||
res.xml.findAllElements('artist').map(mapArtist),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user