Code: Select all
--- src/command.c 2014-04-02 05:31:59.604298122 +0200
+++ src/command.c 2014-04-02 05:34:24.435358877 +0200
@@ -310,9 +310,13 @@
int cmd_play ( int argc, char ** argv, struct mpd_connection *conn )
{
int song;
-
- if(0==argc) song = -1;
- else {
+ struct mpd_status *status = getStatus(conn);
+
+ if (0==argc) { song = -1;
+ if (mpd_status_get_state(status) == MPD_STATE_PLAY) {
+ if (!mpd_run_seek_id(conn, mpd_status_get_song_id(status), 0))
+ printErrorAndExit(conn); }
+ } else {
for (int i = 0; i < argc - 1; ++i)
printf("skipping: %s\n",argv[i]);