|
@@ -134,8 +134,7 @@ Future<io.File> getFileFromServer(
|
|
|
return fileDownloadsInProgress[downloadID];
|
|
|
}
|
|
|
|
|
|
-Future<bool> isFileCached(ente.File file,
|
|
|
- {bool liveVideo = false}) async {
|
|
|
+Future<bool> isFileCached(ente.File file, {bool liveVideo = false}) async {
|
|
|
final cacheManager = (file.fileType == FileType.video || liveVideo)
|
|
|
? VideoCacheManager.instance
|
|
|
: DefaultCacheManager();
|
|
@@ -160,7 +159,7 @@ Future<io.File> _getLivePhotoFromServer(ente.File file,
|
|
|
return null;
|
|
|
}
|
|
|
return needLiveVideo ? livePhoto.video : livePhoto.image;
|
|
|
- } catch (e,s) {
|
|
|
+ } catch (e, s) {
|
|
|
_logger.warning("live photo get failed", e, s);
|
|
|
livePhotoDownloadsTracker.remove(downloadID);
|
|
|
return null;
|
|
@@ -226,8 +225,7 @@ Future<_LivePhoto> _downloadLivePhoto(ente.File file,
|
|
|
}
|
|
|
return _LivePhoto(imageFileCache, videoFileCache);
|
|
|
}).catchError((e) {
|
|
|
- _logger.warning(
|
|
|
- "failed to download live photos : ${file.tag()}", e);
|
|
|
+ _logger.warning("failed to download live photos : ${file.tag()}", e);
|
|
|
throw e;
|
|
|
});
|
|
|
}
|