summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d636c08)
raw | patch | inline | side by side (parent: d636c08)
author | Max Kellermann <max@duempel.org> | |
Tue, 29 Sep 2009 16:37:19 +0000 (18:37 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Tue, 29 Sep 2009 16:37:19 +0000 (18:37 +0200) |
The ENABLE_SONG_ID option has been enabled for ages.
src/mpdclient.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index a688162a1832640f0938051d4b1a08afe90e6176..22a1d82e9c867c56d07c17f76683bef6a6500683 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
#undef ENABLE_FANCY_PLAYLIST_MANAGMENT_CMD_ADD /* broken with song id's */
#define ENABLE_FANCY_PLAYLIST_MANAGMENT_CMD_DELETE
#define ENABLE_FANCY_PLAYLIST_MANAGMENT_CMD_MOVE
-#define ENABLE_SONG_ID
#define ENABLE_PLCHANGES
#define BUFSIZE 1024
gint
mpdclient_cmd_play(struct mpdclient *c, gint idx)
{
-#ifdef ENABLE_SONG_ID
struct mpd_song *song = playlist_get_song(c, idx);
if (MPD_ERROR(c))
mpd_send_play_id(c->connection, mpd_song_get_id(song));
else
mpd_send_play(c->connection);
-#else
- if (MPD_ERROR(c))
- return -1;
- mpd_sendPlayCommand(c->connection, idx);
-#endif
c->need_update = TRUE;
return mpdclient_finish_command(c);
}
song = playlist_get(&c->playlist, idx);
/* send the delete command to mpd */
-#ifdef ENABLE_SONG_ID
mpd_send_delete_id(c->connection, mpd_song_get_id(song));
-#else
- mpd_send_delete(c->connection, idx);
-#endif
if( (retval=mpdclient_finish_command(c)) )
return retval;
song2 = playlist_get(&c->playlist, new_index);
/* send the move command to mpd */
-#ifdef ENABLE_SONG_ID
mpd_send_swap_id(c->connection,
mpd_song_get_id(song1), mpd_song_get_id(song2));
-#else
- mpd_send_move(c->connection, old_index, new_index);
-#endif
if( (n=mpdclient_finish_command(c)) )
return n;