diff --git a/lib/controller/thumbnail_manager.dart b/lib/controller/thumbnail_manager.dart index 454f8b62..e27b679e 100644 --- a/lib/controller/thumbnail_manager.dart +++ b/lib/controller/thumbnail_manager.dart @@ -418,10 +418,9 @@ class _YTThumbnailDownloadManager with PortsProvider { if (notfound == true) throw Exception('not found'); // as if request failed. File? newFile; + final downloadStream = response.asBroadcastStream(); - await for (final e in downloadStream) { - fileStream.add(e); - } + await fileStream.addStream(downloadStream); // this should throw if connection closed unexpectedly await fileStream.flush(); await fileStream.close(); // this is already done by diposeIdRequestResources() but we do here bcz renaming can require that no processes are using the file diff --git a/pubspec.yaml b/pubspec.yaml index 5f31bfe1..189e6a4f 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: 4.6.63-beta+241105210 +version: 4.6.64-beta+241105210 environment: sdk: ">=3.4.0 <4.0.0"