Commit Graph

178 Commits

Author SHA1 Message Date
Max Kellermann 71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann 71ce1a25dd SongPrint: remove Storage::MapToRelativeUTF8() call
This code (added 7 years ago with commit b233c145f) has been obsoleted
by the SongLoader class (added 3 years ago).
2017-02-24 13:56:13 +01:00
Max Kellermann f689e28958 SongLoader: return instance, not pointer 2017-02-08 10:02:08 +01:00
Max Kellermann 7a185f1ead queue/PlaylistUpdate: assert Database::GetSong()!=nullptr 2017-02-08 09:53:14 +01:00
Max Kellermann 03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Eugene Baklanov bd14afe347 Fix for priority order bug if reordering in SetRandom()
Fix for the problem where order with priorities gets out of whack in case it's
reordered by SetRandom() while another song is currently playing.
What happens is, if some song is already playing and you have set some
priorities before switching on the random mode, and then turn the mode on, the
original code swaps position of the first song in the order (i.e., the highest
priority song) with current, so that current is 0 (which it should be). The
problem is, the "original" first song then goes to the place "current" song was
after reordering, wherever that is, instead of going after the "current" song.
This patch fixes the issue.
Also the fix makes MoveOrder() public, because why shouldn't it be, anyway.  It
certainly makes more sense than just having SwapOrders() public for some
reason.

Signed-off-by: Eugene Baklanov <miltenfiremage@gmail.com>
2017-01-04 10:10:27 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann ae7e25ea65 Merge tag 'v0.19.20'
release v0.19.20
2016-12-09 20:18:54 +01:00
Max Kellermann e7353ec7e7 Queue: "setprio" re-enqueues old song if priority has been raised
This commit changes a minor queue priority design to something which
makes a little bit more sense.

Previously, a song that had already been played would only be
re-enqueued if its priority had just been raised above the current
song's.  This means that if it was already above, it was not
re-enqueued.  That is a surprising behavior, because users expect a
song to be played when its priority is raised.

Now the song is always re-enqueued if its priority is raised (and
above the current song's - no matter if it has already been above
before).

 https://bugs.musicpd.org/view.php?id=4592
2016-12-09 13:02:26 +01:00
Max Kellermann 22dcca9832 util/Error: remove obsolete class 2016-11-10 12:58:26 +01:00
Max Kellermann 90a14e14f4 db/simple/Save: migrate from class Error to C++ exceptions 2016-10-29 09:45:34 +02:00
Max Kellermann ed68fd4ab3 queue/PlaylistUpdate: include cleanup 2016-10-27 22:19:26 +02:00
Max Kellermann 6961bd61ca LocateUri: migrate from class Error to C++ exceptions 2016-10-27 22:04:41 +02:00
Max Kellermann 6e52ab285a player/Control: use class Error as C++ exception, throw it 2016-09-08 12:07:22 +02:00
Max Kellermann aca081557a queue/PlaylistControl: use PlaylistError::NotPlaying() 2016-09-05 20:37:24 +02:00
Max Kellermann a71efacd1e queue/PlaylistControl: fix return value in PlayNext(), PlayPrevious()
Failure must be indicated by returning false.
2016-09-05 19:21:23 +02:00
Max Kellermann 2fd5182608 db/Interface: GetSong() throws exception on error 2016-03-19 00:19:50 +01:00
Max Kellermann 7ad7caa2ae queue/PlaylistUpdate: extend catch clause 2016-03-19 00:19:47 +01:00
Max Kellermann 06c172838c queue/PlaylistUpdate: catch and ignore DatabaseError
Fixes regression by commit 42f7df96
2016-03-18 18:25:16 +01:00
Max Kellermann 1543dd85b5 queue/Playlist: don't let StaleSong() interrupt playback
http://bugs.musicpd.org/view.php?id=4470
2016-03-18 18:08:13 +01:00
Max Kellermann f37a1026f9 queue/Playlist: rename DeleteSong() to StaleSong() 2016-03-18 18:01:01 +01:00
Max Kellermann 91fb7fa3d8 queue/Playlist: pass unsigned to PlayOrder() 2016-03-18 17:49:29 +01:00
Max Kellermann 7b70153068 queue/Playlist: document that current/queued are "order number" 2016-03-18 17:35:29 +01:00
Max Kellermann 9a9b6fa326 queue/Playlist: add interface QueueListener, replacing calls to idle_add() 2016-03-10 20:10:14 +01:00
Max Kellermann ba43ec5759 queue/Playlist: remove redundant "struct" keyword 2016-03-10 20:03:45 +01:00
Max Kellermann 008a9560fe queue/Playlist: call OnModified(), eliminate duplicate code 2016-03-10 20:03:01 +01:00
Max Kellermann 1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann fb547260d1 player/Control: Play*() returns Error information 2016-02-28 13:31:41 +01:00
Max Kellermann 2065e32904 queue/PlaylistControl: clear "queued" before calling LockSeek()
This is necessary to avoid an assertion failure in UpdateQueuedSong()
after LockSeek() has failed.
2016-02-28 13:19:44 +01:00
Max Kellermann 9de984f7f8 queue/PlaylistControl: throw PlaylistError on error 2016-02-28 11:04:35 +01:00
Max Kellermann b6cb9b853a queue/PlaylistEdit: throw PlaylistError on error 2016-02-28 11:02:36 +01:00
Max Kellermann 50b930f283 playlist/edit: use std::unique_ptr 2016-02-28 11:00:59 +01:00
Max Kellermann c81747dd15 queue/PlaylistTag: throw PlaylistError on error 2016-02-28 10:40:31 +01:00
Max Kellermann f8810d7caf PlaylistError: add NotPlaying() 2016-02-28 10:38:17 +01:00
Max Kellermann 1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann 6350089e51 Merge tag 'v0.19.13'
release v0.19.13
2016-02-23 22:13:43 +01:00
Max Kellermann 39fa949345 queue/Playlist: move only the tag items in TagModified()
Fixes disappearing duration of remote songs during playback.

See http://bugs.musicpd.org/view.php?id=4492
2016-02-23 21:01:55 +01:00
Max Kellermann 8bb5a565cd PlaylistError: add exception class wrapping enum PlaylistResult 2015-12-18 09:21:11 +01:00
Max Kellermann 004da5d385 queue/Save: fix "Malformed playlist line in state file"
Regression by commit 738583e3
2015-11-13 20:45:50 +01:00
Max Kellermann 4404f20cf4 player/Control: Seek*() returns Error information 2015-11-11 19:56:09 +01:00
Max Kellermann 5e93c05095 queue/Playlist: seek methods return bool/Error instead of PlaylistResult 2015-11-11 19:56:01 +01:00
Max Kellermann 36239895bd player/Control: add Lock prefix to locking method names 2015-11-11 16:50:57 +01:00
Max Kellermann 738583e3d4 StateFile: use StringAfterPrefix() instead of StringStartsWith() 2015-11-11 15:34:36 +01:00
Max Kellermann 733989a284 util/StringUtil: move comparison functions to StringCompare.cxx 2015-11-06 09:20:18 +01:00
Max Kellermann 8acf996d90 command/queue: add range parameter to plchanges and plchangesposid 2015-10-27 20:35:40 +01:00
Max Kellermann 5fba8d773c PlayerThread, ...: move to src/player/ 2015-08-15 15:55:46 +02:00
Max Kellermann 7652a2986b client/Response: new Client wrapper class for writing responses 2015-08-12 08:41:05 +02:00
Max Kellermann b31d171ae8 *: doxygen fixups 2015-03-17 11:21:43 +01:00
Max Kellermann 929ec70512 queue/PlaylistState: remove unused macro 2015-01-22 18:44:30 +01:00
Max Kellermann 1c3f5517fa config/Option: convert to strictly-typed enum 2015-01-21 23:30:00 +01:00