aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emms-lastfm.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/emms-lastfm.el b/emms-lastfm.el
index 402021e..a9308a8 100644
--- a/emms-lastfm.el
+++ b/emms-lastfm.el
@@ -114,8 +114,10 @@ the current track, too."
(progn
(add-hook 'emms-player-started-hook
'emms-lastfm-handshake-if-needed)
+ ;; Has to be appended, because it has to run after
+ ;; `emms-playing-time-start'
(add-hook 'emms-player-started-hook
- 'emms-lastfm-new-track-function)
+ 'emms-lastfm-new-track-function t)
(add-hook 'emms-player-stopped-hook
'emms-lastfm-cancel-timer)
(add-hook 'emms-player-paused-hook
@@ -126,9 +128,9 @@ the current track, too."
(remove-hook 'emms-player-started-hook
'emms-lastfm-new-track-function)
(remove-hook 'emms-player-stopped-hook
- 'emms-lastfm-pause)
- (remove-hook 'emms-player-paused-hook
'emms-lastfm-cancel-timer)
+ (remove-hook 'emms-player-paused-hook
+ 'emms-lastfm-pause)
(cancel-timer emms-lastfm-timer)
(setq emms-lastfm-md5-challenge nil
emms-lastfm-submit-url nil
@@ -136,7 +138,6 @@ the current track, too."
emms-lastfm-current-track nil)
(message "EMMS Last.fm plugin deactivated."))))
-
(defun read-line ()
(buffer-substring-no-properties (line-beginning-position)
(line-end-position)))