diff options
-rw-r--r-- | livie.el | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -458,13 +458,18 @@ If ARG is given, make a new search." (if (equal (livie--get-entry-type (livie-get-current-video)) 'video) (let* ((video (livie-get-current-video)) (id (livie-video-id video)) - (quality-arg "") - (quality-val (completing-read "Max height resolution (0 for unlimited): " - '("0" "240" "360" "480" "720" "1080") + (quality-val (completing-read "Max height resolution for default is 480 (0 for unlimited): " + '("default" "0" "240" "360" "480" "720" "1080") nil nil))) - (setq quality-val (string-to-number quality-val)) - (when (< 0 quality-val) + + (if (not (equal quality-val "default")) + (setq quality-val (string-to-number quality-val)) + (setq quality-val 480)) + + (if (equal quality-val 0) + (setq quality-arg "") (setq quality-arg (format "--ytdl-format=[height<=?%s]" quality-val))) + (start-process "livie-mpv" nil "mpv" (format "https://www.youtube.com/watch?v=%s" id) quality-arg) (message "Opening [youtube] %s with height≤%s with mpv..." id quality-val)) (message "It's not a video"))) |