mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-27 13:22:49 +02:00
feat(library): add bit depth quality label mode
This commit is contained in:
@@ -46,6 +46,33 @@ void main() {
|
||||
),
|
||||
AppSettings.libraryQualityLabelBitDepthBitrate,
|
||||
);
|
||||
expect(
|
||||
normalizeLibraryQualityLabelMode(
|
||||
AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
),
|
||||
AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
);
|
||||
});
|
||||
|
||||
test('shows only bit depth when requested', () {
|
||||
expect(
|
||||
buildLibraryAudioQualityLabel(
|
||||
mode: AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
format: 'flac',
|
||||
bitrateKbps: 1411,
|
||||
bitDepth: 16,
|
||||
sampleRate: 44100,
|
||||
),
|
||||
'16-bit',
|
||||
);
|
||||
expect(
|
||||
buildLibraryAudioQualityLabel(
|
||||
mode: AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
format: 'flac',
|
||||
storedQuality: '24-bit/96kHz',
|
||||
),
|
||||
'24-bit',
|
||||
);
|
||||
});
|
||||
|
||||
test('restores legacy bit depth and sample rate labels', () {
|
||||
|
||||
@@ -767,7 +767,7 @@ void main() {
|
||||
lyricsAppleElrcWordSync: true,
|
||||
deduplicateDownloads: false,
|
||||
allowQualityVariants: true,
|
||||
libraryQualityLabelMode: AppSettings.libraryQualityLabelBitDepthBitrate,
|
||||
libraryQualityLabelMode: AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
clearDownloadFallbackExtensionIds: true,
|
||||
clearSearchProvider: true,
|
||||
clearHomeFeedProvider: true,
|
||||
@@ -781,7 +781,7 @@ void main() {
|
||||
expect(updated.allowQualityVariants, isTrue);
|
||||
expect(
|
||||
updated.libraryQualityLabelMode,
|
||||
AppSettings.libraryQualityLabelBitDepthBitrate,
|
||||
AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
);
|
||||
expect(updated.downloadFallbackExtensionIds, isNull);
|
||||
expect(updated.searchProvider, isNull);
|
||||
@@ -812,7 +812,7 @@ void main() {
|
||||
autoConvertDownloads: true,
|
||||
autoConvertFormat: 'opus',
|
||||
autoConvertBitrate: '192k',
|
||||
libraryQualityLabelMode: AppSettings.libraryQualityLabelBitDepthBitrate,
|
||||
libraryQualityLabelMode: AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
);
|
||||
|
||||
final decoded = AppSettings.fromJson(settings.toJson());
|
||||
@@ -834,7 +834,7 @@ void main() {
|
||||
expect(decoded.lastSeenVersion, '4.5.0');
|
||||
expect(
|
||||
decoded.libraryQualityLabelMode,
|
||||
AppSettings.libraryQualityLabelBitDepthBitrate,
|
||||
AppSettings.libraryQualityLabelBitDepthOnly,
|
||||
);
|
||||
expect(decoded.deduplicateDownloads, isFalse);
|
||||
expect(decoded.allowQualityVariants, isTrue);
|
||||
|
||||
Reference in New Issue
Block a user