diff options
| author | Yoni Rabkin <yonirabkin@member.fsf.org> | 2014-03-29 00:29:20 -0400 | 
|---|---|---|
| committer | Yoni Rabkin <yonirabkin@member.fsf.org> | 2014-03-29 00:29:20 -0400 | 
| commit | 266048a31cfcce5599e257656cf5d964bef8d59c (patch) | |
| tree | 3265ea8ce19e0b9be9834519614d2a2c44fa20a4 | |
| parent | 0814939bd077c8020e17baaaffff866acf0fc62b (diff) | |
* lisp/emms-librefm-scrobbler.el: Correctly handle the session id.
| -rw-r--r-- | lisp/emms-librefm-scrobbler.el | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emms-librefm-scrobbler.el b/lisp/emms-librefm-scrobbler.el index 0192fb7..bf34790 100644 --- a/lisp/emms-librefm-scrobbler.el +++ b/lisp/emms-librefm-scrobbler.el @@ -4,7 +4,7 @@  ;; Author: Yoni Rabkin <yrk@gnu.org> -;; Keywords: emms, libre.fm +;; Keywords: emms, libre.fm, GNU FM  ;; EMMS is free software; you can redistribute it and/or modify it  ;; under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@    "Debugging variable to store communication.")  (defvar emms-librefm-scrobbler-session-id -  "" +  nil    "Session ID for Libre.fm.")  (defvar emms-librefm-scrobbler-now-playing-url @@ -259,8 +259,8 @@ seconds or half the length of the track."  (defun emms-librefm-scrobbler-enable ()    "Enable the scrobbler and submit played tracks."    (interactive) -  (if (not emms-librefm-scrobbler-session-id) -      (emms-librefm-scrobbler-handshake)) +  (when (not emms-librefm-scrobbler-session-id) +    (emms-librefm-scrobbler-handshake))    (add-hook 'emms-player-started-hook  	    'emms-librefm-scrobbler-start-hook t)    (add-hook 'emms-player-stopped-hook @@ -271,6 +271,7 @@ seconds or half the length of the track."  (defun emms-librefm-scrobbler-disable ()    "Disable the scrobbler and don't submit played tracks."    (interactive) +  (setq emms-librefm-scrobbler-session-id nil)    (remove-hook 'emms-player-started-hook  	       'emms-librefm-scrobbler-start-hook)    (remove-hook 'emms-player-stopped-hook  | 
