From: Steve Purcell Date: Sat, 28 Dec 2013 17:34:01 +0000 (+0000) Subject: Allow user configuration of download directory X-Git-Tag: v0.1~8 X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=5ea38a0355a6cb6579bf88cf26a0c5ae9dd89766;p=iplayer-el.git Allow user configuration of download directory --- diff --git a/iplayer.el b/iplayer.el index b134ccf..7e1726b 100644 --- a/iplayer.el +++ b/iplayer.el @@ -25,6 +25,17 @@ ;; convenient interface to BBC iPlayer. ;;; Code: + +(defgroup iplayer nil + "Browse and download BBC TV/radio shows." + :prefix "iplayer-" + :group 'applications) + +(defcustom iplayer-download-directory "~/iPlayer/" + "Directory into which shows will be downloaded." + :group 'iplayer + :type 'directory) + (defvar iplayer-updating-cache-process nil) (defvar iplayer-updating-cache-sentinel-info nil) (defvar iplayer-updating-cache-sentinel-executing nil) @@ -192,7 +203,7 @@ The presets are defined in the variable `iplayer-presets'." (interactive) (let ((id (get-text-property (point) 'iplayer-id))) (if id - (let ((default-directory "~/iPlayer/")) + (let ((default-directory iplayer-download-directory)) ;; should probably use a process filter instead to give us a ;; progress bar (message "downloading id %s" id)