mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +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");
|
_log.fine("[_syncDir] Syncing dir $dir");
|
||||||
final files = await fileRepoRemote.list(account, dir);
|
final files = await fileRepoRemote.list(account, dir);
|
||||||
await FileSqliteCacheUpdater(db)(account, dir, remote: files);
|
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;
|
File? result;
|
||||||
if (!_supportedMimes.contains(f.fdMime)) {
|
if (!_supportedMimes.contains(f.fdMime)) {
|
||||||
_log.info(
|
_log.info(
|
||||||
|
|
|
@ -98,8 +98,15 @@ class SyncMetadata {
|
||||||
fallback: fallback,
|
fallback: fallback,
|
||||||
);
|
);
|
||||||
await op.init();
|
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(
|
final stream = op.syncFiles(
|
||||||
relativePaths: files.items.map((e) => e.relativePath).toList(),
|
fileIds: fileIds,
|
||||||
|
relativePaths: relativePaths,
|
||||||
);
|
);
|
||||||
yield* stream;
|
yield* stream;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue