aboutsummaryrefslogtreecommitdiffstats
path: root/src/Playlist.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-07-11PlaylistEdit: postpone UpdateQueuedSong() when adding multiple songsMax Kellermann1-0/+6
Implement a "bulk" edit mode that postpones both UpdateQueuedSong() and OnModified(). This way, the playlist version gets incremented only once. More importantly: when adding multiple songs to a queue that consists of only one song, the first song that got added will always be played next. By postponing this choice, all newly added songs get a chance to become the next song. Fixes the second (and last) part of Mantis ticket 0004005.
2014-07-11Playlist: randomize next song when enabling "random" mode while not playingMax Kellermann1-1/+3
Don't restore the current song after shufflung when MPD is stopped (but still remembers the current song internally). Fixes the first part of Mantis ticket 0004005.
2014-02-27Playlist*: move to queue/Max Kellermann1-333/+0
2014-01-13copyright year 2014Max Kellermann1-1/+1
2014-01-09DetachedSong: fork of struct SongMax Kellermann1-25/+18
From now on, struct Song will be used by the database only, and DetachedSong will be used by everybody else. DetachedSong is easier to use, but Song has lower overhead.
2013-11-28include cleanup using iwyuMax Kellermann1-1/+0
2013-10-28player_control: rename to PlayerControlMax Kellermann1-10/+10
2013-10-22Playlist: refresh new tags after database updateMax Kellermann1-7/+0
Fixes regression from commit e96779d.
2013-10-22Queue: ModifyAtOrder() does not increment versionMax Kellermann1-0/+1
Leave that to the caller, allowing it to modify multiple items at a time.
2013-10-22Playlist: copy stream tags from the PlayerThreadMax Kellermann1-2/+7
Finally restores an important feature that has been broken for several months when the PlayerThread started working with Song copies instead of pointers to the Queue's Song instances (commit e96779d).
2013-10-19*: use references instead of pointersMax Kellermann1-36/+36
2013-10-17Song: GetURI() returns std::stringMax Kellermann1-11/+10
2013-10-02Log: new logging library APIMax Kellermann1-5/+5
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-10-02Playlist*: use nullptr instead of NULLMax Kellermann1-3/+3
2013-09-27PlayerControl: use strictly typed enumsMax Kellermann1-6/+6
2013-07-28song: convert header to C++Max Kellermann1-11/+10
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