Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Enhance Dedupe to add symlinks before deletion (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 authored Dec 18, 2023
2 parents 79c52f1 + ceb82e5 commit c838a2a
Show file tree
Hide file tree
Showing 21 changed files with 1,421 additions and 1,269 deletions.
12 changes: 8 additions & 4 deletions .vscode/launch.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"independent",
"--dart-define",
"endpoint=http://localhost:8080",
"--dart-define",
"web-family=http://localhost:3003",
]
},
{
Expand All @@ -41,10 +43,12 @@
"type": "dart",
"flutterMode": "debug",
"program": "lib/main.dart",
"args": [
"--dart-define",
"endpoint=http://localhost:8080",
]
"args": [
"--dart-define",
"endpoint=http://localhost:8080",
"--dart-define",
"web-family=http://localhost:3003"
]
},
]
}
10 changes: 8 additions & 2 deletions lib/db/files_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1488,14 +1488,20 @@ class FilesDB {
await batch.commit(noResult: true);
}

Future<List<EnteFile>> getAllFilesFromDB(Set<int> collectionsToIgnore) async {
Future<List<EnteFile>> getAllFilesFromDB(
Set<int> collectionsToIgnore, {
bool dedupeByUploadId = true,
}) async {
final db = await instance.database;
final List<Map<String, dynamic>> result =
await db.query(filesTable, orderBy: '$columnCreationTime DESC');
final List<EnteFile> files = convertToFiles(result);
final List<EnteFile> deduplicatedFiles = await applyDBFilters(
files,
DBFilterOptions(ignoredCollectionIDs: collectionsToIgnore),
DBFilterOptions(
ignoredCollectionIDs: collectionsToIgnore,
dedupeUploadID: dedupeByUploadId,
),
);
return deduplicatedFiles;
}
Expand Down
340 changes: 208 additions & 132 deletions lib/generated/intl/messages_de.dart

Large diffs are not rendered by default.

271 changes: 138 additions & 133 deletions lib/generated/intl/messages_en.dart

Large diffs are not rendered by default.

237 changes: 118 additions & 119 deletions lib/generated/intl/messages_es.dart

Large diffs are not rendered by default.

261 changes: 130 additions & 131 deletions lib/generated/intl/messages_fr.dart

Large diffs are not rendered by default.

257 changes: 128 additions & 129 deletions lib/generated/intl/messages_it.dart

Large diffs are not rendered by default.

265 changes: 132 additions & 133 deletions lib/generated/intl/messages_nl.dart

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/generated/intl/messages_pl.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions lib/generated/intl/messages_pt.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c838a2a

Please sign in to comment.