aboutsummaryrefslogtreecommitdiffstats
path: root/src/Playlist.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-01-20PlayerControl: move functions into the classMax Kellermann1-14/+12
2013-01-09Playlist: move playlist_increment_version_all() into the classMax Kellermann1-2/+2
2013-01-09idle: convert to C++Max Kellermann1-4/+1
2013-01-07Playlist: convert functions to methodsMax Kellermann1-170/+94
2013-01-06queue: convert all functions to methodsMax Kellermann1-36/+27
2013-01-06Playlist: add constructor and destructorMax Kellermann1-15/+0
2013-01-04Playlist: pass max_length to playlist_init()Max Kellermann1-5/+2
Move the configuration lookup to Main.cxx.
2013-01-04player_control.h: convert header to C++Max Kellermann1-1/+1
2013-01-04playlist: convert to C++Max Kellermann1-3/+6
2012-09-25playlist: include cleanupMax Kellermann1-4/+0
2012-08-25player_thread: disable cross-fading in "single" modeMax Kellermann1-7/+10
This commit reimplements the core of the "single" mode. Instead of doing the detection in the playlist code from the outside, it is moved to the player thread, which gets a new option called "border_pause". It will now pause playback exactly at the beginning of the new song, making the feature more reliable. Now that the player thread knows what will happen, it can suppress cross-fading. Fixes mantis tickets 0003055 and 0003166.
2012-08-15player_control: duplicate the song objectMax Kellermann1-4/+5
Make sure the player "owns" the next_song object, so nobody else can free it.
2012-08-15playlist: fix unprotected player_control accessMax Kellermann1-1/+5
2012-08-08player_control: rename attribute "error" to "error_type"Max Kellermann1-1/+1
2012-08-08player_control: rename player_error enum valuesMax Kellermann1-3/+3
2012-08-08player_control: remove unused enum player_error valuesMax Kellermann1-1/+1
2011-01-29copyright year 2011Max Kellermann1-1/+1
2011-01-10player_control: removed the global variable "pc"Max Kellermann1-32/+41
Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
2010-09-28playlist: make single mode 'sticky'Andrew Morgan1-4/+1
2010-09-23playlist: fix "queued" check in playlist_sync()Max Kellermann1-1/+1
The check was meant to fix an assertion failure, but it was the wrong way around. This broke cross-fading most of the time.
2010-06-19playlist: check "queued" before calling playlist_update_queued_song()Max Kellermann1-1/+1
Workaround for an assertion failure.
2010-06-19playlist: protect acess to player state in playlist_sync()Max Kellermann1-2/+7
2010-06-19playlist: move checks out of playlist_sync_with_queue()Max Kellermann1-20/+21
Rename the function to playlist_song_started(), which gets only called if the song has actually started.
2010-06-01playlist: emit IDLE_OPTIONS when resetting single modeMax Kellermann1-0/+2
2010-05-31single mode: at the end of the song, pause on the next song instead of stopRomain Bignon1-9/+10
2010-03-07playlist: fix single+repeat in random modeMax Kellermann1-1/+2
With single+repeat enabled, it is expected that MPD repeats the current song over andd over. With random mode also enabled, this didn't work, because the song order was shuffled internally. This patch adds a special check for this case.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-10-08player_control: no CamelCaseMax Kellermann1-5/+5
2009-10-08playlist_control: "previous" really plays the previous songMax Kellermann1-4/+0
No more CD player emulation. The current behaviour of "previous" is difficult for a client to predict, because it does not definitely know the current position within the song. If a client wants to restart the current song, it can always send "playid".
2009-07-28playlist: CamelCaseIsBadCourtney Cavin1-25/+35
Renamed all playlist functions to non-CamelCase.
2009-07-14playlist: no CamelCaseMax Kellermann1-1/+1
2009-04-25playlist_control: use GTimer in previousSongInPlaylist()Max Kellermann1-0/+4
To determine whether to rewind the current song or to go to the previous song, use a GTimer instead of manually diffing time(NULL).
2009-03-30implemented the 'consume' modeRomain Bignon1-0/+19
Consume mode removes each song played
2009-03-27renamed smartstop to single and changed behaviorRomain Bignon1-7/+16
When single mode is enabled, after current song it stops playback, or it replay same song if repeat mode is activated.
2009-03-27implements the smartstop featureRomain Bignon1-0/+20
The smartstop feature is a way to tell mpd to stop playing after current song. This patche provides: - 'state' command returns 'smartstop' state (1 or 0) - 'smartstop' can activate or not the smartstop state - when song is terminated, mpd stops playing and smartstop is set to 0
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-02-11playlist: don't preserve "current" song after "random" toggleMax Kellermann1-2/+4
When MPD is not playing, it may still remember which is the "current" song. When you switch to "random" mode, MPD will always start playing exactly this song. This defies the goal of "random" mode a little. Clear the "current" song when MPD is not playing during the "random" mode switch.
2009-02-09playlist: fixed "next song" checkVladimir S Eremin1-3/+2
Check if the "current+1" position is actually valid.
2009-02-09playlist: provide information about "next song"Vladimir S Eremin1-0/+15
In random mode, this patch allows clients to see the "next song" in the queue.
2009-02-04playlist: added G_LOG_DOMAINMax Kellermann1-3/+5
Removed the explicit "playlist:" prefix from all log messages.
2009-02-04playlist: pass const playlist pointersMax Kellermann1-6/+6
Pass constant playlist objects to functions which do not modify it.
2009-02-04playlist: moved code to playlist_edit.cMax Kellermann1-369/+0
Moved functions for playlist editing (append, delete, shuffle, move) to playlist_edit.c.
2009-02-04playlist: moved code to playlist_control.cMax Kellermann1-241/+4
Moved handlers for control commands (play, stop, next, prev) to playlist_control.c.
2009-02-04playlist: call syncPlaylistWithQueue() only in the event handlerMax Kellermann1-4/+0
Don't call syncPlaylistWithQueue() in nextSongInPlaylist() and previousSongInPlaylist(). This is a relic from the time when there was no event, and was a workaround to the timing problem.
2009-02-04playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann1-306/+310
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.
2009-02-04playlist: moved code to playlist_state.cMax Kellermann1-134/+3
Moved everything related to saving or loading the playlist from/to the state file to playlist_state.c.
2009-02-04playlist: simplified playlist.queued updatesMax Kellermann1-117/+111
Before every operation which modifies the playlist, remember a pointer to the song struct. After the modification, determine the "next song" again, and if it differs, dequeue and queue the new song. This removes a lot of complexity from the playlist update code, and makes it more robust.
2009-01-30playlist: clear playlist.playing when deleting current songMax Kellermann1-0/+1
This fixes an assertion failure: when the last song in the playlist was playing, and you deleted it, MPD aborted.
2009-01-25playlist: moved is_valid_playlist_name() to stored_playlist.cMax Kellermann1-16/+0