lastmp will die on startup if mpd is in 'Stop' state and has never played a song

Bug #149891 reported by stripwax
2
Affects Status Importance Assigned to Milestone
lastfmsubmitd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: lastfmsubmitd

This is against version 0.35 of lastmp actually but affects other versions too.
I've sent mail to Decklin to report it to him also.

To reproduce:
1. stop any running instance of lastmp

2. using your MPD client, 'stop' the music (not "Pause" but "Stop"). if you don't have a client that does that, just telnet to the control port of the daemon and send "stop" without the quotes

3. make sure you have no mpd clients running at this point

4. once music stops, kill the daemon. don't kill force it, kill it in the regular way so that mpd writes its statefile

5. re-launch the mpd daemon. it will start up in the correct state with music playback stopped

6. launch lastmp. It will die on startup

fix is simple:

In lastmp.py, in function "wake"

replace
    song = Song(self.mpd.do.currentsong())
with
    song = None
    if status.state != 'stop':
        song = Song(self.mpd.do.currentsong())

Daniel T Chen (crimsun)
Changed in lastfmsubmitd:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.