mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-28 13:50:35 +02:00
fix(metadata): match by primary artist and review results #511
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:spotiflac_android/utils/artist_utils.dart';
|
||||
|
||||
void main() {
|
||||
test('primary artist prefers the first album artist', () {
|
||||
expect(
|
||||
primaryArtistName(
|
||||
'Track Artist, Guest Artist',
|
||||
albumArtist: 'Album Artist & Collaborator',
|
||||
),
|
||||
'Album Artist',
|
||||
);
|
||||
});
|
||||
|
||||
test('primary artist handles provider separator variants', () {
|
||||
expect(primaryArtistName('One; Two & Three'), 'One');
|
||||
expect(primaryArtistName('One feat. Two'), 'One');
|
||||
expect(primaryArtistName('AC/DC'), 'AC/DC');
|
||||
expect(
|
||||
primaryArtistName('Actual Artist, Guest', albumArtist: 'Various Artists'),
|
||||
'Actual Artist',
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user