diff --git a/lib/version/sync.dart b/lib/version/sync.dart index 1ef646cbc..8a8aaa18c 100644 --- a/lib/version/sync.dart +++ b/lib/version/sync.dart @@ -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)})', []);