Upgrade motion photos package

This commit is contained in:
Neeraj Gupta 2023-05-05 18:06:25 +05:30
parent cc08aa947c
commit 66e144d6bd
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
4 changed files with 6 additions and 4 deletions

View file

@ -427,6 +427,8 @@ class MessageLookup extends MessageLookupByLibrary {
"customRadius":
MessageLookupByLibrary.simpleMessage("Radio personalizado"),
"darkTheme": MessageLookupByLibrary.simpleMessage("Oscuro"),
"dayToday": MessageLookupByLibrary.simpleMessage("Hoy"),
"dayYesterday": MessageLookupByLibrary.simpleMessage("Ayer"),
"decrypting": MessageLookupByLibrary.simpleMessage("Descifrando..."),
"decryptingVideo":
MessageLookupByLibrary.simpleMessage("Descifrando video..."),

View file

@ -125,7 +125,7 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
return;
}
_isLoadingVideoPlayer = true;
io.File? videoFile = _file.fileType == FileType.livePhoto
final io.File? videoFile = _file.fileType == FileType.livePhoto
? await _getLivePhotoVideo()
: await _getMotionPhotoVideo();
@ -178,7 +178,7 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
});
if (imageFile != null) {
final motionPhoto = MotionPhotos(imageFile.path);
final index = motionPhoto.getMotionVideoIndex();
final index = await motionPhoto.getMotionVideoIndex();
if (index != null) {
if (widget.file.pubMagicMetadata?.mvi == null &&
(widget.file.ownerID ?? 0) == Configuration.instance.getUserID()!) {

View file

@ -163,7 +163,7 @@ Future<MediaUploadData> _getMediaUploadDataFromAssetFile(ente.File file) async {
if (io.Platform.isAndroid && asset.type == AssetType.image) {
try {
motionPhotoStartingIndex =
MotionPhotos(sourceFile.path).getMotionVideoIndex()?.start;
(await MotionPhotos(sourceFile.path).getMotionVideoIndex())?.start;
} catch (e) {
_logger.severe('error while detecthing motion photo start index', e);
}

View file

@ -1186,7 +1186,7 @@ packages:
description:
path: "."
ref: HEAD
resolved-ref: ceeaff6e16bd9e3c98e7da2b1109dc04a93098b9
resolved-ref: "989ea86e513755d9a8cf945e7522100fc2877639"
url: "https://github.com/ente-io/motion_photo.git"
source: git
version: "0.0.1"