Commits


unify IMSG_ERR and IMSG_EOF handling IMSG_ERR needs a playlist_dropcurrent(), but otherwise is just the same as IMSG_EOF: the current song ended and we need to move forward. To unify, set current_song to NULL in playlist_dropcurrent, which make sense since right after it we're not playing anything.


move to the previous song in playlist_dropcurrent() this avoids the player skipping two songs on failure.


update the heuristic: try to keep `current_song', not play_off


keep current song in a dedicated variable playlist.songs[play_off] is not a good representation for the current playing song after all. After a `load' command, or a flush request, the play_off changes but we're still playing the "old" song. This saves the current song in a dedicated variable that's updated upon playlist_advance and playlist_previous, thus givin a more accurate view.


add a heuristic to try to keep the current song after a `load'


add `jump' subcommand to play the first matching


add playlist_swap


add playlist_free


add playlist_push


add next and prev command


drop songs from the playlist on error


fix play_state in playlist_current and advance


fix repeat all The check is useless, the wraparound is already handled in the following line.


initial commit