Commit Graph

291 Commits

Author SHA1 Message Date
Max Kellermann
66ab2de578 Merge branch 'v0.20.x' 2018-10-22 18:20:29 +02:00
Max Kellermann
db27bb76e2 db: fix broken command "list ... group"
Grouping in the "list" command was completely broken from the start,
unlike "count group".  I have no idea what I have been thinking when I
wrote commit ae178c77bd, but it didn't
make any sense.

This commit is a rewrite of the feature.

For clients to be able to detect this feature, this commit also
increments the protocol version.
2018-10-22 13:08:24 +02:00
Max Kellermann
2ec94c0497 player/Control: start thread on demand
Keep MPD's footprint small until playback is requested.
2018-09-23 17:32:34 +02:00
Max Kellermann
8c638c50a3 player/Thread: remove obsolete buffered_before_play attribute 2018-09-23 16:50:04 +02:00
Max Kellermann
224400074c player/CrossFade: use std::chrono::duration 2018-09-22 19:37:02 +02:00
Max Kellermann
863722545f player/CrossFade, ...: use lround() 2018-09-22 19:08:03 +02:00
Max Kellermann
6db6d3c50c player/Thread: move StartPlayerThread() into PlayerControl 2018-09-21 17:14:19 +02:00
Max Kellermann
e6a974a93e db/Selection: add sort and window
Remove them as parameters from `db_selection_print()`.
2018-09-02 11:10:04 +02:00
Max Kellermann
590687fdea protocol/RangeArg: eliminate SetAll() 2018-09-02 08:17:22 +02:00
Max Kellermann
993f8d6a5e db/Print: pass RangeArg to db_selection_print() 2018-09-02 08:17:22 +02:00
Max Kellermann
68f824a186 protocol/ArgParser: move struct RangeArg to separate header 2018-09-02 08:17:22 +02:00
Max Kellermann
ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann
cc64c715a2 db/update/Service: Enqueue() throws on error 2018-08-19 23:15:52 +02:00
Max Kellermann
66fcd25b7e command/sticker, sticker/song: embed struct sticker_song_find_data in namespace
Fixes `-Werror=odr`
2018-08-09 12:57:47 +02:00
Max Kellermann
01d3777574 decoder/Thread, ...: log all exceptions 2018-08-09 11:14:40 +02:00
Max Kellermann
027e562f65 song/OptimizeFilter: optimization stage for filters 2018-08-02 19:42:53 +02:00
Max Kellermann
90201e9970 DetachedSong, db/LightSong, SongFilter: move to src/song/ 2018-08-02 13:51:18 +02:00
Max Kellermann
42ec67168a command/Database: don't use locate_parse_type() 2018-07-25 11:29:14 +02:00
Max Kellermann
91af2ebc2a command/Database: move code to handle_list_file() 2018-07-25 11:27:12 +02:00
Max Kellermann
f7fb8a33d7 db/Print: pass TagType to PrintUniqueTags() 2018-07-25 11:21:47 +02:00
Max Kellermann
0505cb8f7e db/Print: move code to PrintSongUris() 2018-07-25 11:18:45 +02:00
Max Kellermann
2cfccc1c34 SongFilter: make Item an interface
Prepare to allow more complex expressions.
2018-07-25 11:04:41 +02:00
Max Kellermann
5271e81ebe SongFilter: new extensible filter syntax
Will allow more complex fitler expression, such as negation (#89).
2018-07-24 23:05:36 +02:00
Max Kellermann
821f77325c SongFilter: Parse() throws exception on error 2018-07-21 07:24:42 +02:00
Max Kellermann
99d5b61698 fs/Path: add operator/(Path,Path)
Modeled after std::filesystem::operator/() from C++17.
2018-07-17 18:33:32 +02:00
Max Kellermann
86a37d0ed6 Main, pcm/SampleFormat, command/Error: remove obsolete GCC version checks 2018-07-16 11:04:05 +02:00
Max Kellermann
73c95d1fb2 TagFile: rename exported functions, use CamelCase
And specify whether generic tags are being scanned.
2018-07-06 22:33:35 +02:00
Max Kellermann
3d3a1232b1 tag/Handler: convert to class with virtual methods 2018-07-05 19:07:05 +02:00
Max Kellermann
d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
Patryk Hachuła
1628d801f9 playlist/Queue: add one-shot to single mode 2018-02-25 09:50:03 +01:00
FlashSystems
9f6af4f2cc Fix for bogus output of the albumart command on 32bit platforms.
read_stream_art uses PRIu64 unconditionally with the Format
method of a Respone instance to output a size_t typed value.
If size_t is 32bit the output is garbeled. This patch uses
offset_type and PRIoffset to make sure the format string
and the type of the output value always match.
2018-02-17 19:19:38 +01:00
Max Kellermann
ce2b6dc84d RemoteTagCache: new glue class for integrating RemoteTagScanner
This commit also puts an instance of RemoteTagScanner into the
Instance class, and hooks it into the "add" and "addid" commands.
2018-01-30 00:05:57 +01:00
Max Kellermann
dcd483bd99 storage/Composite: use std::unique_ptr<Storage> 2018-01-02 16:18:34 +01:00
Max Kellermann
3c5e4e2788 storage/Plugin: return std::unique_ptr<Storage> 2018-01-02 16:11:17 +01:00
Max Kellermann
43ec96d4a0 command/Error: translate std::{length_error,out_of_range} to ACK_ERROR_ARG 2017-12-21 10:22:04 +01:00
Max Kellermann
86a06a7acc output/Interface: add "attributes" map
These attributes are printed in the "outputs" response, and the new
command "outputset" allows setting new values.

No attributes are currently implemented.
2017-12-19 11:57:52 +01:00
Max Kellermann
914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann
a539094c06 command/Error: translate std::{length_error,out_of_range} to ACK_ERROR_ARG 2017-12-19 10:54:49 +01:00
Max Kellermann
5582367d68 db/DatabasePrint: support sorting by "modified-since"
Closes #172
2017-12-18 21:52:36 +01:00
Max Kellermann
7a55ab6acc db/DatabasePrint: support descending sort 2017-12-18 21:50:14 +01:00
Max Kellermann
6246d36fe6 Merge branch 'v0.20.x' 2017-12-16 20:56:06 +01:00
Max Kellermann
dfaf08743c *: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann
3b3ec402d6 command/CommandListBuilder: use C++11 initializer 2017-11-26 11:11:36 +01:00
Max Kellermann
49784513b1 util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL 2017-11-10 19:24:33 +01:00
Max Kellermann
9cc37bdea2 command/PlayerCommands: emit "volume" only if it is known
The "-1" magic value is deprecated now.
2017-09-04 08:37:37 +02:00
Ryan Walklin
9f16c798d0 Fix std::string read after free in read_stream_art 2017-08-17 21:25:03 +10:00
Ryan Walklin
9df8b32f10 Add albumart command
Add API documentation
Support 64 bit offsets
Use InputStream for all reads
2017-08-15 20:38:33 +10:00
Max Kellermann
6f37f5752b db/PlaylistInfo: use std::chrono::system_clock::time_point 2017-08-11 12:50:33 +02:00
Max Kellermann
3cfefa53f7 util/Exception: rename FullMessage() to GetFullMessage() 2017-07-05 12:25:55 +02:00
Max Kellermann
ae713cb099 *: add lots of "noexcept" specifications 2017-06-04 13:09:11 +02:00