diff --git a/lib/controller/video_controller.dart b/lib/controller/video_controller.dart index f6c465a7..9d11ef1e 100644 --- a/lib/controller/video_controller.dart +++ b/lib/controller/video_controller.dart @@ -444,7 +444,7 @@ class VideoController { sizeInBytes: choosenStream.sizeInBytes, frameratePrecise: choosenStream.fps.toDouble(), creationTimeMS: 0, - durationMS: choosenStream.duration.inMilliseconds, + durationMS: choosenStream.duration?.inMilliseconds ?? 0, bitrate: choosenStream.bitrate, ); } diff --git a/lib/ui/widgets/library/track_tile.dart b/lib/ui/widgets/library/track_tile.dart index 576cfde4..28f86971 100644 --- a/lib/ui/widgets/library/track_tile.dart +++ b/lib/ui/widgets/library/track_tile.dart @@ -517,24 +517,28 @@ class TrackTileManager { static String joinTrackItems(TrackTilePosition? p1, TrackTilePosition? p2, TrackTilePosition? p3, Track track) { var buffer = StringBuffer(); + bool needsSeparator = false; if (p1 != null) { var info = getChoosenTrackTileItem(p1, track); if (info.isNotEmpty) { buffer.write(info); + needsSeparator = true; } } if (p2 != null) { var info = getChoosenTrackTileItem(p2, track); if (info.isNotEmpty) { - buffer.write(_separator); + if (needsSeparator) buffer.write(_separator); buffer.write(info); + needsSeparator = true; } } if (p3 != null && settings.displayThirdItemInEachRow.value) { var info = getChoosenTrackTileItem(p3, track); if (info.isNotEmpty) { - buffer.write(_separator); + if (needsSeparator) buffer.write(_separator); buffer.write(info); + needsSeparator = true; } } return buffer.toString(); diff --git a/lib/youtube/controller/youtube_controller.dart b/lib/youtube/controller/youtube_controller.dart index c91aaf4f..a023fe93 100644 --- a/lib/youtube/controller/youtube_controller.dart +++ b/lib/youtube/controller/youtube_controller.dart @@ -1156,7 +1156,7 @@ class YoutubeController { sizeInBytes: erabaretaStreamSizeInBytes, frameratePrecise: erabaretaStream.fps.toDouble(), creationTimeMS: creationDate?.millisecondsSinceEpoch ?? 0, - durationMS: erabaretaStream.duration.inMilliseconds, + durationMS: erabaretaStream.duration?.inMilliseconds ?? 0, bitrate: erabaretaStream.bitrate, ); } diff --git a/lib/youtube/functions/yt_playlist_utils.dart b/lib/youtube/functions/yt_playlist_utils.dart index bcac473e..8723c90b 100644 --- a/lib/youtube/functions/yt_playlist_utils.dart +++ b/lib/youtube/functions/yt_playlist_utils.dart @@ -618,7 +618,7 @@ extension PlaylistBasicInfoExt on PlaylistBasicInfo { class _DisposableWidget extends StatefulWidget { final Widget child; final void Function() onDispose; - const _DisposableWidget({super.key, required this.child, required this.onDispose}); + const _DisposableWidget({required this.child, required this.onDispose}); @override State<_DisposableWidget> createState() => __DisposableWidgetState(); diff --git a/pubspec.yaml b/pubspec.yaml index 88956dcc..bbf031c9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: namida description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter publish_to: "none" -version: 3.9.12-beta+240815231 +version: 3.9.14-beta+240815231 environment: sdk: ">=3.4.0 <4.0.0"