From db742d675bfd2422fa8b3e597c46f8cbd275b29a Mon Sep 17 00:00:00 2001 From: William Xu Date: Sat, 16 Feb 2008 09:00:00 +0000 Subject: (emms-lastfm-submit-now-playing): Set track-length to 0 when info-playing-time is unset, so that `number-to-string' won't raise an error. darcs-hash:20080216090004-cfa61-62ea04a64f023407b119cd47318b9edde87e2b70.gz --- emms-lastfm.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/emms-lastfm.el b/emms-lastfm.el index 63e7497..4fb851a 100644 --- a/emms-lastfm.el +++ b/emms-lastfm.el @@ -203,8 +203,9 @@ These will be displayed on the user's last.fm page." 'info-tracknumber)) (musicbrainz-id "") (track-length (number-to-string - (emms-track-get emms-lastfm-current-track - 'info-playing-time)))) + (or (emms-track-get emms-lastfm-current-track + 'info-playing-time) + 0)))) ;; wait up to 5 seconds to submit np infos in order to finish handshaking. (dotimes (i 5) (when (not (and emms-lastfm-session-id -- cgit v1.2.3