mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
chore(mobile): add timeout when reading video files (#14831)
This commit is contained in:
parent
79a780e8d9
commit
a14735846c
1 changed files with 5 additions and 8 deletions
|
@ -313,17 +313,14 @@ class BackupService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (asset.type == AssetType.video) {
|
file =
|
||||||
file = await asset.local!.originFile;
|
await asset.local!.originFile.timeout(const Duration(seconds: 5));
|
||||||
} else {
|
|
||||||
file = await asset.local!.originFile
|
|
||||||
.timeout(const Duration(seconds: 5));
|
|
||||||
if (asset.local!.isLivePhoto) {
|
if (asset.local!.isLivePhoto) {
|
||||||
livePhotoFile = await asset.local!.originFileWithSubtype
|
livePhotoFile = await asset.local!.originFileWithSubtype
|
||||||
.timeout(const Duration(seconds: 5));
|
.timeout(const Duration(seconds: 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
String? originalFileName =
|
String? originalFileName =
|
||||||
|
|
Loading…
Reference in a new issue