mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 17:25:32 +00:00
fix ui freeze when download video
This commit is contained in:
parent
204be61303
commit
0805c7417b
2 changed files with 22 additions and 20 deletions
|
|
@ -180,14 +180,16 @@ class M3u8Downloader {
|
|||
|
||||
Future<void> processBytes(File newFile, Uint8List? tsKey, Uint8List? tsIv,
|
||||
int? m3u8Sequence) async {
|
||||
Uint8List bytes = await newFile.readAsBytes();
|
||||
if (tsKey != null) {
|
||||
final index =
|
||||
int.parse(newFile.path.substringAfter("TS_").substringBefore("."));
|
||||
bytes = _aesDecrypt((m3u8Sequence ?? 1) + (index - 1), bytes, tsKey,
|
||||
iv: tsIv);
|
||||
}
|
||||
await Isolate.run(() async {
|
||||
Uint8List bytes = await newFile.readAsBytes();
|
||||
if (tsKey != null) {
|
||||
final index =
|
||||
int.parse(newFile.path.substringAfter("TS_").substringBefore("."));
|
||||
bytes = _aesDecrypt((m3u8Sequence ?? 1) + (index - 1), bytes, tsKey,
|
||||
iv: tsIv);
|
||||
}
|
||||
|
||||
await newFile.writeAsBytes(bytes);
|
||||
await newFile.writeAsBytes(bytes);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
24
pubspec.lock
24
pubspec.lock
|
|
@ -362,10 +362,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: extended_image
|
||||
sha256: "8ad4917eaae7271ce6d975d5c0040c7903010262908fbdb49ff2798fca754d3b"
|
||||
sha256: "69d4299043334ecece679996e47d0b0891cd8c29d8da0034868443506f1d9a78"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.3.0"
|
||||
version: "8.3.1"
|
||||
extended_image_library:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -519,10 +519,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: flutter_inappwebview_windows
|
||||
sha256: b9dd0f4e5f70f324d1311766b4ecb5070c7eb95966cd99b30283e0c93534a869
|
||||
sha256: "0615da4cf9a8d2c0dbe3791e2861fa5b6f72eb60e2e2c4b47d73f0d8922df62a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
version: "0.5.0+1"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
@ -656,10 +656,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: go_router
|
||||
sha256: "5cf5fdcf853b0629deb35891c7af643be900c3dcaed7489009f9e7dbcfe55ab6"
|
||||
sha256: b4c1cce7eda99ff729bb69d10cd7555017a0665f66ca46ee574e6a03785b389d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.8"
|
||||
version: "14.2.9"
|
||||
google_fonts:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1583,10 +1583,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab
|
||||
sha256: a4e5f34f2fadf1fa7b4e69db89189056e313c9c98e8ad420e6b53677b6abc334
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.10"
|
||||
version: "6.3.11"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1719,10 +1719,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
|
||||
sha256: "4d45dc9069dba4619dc0ebd93c7cec5e66d8482cb625a370ac806dcc8165f2ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.5.4"
|
||||
version: "5.5.5"
|
||||
window_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1743,10 +1743,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.1.0"
|
||||
xml:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
Loading…
Reference in a new issue