diff options
author | Max Kellermann <max@duempel.org> | 2009-02-04 18:56:41 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-04 18:56:41 +0100 |
commit | 8d3205871cf398c4e187bb0d1ead28c46a25a8c1 (patch) | |
tree | d50a3219a796cff081316d9a31d6bb4f9edc2d2c /src/playlist_state.c | |
parent | 1720c7090dc3d590ffe1b5175e175143c09266f8 (diff) | |
download | mpd-8d3205871cf398c4e187bb0d1ead28c46a25a8c1.tar.gz mpd-8d3205871cf398c4e187bb0d1ead28c46a25a8c1.tar.xz mpd-8d3205871cf398c4e187bb0d1ead28c46a25a8c1.zip |
playlist: renamed global "playlist" variable to "g_playlist"
Export the "g_playlist" variable, and pass it to all playlist
functions. This way, we can split playlist.c easier into separate
parts. The code which initializes the singleton variable is moved to
playlist_global.c.
Diffstat (limited to 'src/playlist_state.c')
-rw-r--r-- | src/playlist_state.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/playlist_state.c b/src/playlist_state.c index 7541a353f..1f15ef0b3 100644 --- a/src/playlist_state.c +++ b/src/playlist_state.c @@ -95,13 +95,14 @@ playlist_state_load(FILE *fp, struct playlist *playlist, song = queue_load_song(&playlist->queue, buffer); if (song >= 0 && song == current) { if (state != PLAYER_STATE_STOP) { - playPlaylist(queue_length(&playlist->queue) - 1); + playPlaylist(playlist, queue_length(&playlist->queue) - 1); } if (state == PLAYER_STATE_PAUSE) { playerPause(); } if (state != PLAYER_STATE_STOP) { - seekSongInPlaylist(queue_length(&playlist->queue) - 1, + seekSongInPlaylist(playlist, + queue_length(&playlist->queue) - 1, seek_time); } } @@ -145,9 +146,9 @@ playlist_state_restore(FILE *fp, struct playlist *playlist) if (strcmp (&(buffer[strlen(PLAYLIST_STATE_FILE_REPEAT)]), "1") == 0) { - setPlaylistRepeatStatus(true); + setPlaylistRepeatStatus(playlist, true); } else - setPlaylistRepeatStatus(false); + setPlaylistRepeatStatus(playlist, false); } else if (g_str_has_prefix(buffer, PLAYLIST_STATE_FILE_CROSSFADE)) { setPlayerCrossFade(atoi (& @@ -171,5 +172,5 @@ playlist_state_restore(FILE *fp, struct playlist *playlist) } } - setPlaylistRandomStatus(random_mode); + setPlaylistRandomStatus(playlist, random_mode); } |