diff options
author | William Xu <william.xwl@gmail.com> | 2008-02-16 09:00:00 +0000 |
---|---|---|
committer | William Xu <william.xwl@gmail.com> | 2008-02-16 09:00:00 +0000 |
commit | db742d675bfd2422fa8b3e597c46f8cbd275b29a (patch) | |
tree | 6677f60cb8c05650a3d40e4cb2a8b10109875d3c | |
parent | 5198c20b9fe58a7a167078b2aea1e952585dd268 (diff) |
(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
-rw-r--r-- | emms-lastfm.el | 5 |
1 files 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 |