diff --git a/mobile/lib/services/preview_video_store.dart b/mobile/lib/services/preview_video_store.dart index 732050197c..c8e4d7aa89 100644 --- a/mobile/lib/services/preview_video_store.dart +++ b/mobile/lib/services/preview_video_store.dart @@ -653,13 +653,21 @@ class PreviewVideoStore { int? parseDurationFromHLS(String playlist) { final lines = playlist.split("\n"); + double totalDuration = 0.0; for (final line in lines) { - if (line.startsWith("#EXT-X-TARGETDURATION")) { - final duration = line.split(":").last.trim(); - return int.tryParse(duration); + if (line.startsWith("#EXTINF:")) { + // Extract duration value (e.g., "#EXTINF:2.400000," → "2.400000") + final durationStr = line.substring( + 8, + line.length - 1, + ); + final duration = double.tryParse(durationStr); + if (duration != null) { + totalDuration += duration; + } } } - return null; + return totalDuration > 0 ? totalDuration.round() : null; } Future<(String, String)> _getPreviewUrl(EnteFile file) async { diff --git a/mobile/lib/ui/sharing/album_participants_page.dart b/mobile/lib/ui/sharing/album_participants_page.dart index cd61e44f5b..b162b1f8dd 100644 --- a/mobile/lib/ui/sharing/album_participants_page.dart +++ b/mobile/lib/ui/sharing/album_participants_page.dart @@ -55,7 +55,7 @@ class _AlbumParticipantsPageState extends State { await routeToPage( context, AddParticipantPage( - widget.collection as List, + [widget.collection], addingViewer ? [ActionTypesToShow.addViewer] : [ActionTypesToShow.addCollaborator], diff --git a/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart b/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart index f544d7879c..f75b8358ba 100644 --- a/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart +++ b/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart @@ -201,10 +201,8 @@ class _AlbumSelectionActionWidgetState context, nonEmptyCollection, ); - if (result == true) { - Navigator.of(context).pop(); - } else { - debugPrint("No pop"); + if (result == false) { + debugPrint("Failed to delete collection"); } } if (hasFavorites) { @@ -327,9 +325,6 @@ class _AlbumSelectionActionWidgetState labelText: S.of(context).leaveAlbum, onTap: () async { for (final collection in widget.selectedAlbums.albums) { - if (collection.type == CollectionType.favorites) { - continue; - } await CollectionsService.instance.leaveAlbum(collection); } widget.selectedAlbums.clearAll(); diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index b640c5fee2..0f39719831 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -12,7 +12,7 @@ description: ente photos application # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.14+1044 +version: 1.0.14+1045 publish_to: none environment: