aboutsummaryrefslogtreecommitdiffstats
path: root/yeetube.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-06-08 09:08:34 +0300
committerThanos Apollo <[email protected]>2024-06-09 23:52:53 +0300
commit755d6051ac9cc43e9234de589c4c1661cb7cf1ec (patch)
tree26873a30c02b10a111fd509f0ae72218e28b4f29 /yeetube.el
parentdfcbb8498b30b83d6f97d5777603d5f2dce39298 (diff)
[fix] Use xdg to get download dir
Fix issues for users that use non-english name for their download dir, default to $HOME if download dir does not exist.
Diffstat (limited to 'yeetube.el')
-rw-r--r--yeetube.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/yeetube.el b/yeetube.el
index 8c49b83..a292ad3 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -44,6 +44,7 @@
(require 'socks)
(require 'url-handlers)
(require 'mm-decode)
+(require 'xdg)
(require 'yeetube-mpv)
@@ -75,7 +76,7 @@
(const :tag "WAV" "wav"))
:group 'yeetube)
-(defcustom yeetube-download-directory (expand-file-name "Downloads" "~")
+(defcustom yeetube-download-directory (or (xdg-user-dir "DOWNLOAD") (getenv "HOME"))
"Default directory to downlaod videos."
:type 'string
:group 'yeetube)