Skip to content

High performance self-hosted photo and video management solution.

fix: json encoding failure during live photo download (#20444)

shenlongf85d8add012e
diff --git a/mobile/lib/repositories/download.repository.dart b/mobile/lib/repositories/download.repository.dart
index 6f38a802e2..c4b31e9d93 100644
--- a/mobile/lib/repositories/download.repository.dart
+++ b/mobile/lib/repositories/download.repository.dart
@@ -21,7 +21,7 @@ class DownloadRepository {
group: '',
updates: Updates.statusAndProgress,
);
- static final _dummyMetadata = {'part': LivePhotosPart.image, 'id': ''};
+ static final _dummyMetadata = {'part': LivePhotosPart.image.index, 'id': ''};
void Function(TaskStatusUpdate)? onImageDownloadStatus;
@@ -102,7 +102,7 @@ class DownloadRepository {
continue;
}
- _dummyMetadata['part'] = LivePhotosPart.image;
+ _dummyMetadata['part'] = LivePhotosPart.image.index;
_dummyMetadata['id'] = id;
tasks[taskIndex++] = DownloadTask(
taskId: id,
@@ -114,7 +114,7 @@ class DownloadRepository {
metaData: json.encode(_dummyMetadata),
);
- _dummyMetadata['part'] = LivePhotosPart.video;
+ _dummyMetadata['part'] = LivePhotosPart.video.index;
tasks[taskIndex++] = DownloadTask(
taskId: livePhotoVideoId,
url: url,