Greetings

When playing a track with no tags, emms-lastfm-scrobbler.el causes emms to
not advance to the next track in the playlist. Instead, emacs continues
playing the current track, resulting in silence and the track time
continuing to count past the total length of the track.

The cause of the bug is (error "Track title and artist must be known.") on
line 216 in emms-lastfm-scrobbler.el. The error is thrown, causes the emms
stop and finish hooks to face plant, and results in emms never advancing to
the next track.

My solution is rather simple: in emms-lastfm-scrobbler-stop-hook
(emms-lastfm-scrobbler.el, line 267), simply wrap
(emms-lastfm-scrobbler-make-async-submission-call) in an ignore-errors
construct (patch below). If there is a problem submitting the track to
lastfm, we clearly want the rest of emms to continue on its merry way.

Patch:

diff --git a/lisp/emms-lastfm-scrobbler.el b/lisp/emms-lastfm-scrobbler.el
index a2171b8..df8f68e 100644
--- a/lisp/emms-lastfm-scrobbler.el
+++ b/lisp/emms-lastfm-scrobbler.el
@@ -277,8 +277,9 @@ seconds or half the length of the track."
               ;; track must be played for more than 240 secs or
               ;;   half the tracks length, whichever comes first.
               (> emms-playing-time (min 240 (/ track-length 2))))
-         (emms-lastfm-scrobbler-make-async-submission-call
-          current-track nil))))))
+         (ignore-errors
+           (emms-lastfm-scrobbler-make-async-submission-call
+            current-track nil)))))))

 (defun emms-lastfm-scrobbler-enable ()
   "Enable the Last.fm scrobbler and submit the tracks EMMS plays


--
Nicolas Avrutin
_______________________________________________
Emms-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-help

Reply via email to