mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-30 21:29:36 +02:00
perf(library): batch album deletion and refresh once
This commit is contained in:
1 parent
c868aac2cc
commit
1ef81b4530
6 files changed
+224
-14
No files matched your search
@@ -1986,15 +1986,12 @@ class LibraryDatabase {
|
||||
}
|
||||
|
||||
Future<void> delete(String id) async {
|
||||
final db = await database;
|
||||
await db.transaction((txn) async {
|
||||
await txn.delete(
|
||||
'library_path_keys',
|
||||
where: 'item_id = ?',
|
||||
whereArgs: [id],
|
||||
);
|
||||
await txn.delete('library', where: 'id = ?', whereArgs: [id]);
|
||||
});
|
||||
await deleteByIds([id]);
|
||||
}
|
||||
|
||||
Future<void> deleteByIds(Iterable<String> ids) async {
|
||||
if (ids.isEmpty) return;
|
||||
await deleteLibraryItemsByIds(await database, ids);
|
||||
}
|
||||
|
||||
Future<int> cleanupMissingFiles({
|
||||
|
||||
Reference in new issue
Block a user