Skip to content

Commit

Permalink
chore(mobile): add timeout when reading video files (immich-app#14831)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 authored Dec 20, 2024
1 parent 79a780e commit a147358
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions mobile/lib/services/backup.service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,12 @@ class BackupService {
);
}
} else {
if (asset.type == AssetType.video) {
file = await asset.local!.originFile;
} else {
file = await asset.local!.originFile
file =
await asset.local!.originFile.timeout(const Duration(seconds: 5));

if (asset.local!.isLivePhoto) {
livePhotoFile = await asset.local!.originFileWithSubtype
.timeout(const Duration(seconds: 5));
if (asset.local!.isLivePhoto) {
livePhotoFile = await asset.local!.originFileWithSubtype
.timeout(const Duration(seconds: 5));
}
}
}

Expand Down

0 comments on commit a147358

Please sign in to comment.