'Returns some status information for use with an
implementation of cmd_status.
Gives a list of response-lines for: volume, repeat, random,
playlist, playlistlength, and xfade.'

def cmd_status(self, conn):

    (yield ((u'volume:    ' + six.text_type(self.volume)), (u'repeat:    ' + six.text_type(int(self.repeat))), (u'random:    ' + six.text_type(int(self.random))), (u'playlist:    ' + six.text_type(self.playlist_version)), (u'playlistlength:    ' + six.text_type(len(self.playlist))), (u'xfade:    ' + six.text_type(self.crossfade))))
    if (self.current_index == (-1)):
        state = u'stop'
    elif self.paused:
        state = u'pause'
    else:
        state = u'play'
    (yield (u'state:    ' + state))
    if (self.current_index != (-1)):
        current_id = self._item_id(self.playlist[self.current_index])
        (yield (u'song:    ' + six.text_type(self.current_index)))
        (yield (u'songid:    ' + six.text_type(current_id)))
    if self.error:
        (yield (u'error:    ' + self.error))
