Christophe Weblog Wiki Code Publications Music
Allow user configuration of download directory
authorSteve Purcell <steve@sanityinc.com>
Sat, 28 Dec 2013 17:34:01 +0000 (17:34 +0000)
committerSteve Purcell <steve@sanityinc.com>
Sat, 28 Dec 2013 17:56:38 +0000 (17:56 +0000)
iplayer.el

index b134ccf6be43c4554cc180ab9a02a151fc186cb5..7e1726bf66cc49e828a91c0a4384f0ae9efd58fa 100644 (file)
 ;; convenient interface to BBC iPlayer.
 
 ;;; Code:
 ;; 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)
 (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
   (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)
           ;; should probably use a process filter instead to give us a
           ;; progress bar
           (message "downloading id %s" id)