refactor(screens): unify album header, selection UI, and batch engine

The local/downloaded album screens had drifted copies of the album
header, selection bottom bar, disc chip, batch convert/ReplayGain trio,
and assorted small helpers. All now delegate to the shared widgets, with
the online album screen's design as the reference, and both album screens
run batch actions through the queue_tab engine via UnifiedLibraryItem
(strict-superset implementation covering both DB writebacks and SAF
paths). Also folds the remaining per-screen helper copies (cover URL,
error card, byte/clock formatting, readPositiveInt) into their shared
homes.

Intentional deltas: selection-bar strings follow queue_tab's l10n keys,
both providers reload after a conversion, and audio-analysis durations
round instead of floor.
This commit is contained in:
zarzet
2026-07-11 16:36:29 +07:00
parent fca3039208
commit 05415d96d5
19 changed files with 693 additions and 3733 deletions
-9
View File
@@ -301,15 +301,6 @@ String convertedAudioQualityLabel({
return '$upper ${bitrate.trim().toLowerCase()}';
}
int? readPositiveAudioInt(Object? value) {
if (value is num) {
final intValue = value.toInt();
return intValue > 0 ? intValue : null;
}
final parsed = int.tryParse(value?.toString() ?? '');
return parsed != null && parsed > 0 ? parsed : null;
}
String normalizedConvertedAudioFormat(String targetFormat) {
return targetFormat.trim().toLowerCase();
}