diff options
author | Thanos Apollo <[email protected]> | 2024-06-08 09:08:34 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-06-09 23:52:53 +0300 |
commit | 755d6051ac9cc43e9234de589c4c1661cb7cf1ec (patch) | |
tree | 26873a30c02b10a111fd509f0ae72218e28b4f29 | |
parent | dfcbb8498b30b83d6f97d5777603d5f2dce39298 (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.
-rw-r--r-- | yeetube.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |