mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-16 05:13:41 +00:00
fix: download dir config
This commit is contained in:
1 parent
b062336c09
commit
efc9dcca0b
1 file changed
+12
-10
@@ -193,16 +193,18 @@ class AppController extends GetxController {
|
|||||||
extra.bt.trackerSubscribeUrls.addAll(allTrackerSubscribeUrls);
|
extra.bt.trackerSubscribeUrls.addAll(allTrackerSubscribeUrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Util.isDesktop()) {
|
if (config.downloadDir.isEmpty) {
|
||||||
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
if (Util.isDesktop()) {
|
||||||
} else if (Util.isAndroid()) {
|
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
||||||
config.downloadDir = (await getExternalStorageDirectory())?.path ??
|
} else if (Util.isAndroid()) {
|
||||||
(await getApplicationDocumentsDirectory()).path;
|
config.downloadDir = (await getExternalStorageDirectory())?.path ??
|
||||||
return;
|
(await getApplicationDocumentsDirectory()).path;
|
||||||
} else if (Util.isIOS()) {
|
return;
|
||||||
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
} else if (Util.isIOS()) {
|
||||||
} else {
|
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
||||||
config.downloadDir = './';
|
} else {
|
||||||
|
config.downloadDir = './';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user