aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-21 16:17:57 +0100
committerMax Kellermann <max@duempel.org>2009-01-21 16:17:57 +0100
commit5541015ac6c0ef686556a303221f3b5250e49e5f (patch)
tree3199e8f4744808f7ef296236178ece9c524d874a
parent699b31178dd5882fa474946b6ca16d8d0d9daff0 (diff)
downloadmpd-5541015ac6c0ef686556a303221f3b5250e49e5f.tar.gz
mpd-5541015ac6c0ef686556a303221f3b5250e49e5f.tar.xz
mpd-5541015ac6c0ef686556a303221f3b5250e49e5f.zip
command: don't restart player in the "status" command
Don't attempt to restart the player if it was stopped, but there were still songs left on the playlist. This looks like it has been a workaround for a bug which has been fixed long time ago.
-rw-r--r--src/command.c1
-rw-r--r--src/playlist.c4
-rw-r--r--src/playlist.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/command.c b/src/command.c
index 1c4cb4ee0..529f3ac1d 100644
--- a/src/command.c
+++ b/src/command.c
@@ -451,7 +451,6 @@ handle_status(struct client *client,
int updateJobId;
int song;
- playPlaylistIfPlayerStopped();
switch (getPlayerState()) {
case PLAYER_STATE_STOP:
state = "stop";
diff --git a/src/playlist.c b/src/playlist.c
index 3582dfd98..5d17f8cb9 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -861,6 +861,8 @@ enum playlist_result playPlaylistById(int id, int stopOnError)
return playPlaylist(song, stopOnError);
}
+static void playPlaylistIfPlayerStopped(void);
+
void syncPlayerAndPlaylist(void)
{
if (playlist_state != PLAYLIST_STATE_PLAY)
@@ -911,7 +913,7 @@ void nextSongInPlaylist(void)
}
}
-void playPlaylistIfPlayerStopped(void)
+static void playPlaylistIfPlayerStopped(void)
{
if (getPlayerState() == PLAYER_STATE_STOP) {
enum player_error error = getPlayerError();
diff --git a/src/playlist.h b/src/playlist.h
index 251297c4f..a2531963b 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -149,8 +149,6 @@ int getPlaylistLength(void);
unsigned long getPlaylistVersion(void);
-void playPlaylistIfPlayerStopped(void);
-
enum playlist_result seekSongInPlaylist(unsigned song, float seek_time);
enum playlist_result seekSongInPlaylistById(unsigned id, float seek_time);