feat(library): ISRC duplicate detection beyond FLAC with review sheet

The download-time ISRC index now also parses mp3, m4a, ogg, and opus
tags through the existing native readers instead of skipping everything
but .flac. Library settings gain a Review duplicates sheet that groups
history and local-library rows sharing an ISRC via SQL over the
attached databases (no filesystem walk, SAF-safe), shows quality
badges, and offers keep-best and per-copy delete with confirmation.
This commit is contained in:
zarzet
2026-07-26 18:49:58 +07:00
parent 50c8f0e454
commit a21d5bcb33
4 changed files with 376 additions and 2 deletions
@@ -9,6 +9,7 @@ import 'package:spotiflac_android/providers/settings_provider.dart';
import 'package:spotiflac_android/providers/local_library_provider.dart';
import 'package:spotiflac_android/services/platform_bridge.dart';
import 'package:spotiflac_android/utils/adaptive_layout.dart';
import 'package:spotiflac_android/widgets/duplicate_review_sheet.dart';
import 'package:spotiflac_android/widgets/settings_group.dart';
import 'package:spotiflac_android/widgets/settings_sliver_app_bar.dart';
@@ -405,6 +406,12 @@ class _LibrarySettingsPageState extends ConsumerState<LibrarySettingsPage> {
.read(settingsProvider.notifier)
.setLocalLibraryShowDuplicates(value),
),
SettingsItem(
icon: Icons.difference_outlined,
title: context.l10n.libraryReviewDuplicates,
subtitle: context.l10n.libraryReviewDuplicatesSubtitle,
onTap: () => DuplicateReviewSheet.show(context),
),
Opacity(
opacity: settings.localLibraryEnabled ? 1.0 : 0.5,
child: SettingsItem(