Skip to content

Commit

Permalink
sync: fix deletion query for optimizing database
Browse files Browse the repository at this point in the history
  • Loading branch information
sliverappbar authored and violet-dev committed Oct 15, 2023
1 parent a7e2382 commit 8637972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/version/sync.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class SyncManager {
if (Settings.useOptimizeDatabase && filteredIter.isNotEmpty) {
var sql = HitomiManager.translate2query(
'${Settings.includeTags} ${Settings.excludeTags.where((e) => e.trim() != '').map((e) => '-$e').join(' ')}')
.replaceAll('ExistOnHitomi=1', '');
.replaceAll(' AND ExistOnHitomi=1', '');

await (await DataBaseManager.getInstance()).delete('HitomiColumnModel',
'NOT (${sql.substring(sql.indexOf('WHERE') + 6)})', []);
Expand Down

0 comments on commit 8637972

Please sign in to comment.