Tweak logs

This commit is contained in:
Ming Ming 2021-05-13 13:18:30 +08:00
parent 87dfe7ef5c
commit 46e077f5ab

View file

@ -24,6 +24,7 @@ class UpdateMissingMetadata {
yield d; yield d;
continue; continue;
} }
final File file = d;
try { try {
// since we need to download multiple images in their original size, // since we need to download multiple images in their original size,
// we only do it with WiFi // we only do it with WiFi
@ -31,7 +32,6 @@ class UpdateMissingMetadata {
if (!shouldRun) { if (!shouldRun) {
return; return;
} }
final File file = d;
_log.fine("[call] Updating metadata for ${file.path}"); _log.fine("[call] Updating metadata for ${file.path}");
final metadata = await metadataLoader.loadFile(account, file); final metadata = await metadataLoader.loadFile(account, file);
int imageWidth, imageHeight; int imageWidth, imageHeight;
@ -54,7 +54,10 @@ class UpdateMissingMetadata {
AlbumRepo(AlbumCachedDataSource()))(account, file, metadataObj); AlbumRepo(AlbumCachedDataSource()))(account, file, metadataObj);
yield file; yield file;
} catch (e, stacktrace) { } catch (e, stacktrace) {
_log.shout("[call] Failed while getting metadata", e, stacktrace); _log.shout(
"[call] Failed while getting metadata for ${file.contentType} file",
e,
stacktrace);
yield e; yield e;
} }
} }