aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.py
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-11-10 04:30:14 +0000
committernathansmithsmith <nathansmith7@mailfence.com>2023-11-10 04:30:14 +0000
commitc0bd1ca2348d568b7f34081b09bc4e53baaff749 (patch)
tree5e9c64dd3195c05f36783cab8cd878a364da0322 /src/util.py
parent40b98d98f8dcc7b8a6da46e825d667989a436c67 (diff)
downloadyouload-c0bd1ca2348d568b7f34081b09bc4e53baaff749.tar.gz
youload-c0bd1ca2348d568b7f34081b09bc4e53baaff749.tar.bz2
youload-c0bd1ca2348d568b7f34081b09bc4e53baaff749.zip
App somewhat working on android
Diffstat (limited to 'src/util.py')
-rw-r--r--src/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.py b/src/util.py
new file mode 100644
index 0000000..4b82c77
--- /dev/null
+++ b/src/util.py
@@ -0,0 +1,9 @@
+import os
+from kivy.utils import platform
+
+def get_default_download_dir() -> str:
+ if platform == "android":
+ return "/sdcard/Download"
+ else:
+ from pathlib import Path
+ return os.path.join(str(Path.home()), "Downloads")