mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-23 01:50:44 +02:00
perf(library): stream normalized scan timestamp snapshots
This commit is contained in:
@@ -759,7 +759,7 @@ class LocalLibraryNotifier extends Notifier<LocalLibraryState> {
|
||||
final useSnapshotBridge =
|
||||
Platform.isAndroid && existingFiles.isNotEmpty;
|
||||
final snapshotPath = useSnapshotBridge
|
||||
? await _db.writeFileModTimesSnapshot(sourceId: activeSourceId)
|
||||
? await _db.writeFileModTimesSnapshot(existingFiles)
|
||||
: null;
|
||||
|
||||
Map<String, dynamic> result;
|
||||
@@ -1263,7 +1263,9 @@ class LocalLibraryNotifier extends Notifier<LocalLibraryState> {
|
||||
required Map<String, int> existingFiles,
|
||||
}) async {
|
||||
final legacyPaths = existingFiles.entries
|
||||
.where((entry) => entry.value <= 0)
|
||||
// Negative timestamps deliberately force a metadata-version rescan;
|
||||
// only a missing timestamp (zero) may be filled from the filesystem.
|
||||
.where((entry) => entry.value == 0)
|
||||
.map((entry) => entry.key)
|
||||
.toList();
|
||||
if (legacyPaths.isEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user