mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Fix server side metadata service not filtering file type
This commit is contained in:
parent
c1915b393a
commit
15eb565eac
2 changed files with 9 additions and 2 deletions
|
@ -41,7 +41,7 @@ class _SyncByServer {
|
|||
_log.fine("[_syncDir] Syncing dir $dir");
|
||||
final files = await fileRepoRemote.list(account, dir);
|
||||
await FileSqliteCacheUpdater(db)(account, dir, remote: files);
|
||||
for (final f in files) {
|
||||
for (final f in files.where((e) => fileIds.contains(e.fdId))) {
|
||||
File? result;
|
||||
if (!_supportedMimes.contains(f.fdMime)) {
|
||||
_log.info(
|
||||
|
|
|
@ -98,8 +98,15 @@ class SyncMetadata {
|
|||
fallback: fallback,
|
||||
);
|
||||
await op.init();
|
||||
final fileIds = <int>[];
|
||||
final relativePaths = <String>[];
|
||||
for (final f in files.items) {
|
||||
fileIds.add(f.fileId);
|
||||
relativePaths.add(f.relativePath);
|
||||
}
|
||||
final stream = op.syncFiles(
|
||||
relativePaths: files.items.map((e) => e.relativePath).toList(),
|
||||
fileIds: fileIds,
|
||||
relativePaths: relativePaths,
|
||||
);
|
||||
yield* stream;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue