(defgroup media ()
"Major mode to control media players"
- :version "1.2.1")
+ :version "1.2.2")
(defcustom media/player-api "media-mplayer"
"The file to load for the abstract layer with the media player."
:type 'boolean
:group 'media)
+(defcustom media/continue-mode-hint "*"
+ "What to append to the MPlayer string when in repeat mode"
+ :type 'string
+ :group 'media)
+
(defcustom media/expert nil
- "Should the keymap help be shown?"
+ "Should we bypass the keymap help when starting"
:type 'boolean
:group 'media)
(title (or (and (consp c) (cdr c)) url)))
(if (string-match "^\\(http\\|mms\\)://" url)
(media/insert-url (cons url title) 0)
- (if (file-regular-p url) (media/insert-file url 0)
- (if (file-directory-p url) (media/insert-dir url 0)
- (error "Unknown type `%s'" url))))))
+ (if (file-exists-p url)
+ (if (file-regular-p url) (media/insert-file url 0)
+ (if (file-directory-p url) (media/insert-dir url 0)
+ (error "Unknown type `%s'" url))))
+ )))
list))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(push (cons url (cons title time)) (cdr (assoc playlist list)))
)))))
- (save-excursion
- (set-buffer (find-file-noselect media/playlist-file))
+ (with-current-buffer (find-file-noselect media/playlist-file)
(erase-buffer)
(mapc (lambda (x)
(insert "PLAYLIST:" (car x) "\n")
(propertize "\n" 'playlist name)
)
(setq media/active-playlist name)
- (message "Playlist `%s' created" name)))
+ ;; (message "Playlist `%s' created" name)
+ ))
(defun media/playlist-position (name)
"Returns the position where the given playlist starts."
(concat
" "
media/player-id
- (if media/continue-mode "*")
+ (if media/continue-mode media/continue-mode-hint)
" "
(if media/current-information