mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 17:25:32 +00:00
Update download_provider.dart
Move the getDirectory() call out of the for loop to enhance performance.
This commit is contained in:
parent
b6ff9fe141
commit
46526c6b6b
1 changed files with 1 additions and 1 deletions
|
|
@ -240,8 +240,8 @@ Future<void> downloadChapter(
|
|||
if (!cbzFileExist && itemType == ItemType.manga ||
|
||||
!mp4FileExist && itemType == ItemType.anime ||
|
||||
!htmlFileExist && itemType == ItemType.novel) {
|
||||
final mainDirectory = (await storageProvider.getDirectory())!;
|
||||
for (var index = 0; index < pageUrls.length; index++) {
|
||||
final mainDirectory = (await storageProvider.getDirectory())!;
|
||||
if (Platform.isAndroid) {
|
||||
if (!(await File(p.join(mainDirectory.path, ".nomedia")).exists())) {
|
||||
await File(p.join(mainDirectory.path, ".nomedia")).create();
|
||||
|
|
|
|||
Loading…
Reference in a new issue