New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Song-number "None" is sent to client #69

Closed
sandos opened this Issue Mar 8, 2011 · 4 comments

Comments

2 participants
@sandos

sandos commented Mar 8, 2011

This is an excerpt from my log when connecting with mpdroid.

DEBUG 2011-03-08 21:02:03,837 [28918:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:44780:
volume: 68
repeat: 0
random: 1
single: 0
consume: 1
playlist: 5043
playlistlength: 114
xfade: 0
state: stop
song: None
songid: 4866
OK

As you can see the song is "None". This happens to crash mpdroid (which I intend to fix), but it seems this might be a bug still. This is what the spec says:

"The song, songid, time, bitrate, audio, updating_db, error, nextsong and nextsongid lines are omitted if no appropriate value is available."

@sandos

This comment has been minimized.

sandos commented Mar 8, 2011

If I issue a status with MPC it does not see "None", while mpdroid continues seeing that:
(83.x is mpdroid, 10.x is mpc)

DEBUG 2011-03-08 21:24:00,839 [28918:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:56586:
volume: 68
repeat: 0
random: 1
single: 0
consume: 1
playlist: 5043
playlistlength: 114
xfade: 0
state: stop
song: None
songid: 4866
OK
INFO 2011-03-08 21:24:01,082 [28918:MpdThread] mopidy.frontends.mpd.server
MPD client connection from [::ffff:10.32.0.2]:53726
DEBUG 2011-03-08 21:24:01,083 [28918:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:10.32.0.2]:53726: OK MPD 0.16.0
DEBUG 2011-03-08 21:24:01,089 [28918:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:10.32.0.2]:53726: password "getoutlozer"
DEBUG 2011-03-08 21:24:01,090 [28918:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:10.32.0.2]:53726: OK
DEBUG 2011-03-08 21:24:01,092 [28918:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:10.32.0.2]:53726: command_list_ok_begin
DEBUG 2011-03-08 21:24:01,096 [28918:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:10.32.0.2]:53726: status
DEBUG 2011-03-08 21:24:01,099 [28918:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:10.32.0.2]:53726: currentsong
DEBUG 2011-03-08 21:24:01,103 [28918:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:10.32.0.2]:53726: command_list_end
DEBUG 2011-03-08 21:24:01,120 [28918:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:10.32.0.2]:53726:
volume: 68
repeat: 0
random: 1
single: 0
consume: 1
playlist: 5043
playlistlength: 114
xfade: 0
state: stop
song: None
songid: 4866
list_OK
file: spotify:track:3ISuAelRbGr2Z5XTFsHxOA
Time: 262
Artist: Alter Bridge
Title: Breathe Again
Album: AB III
Date: 2010-01-01
Track: 11
list_OK
OK
DEBUG 2011-03-08 21:23:59,209 [28918:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:83.182.79.55]:56586: status
DEBUG 2011-03-08 21:23:59,224 [28918:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:56586:
volume: 68
repeat: 0
random: 1
single: 0
consume: 1
playlist: 5043
playlistlength: 114
xfade: 0
state: stop
song: None
songid: 4866
OK

@sandos

This comment has been minimized.

sandos commented Mar 8, 2011

Also, I found a reliable way of redproducing this with mpdroid: simply switch to a new playlist, if Song is not None, switch to yet another playlist ("add and replace"). I think this is the "transition" from correc to broken:

DEBUG 2011-03-08 22:07:10,691 [13903:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:40479:
volume: 100
repeat: 0
random: 0
single: 0
consume: 0
playlist: 33
playlistlength: 32
xfade: 0
state: play
song: 1
songid: 2
time: 22:199
elapsed: 22745
bitrate: 320
OK
DEBUG 2011-03-08 22:07:10,784 [13903:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:83.182.79.55]:40479: stop
DEBUG 2011-03-08 22:07:10,794 [13903:GStreamerPlayerThread] mopidy.outputs.gstreamer
Setting GStreamer state to READY: OK
DEBUG 2011-03-08 22:07:10,797 [13903:MainThread] mopidy.backends.base
Changing state: playing -> stopped
DEBUG 2011-03-08 22:07:10,800 [13903:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:40479: OK
DEBUG 2011-03-08 22:07:10,894 [13903:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:83.182.79.55]:40479: clear
DEBUG 2011-03-08 22:07:10,898 [13903:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:40479: OK
DEBUG 2011-03-08 22:07:11,064 [13903:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:83.182.79.55]:40479: load "dist"
DEBUG 2011-03-08 22:07:11,079 [13903:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:40479: OK
DEBUG 2011-03-08 22:07:11,194 [13903:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:83.182.79.55]:40479: play
DEBUG 2011-03-08 22:07:11,199 [13903:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:40479: OK
DEBUG 2011-03-08 22:07:11,304 [13903:MpdThread] mopidy.frontends.mpd.session
Input from [::ffff:83.182.79.55]:40479: status
DEBUG 2011-03-08 22:07:11,318 [13903:MpdThread] mopidy.frontends.mpd.session
Output to [::ffff:83.182.79.55]:40479:
volume: 100
repeat: 0
random: 0
single: 0
consume: 0
playlist: 84
playlistlength: 50
xfade: 0
state: stop
song: None
songid: 2
OK

@jodal

This comment has been minimized.

Member

jodal commented Apr 6, 2011

I believe this bug to be fixed by commit 342c13f.

@jodal

This comment has been minimized.

Member

jodal commented Apr 6, 2011

I should also say: Great bug report! With the help of what you've reported here it was trivial to create a test that reproduced the error. Thanks :-)

@ghost ghost assigned jodal Apr 10, 2011

@jodal jodal closed this Apr 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment