aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-23 00:10:50 +0100
committerMax Kellermann <max@duempel.org>2009-01-23 00:10:50 +0100
commite5c323fd57808826613ad889e1cbd1c34590b633 (patch)
tree88a27cc88b6d97396668ef715e8b17a9d6f4b337
parent9da7ae02f06cfd90897b6e0c87619f546675b2e9 (diff)
downloadmpd-e5c323fd57808826613ad889e1cbd1c34590b633.tar.gz
mpd-e5c323fd57808826613ad889e1cbd1c34590b633.tar.xz
mpd-e5c323fd57808826613ad889e1cbd1c34590b633.zip
playlist: removed stopOnError flag from playPlaylist()
All callers pass false. Don't bother to collect that parameter.
Diffstat (limited to '')
-rw-r--r--src/command.c4
-rw-r--r--src/playlist.c12
-rw-r--r--src/playlist.h4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/command.c b/src/command.c
index 529f3ac1d..27d34c0a3 100644
--- a/src/command.c
+++ b/src/command.c
@@ -388,7 +388,7 @@ handle_play(struct client *client, int argc, char *argv[])
if (argc == 2 && !check_int(client, &song, argv[1], need_positive))
return COMMAND_RETURN_ERROR;
- result = playPlaylist(song, 0);
+ result = playPlaylist(song);
return print_playlist_result(client, result);
}
@@ -401,7 +401,7 @@ handle_playid(struct client *client, int argc, char *argv[])
if (argc == 2 && !check_int(client, &id, argv[1], need_positive))
return COMMAND_RETURN_ERROR;
- result = playPlaylistById(id, 0);
+ result = playPlaylistById(id);
return print_playlist_result(client, result);
}
diff --git a/src/playlist.c b/src/playlist.c
index 2b8af836d..9e44add67 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -224,7 +224,7 @@ static void loadPlaylistFromStateFile(FILE *fp, char *buffer,
if (addToPlaylist(temp, NULL) == PLAYLIST_RESULT_SUCCESS
&& current == song) {
if (state != PLAYER_STATE_STOP) {
- playPlaylist(queue_length(&playlist.queue) - 1, 0);
+ playPlaylist(queue_length(&playlist.queue) - 1);
}
if (state == PLAYER_STATE_PAUSE) {
playerPause();
@@ -681,7 +681,7 @@ static void playPlaylistOrderNumber(int orderNum)
playlist.current = orderNum;
}
-enum playlist_result playPlaylist(int song, int stopOnError)
+enum playlist_result playPlaylist(int song)
{
unsigned i = song;
@@ -718,26 +718,26 @@ enum playlist_result playPlaylist(int song, int stopOnError)
}
}
- playlist_stopOnError = stopOnError;
+ playlist_stopOnError = false;
playlist_errorCount = 0;
playPlaylistOrderNumber(i);
return PLAYLIST_RESULT_SUCCESS;
}
-enum playlist_result playPlaylistById(int id, int stopOnError)
+enum playlist_result playPlaylistById(int id)
{
int song;
if (id == -1) {
- return playPlaylist(id, stopOnError);
+ return playPlaylist(id);
}
song = song_id_to_position(id);
if (song < 0)
return PLAYLIST_RESULT_NO_SUCH_SONG;
- return playPlaylist(song, stopOnError);
+ return playPlaylist(song);
}
static void playPlaylistIfPlayerStopped(void);
diff --git a/src/playlist.h b/src/playlist.h
index 5e0b84c5e..beb26a767 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -118,9 +118,9 @@ enum playlist_result playlistId(struct client *client, int song);
void stopPlaylist(void);
-enum playlist_result playPlaylist(int song, int stopOnError);
+enum playlist_result playPlaylist(int song);
-enum playlist_result playPlaylistById(int song, int stopOnError);
+enum playlist_result playPlaylistById(int song);
void nextSongInPlaylist(void);