projects
/
elisp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
497efe7
)
Reset media/current-information when the song terminates (or if there is a player...
author
Francois Fleuret
<francois@fleuret.org>
Tue, 10 Mar 2015 14:04:38 +0000
(15:04 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 10 Mar 2015 14:04:38 +0000
(15:04 +0100)
media.el
patch
|
blob
|
history
diff --git
a/media.el
b/media.el
index
d10e96f
..
25b19ec
100644
(file)
--- a/
media.el
+++ b/
media.el
@@
-870,6
+870,19
@@
the 'Queue' playlist, and plays it if no song is currently playing."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(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."
(defun media/switch-continue-mode ()
"Switches between a mode which automatically chains files and a mode
which stops when the songs ends."
@@
-880,15
+893,6
@@
which stops when the songs ends."
(message "Continue mode switched off."))
)
(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)))
(defun media/duration-to-string (duration)
(let ((sec (mod duration 60))
(min (/ duration 60)))