refactor: remove redundant comments and fix setMetadataSource bug

- Fix setMetadataSource always returning 'deezer' regardless of input parameter
- Remove self-evident doc comments that restate method/class names across
  app_theme, dynamic_color_wrapper, cover_cache_manager, history_database,
  library_database, and download_service_picker
- Remove stale migration inline notes (// 12 -> 16, // 20 -> 16, etc.) from app_theme
- Remove trivial section-label comments in queue_tab batch conversion method
- Remove duplicate 'wait up to 5 seconds' comment in main_shell
This commit is contained in:
zarzet
2026-03-18 01:12:16 +07:00
parent 75db2f162b
commit eb143a41fc
9 changed files with 14 additions and 50 deletions
+1 -4
View File
@@ -123,7 +123,7 @@ class LibraryDatabase {
return await openDatabase(
path,
version: 4, // Bumped version for bitrate column
version: 4,
onConfigure: (db) async {
await db.rawQuery('PRAGMA journal_mode = WAL');
await db.execute('PRAGMA synchronous = NORMAL');
@@ -331,13 +331,11 @@ class LibraryDatabase {
String? trackName,
String? artistName,
}) async {
// First try ISRC if available
if (isrc != null && isrc.isNotEmpty) {
final byIsrc = await getByIsrc(isrc);
if (byIsrc != null) return byIsrc;
}
// Then try name matching
if (trackName != null && artistName != null) {
final matches = await findByTrackAndArtist(trackName, artistName);
if (matches.isNotEmpty) return matches.first;
@@ -523,7 +521,6 @@ class LibraryDatabase {
return rows.map((r) => r['file_path'] as String).toSet();
}
/// Delete multiple items by their file paths
Future<int> deleteByPaths(List<String> filePaths) async {
if (filePaths.isEmpty) return 0;
final db = await database;