;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun media/player-error ()
+ (message "Player error")
+ (setq media/current-information nil)
+ (media/remove-highlight))
+
+(defun media/song-terminates ()
+ (with-current-buffer media/buffer
+ (if media/continue-mode (media/play-next t)
+ (setq media/current-information nil)
+ (media/remove-highlight))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
(defun media/switch-continue-mode ()
"Switches between a mode which automatically chains files and a mode
which stops when the songs ends."
(message "Continue mode switched off."))
)
-(defun media/player-error ()
- (message "Player error")
- (media/remove-highlight))
-
-(defun media/song-terminates ()
- (with-current-buffer media/buffer
- (if media/continue-mode (media/play-next t)
- (media/remove-highlight))))
-
(defun media/duration-to-string (duration)
(let ((sec (mod duration 60))
(min (/ duration 60)))