Commit Graph

452 Commits

Author SHA1 Message Date
Max Kellermann
713c1f2ba9 Merge branch 'feature/playlist' of git://github.com/miccoli/MPD 2019-02-27 13:49:22 +01:00
Stefano Miccoli
b3a458338a allow loading playlists specified as absolute filesystem paths
implement for the "load" command the same logic used for the "add"
command: local clients can load playlist specified as absolute paths.

For relative paths the old logic is preserved: first look for a stored
playlist, then look in the music directory.
2019-02-26 00:12:09 +01:00
Max Kellermann
8b5c33cecd Instance: use std::unique_ptr<> to manage the Database pointer 2019-02-20 20:48:20 +01:00
Max Kellermann
261a816b21 command/AllCommands: remove empty function command_finish() 2019-02-05 22:15:41 +01:00
Max Kellermann
0126276e2f FileCommands: log irregular errors while looking for cover art 2019-01-21 22:21:11 +01:00
Max Kellermann
58d6ddab9e FileCommands: catch all exceptions 2019-01-21 22:19:32 +01:00
Max Kellermann
05db6934eb FileCommands: fix deadlock in "albumart" command
Must lock the mutex before calling any of the unprotected InputStream methods.

Closes #462
2019-01-21 22:16:46 +01:00
Max Kellermann
bda77ffc5b db/Interface: remove IsPlugin(), use dynamic_cast instead 2018-11-19 19:38:20 +01:00
Max Kellermann
ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann
901a48c9a4 command/sticker: return ACK_ERROR_NO_EXIST for "no such sticker"
Closes #389
2018-10-31 19:19:07 +01:00
Max Kellermann
f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
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
Max Kellermann
979f1b6c39 release v0.20.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
 aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
 BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
 OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
 QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
 1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
 aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
 UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
 9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
 01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
 /6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
 jnXnPFxqBw==
 =0SSp
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.9'

release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann
62b03cfddf storage, db, mixer, command: remove more bogus "pure" attributes
This commit is similar to 788e3b31e1,
and removes more "pure" attributes which were placed on functions that
could throw exceptions, which is illegal according to clang's
understanding of the attribute (but not according to GCC's).  GitHub
issue #58 was most likely about StorageDirectoryReader::GetInfo() and
Storage::GetInfo(), which still had "pure" attributes.

Closes #58
2017-06-03 21:54:24 +02:00
Max Kellermann
4faef28cc5 release v0.20.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
 QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
 5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
 nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
 Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
 VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
 5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
 9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
 mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
 ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
 2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
 lPEdovokNw==
 =CdDy
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.7'

release v0.20.7
2017-05-15 23:01:49 +02:00
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
2a831fa547 output/Output*: drop "Output" prefix from source file name 2017-04-28 21:42:24 +02:00
Max Kellermann
e26d49efb7 release v0.20.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAljCzQcQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnIXD/9ltsmg3VC81NHOmcUehFgUaLyNh8o2iEr9
 tQfdydQxfTXBIGztMoPsPz71da8BIqAgMTCTGAEpTUXIW6ViGkgsoDlR2fAOagG2
 ybHn2q3WsPERJvkGZ4xIo0ti0pLLy7wrFpmShgOKuwb6YqOgSV+rbu/CaQanxVJE
 S599vo6rV/OI4KFSYWJbfafifN/Mqmzfl/D/tB5xaMvhas60XZ6pZTp/xH8OlnML
 8qkgPmN3gJe7DPq6L3rdwKobJuS1X6NLHSp1DyGVRy68B0sd3tMmbOocMeyi1OlE
 1z/n/M+dcSUhdHAh/Pg0wrvH0UpUlJ11blSDiWB9gqr9oOvCZO+OcPCnk0QJrqq+
 qselDNWBLvVPESbxlPO4OUbV6jxPPhVgz18RYl6JaJeUFjXkuiytI/t6jsbVM3+f
 ZC1UgO+TznCuDjjMj35RP9QDkUQpuH6CK4+tyxbH7Fe4KQi02FQdtK8Q/CnESBLl
 alTLYQk7VlwL1oMgezoZfTLDbsihRrEO6Y0cp/pObUrEjQ65706UGUf61PRQGBM9
 DlEPqfuH8TMgksxDIrkt68pWjyCXhhUCA+RsyFJoMp7Xq6Gy2pZUn2yKCmTXLte/
 v5xW9FuiSvKUKlvYbfk/q3u/GTCJELf0eY3y0Eryqp6nOEZHmzz8HOF7Bs2PxM3B
 eU/fEKWxVQ==
 =21bM
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.6'

release v0.20.6
2017-03-10 17:02:32 +01:00
Max Kellermann
e22a4fdba4 command/Error: improve libstdc++ 4.9.x detection for std::rethrow_if_nested() workaround 2017-03-01 16:38:22 +01:00
Max Kellermann
e9e853b19a command/Partition: add command "partition" to switch to another partition 2017-02-25 10:26:33 +01:00
Max Kellermann
e48ea5f23a Instance: add method FindPartition() 2017-02-25 10:26:33 +01:00
Max Kellermann
c7396b0675 Client: add method GetPartition(), make partition private 2017-02-25 10:20:09 +01:00
Max Kellermann
e3ee60e7af command/storage: use Instance::EmitIdle()
These events are relevant for all partitions.
2017-02-25 10:20:07 +01:00
Max Kellermann
05b8ddac4c Client: add method GetInstance() 2017-02-25 10:20:05 +01:00
Max Kellermann
668724de4e Client: replace playlist and player_control with getter methods
Prepare to convert "partition" to a mutable pointer.
2017-02-25 09:24:19 +01: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
3b84b99804 IdleFlags: add a "partition" event 2017-02-17 23:59:06 +01:00
Max Kellermann
1786f9b1bb command/Partition: add command "newpartition" 2017-02-17 23:53:49 +01:00
Max Kellermann
77178e0590 Instance: make "partition" a std::list
With this commit, multi-player support becomes possible... it's just
not wired to the frontend yet.

This is based on massive amounts of refactoring work I did over the
past 9 years.
2017-02-17 23:22:29 +01:00
Max Kellermann
c335f18be7 Partition: add "name" attribute 2017-02-17 23:18:51 +01:00
Max Kellermann
7dc3e73782 command: add command "listpartitions"
The first step to multi-player support.  Not much, just a dummy
command.
2017-02-17 23:07:31 +01:00
Max Kellermann
6636c69a11 storage/FileInfo: convert mtime to std::chrono::system_clock::time_point 2017-02-11 23:45:15 +01:00
Max Kellermann
5e081de14a IOThread: move EventThread instance into struct Instance
Eliminate global variables.
2017-02-10 22:25:06 +01:00
Max Kellermann
3850716522 command/Database: add "sort" parameter to "find" and "search"
Implement the second part of https://bugs.musicpd.org/view.php?id=3990
2017-02-08 11:22:08 +01:00
Max Kellermann
777e15bd78 db/DatabaseSong: make the Storage optional
Some database plugins don't use a Storage (e.g. UPnP), and with this
plugin, DatabaseDetachSong() can crash.
2017-02-08 10:05:55 +01:00
Max Kellermann
f689e28958 SongLoader: return instance, not pointer 2017-02-08 10:02:08 +01:00
Max Kellermann
29453ba196 client: add tag_mask attribute
The "tagtypes" command now has several sub commands which can be used
to edit that mask.
2017-02-08 09:06:11 +01:00
Max Kellermann
09d87d5ef1 command/Other: move some functions to ClientCommands.cxx
handle_tagtypes() is also being moved to ClientCommands.cxx, because
that command will be extended to access client-specific settings.
2017-02-08 09:06:11 +01:00
Max Kellermann
2f3f075e4f tag/Mask: wrap in class 2017-02-08 09:04:45 +01:00
Max Kellermann
a3e28c2d1a tag/Tag: move tag_name_parse() to ParseName.cxx 2017-02-08 08:57:22 +01:00
Max Kellermann
03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Max Kellermann
39114f91a7 AudioFormat: replace struct audio_format_string with class StringBuffer, return it 2017-01-17 22:18:21 +01:00
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
52652cb609 command/{Player,Error}: extract messages from nested exceptions 2016-12-29 14:46:13 +01:00
Max Kellermann
3472208c05 ReplayGainGlobal: move replay_gain_mode to struct Partition 2016-12-03 13:56:25 +01:00
Max Kellermann
77c1f54876 ReplayGainConfig: add struct ReplayGainConfig, move globals to ReplayGainGlobal.cxx 2016-11-25 11:13:08 +01:00
Max Kellermann
0720702c91 ReplayGainMode: add ToString(), FromString()
Move code from ReplayGainConfig.cxx.
2016-11-24 17:34:57 +01:00
Max Kellermann
7ef31f84a7 command/Error: translate std::invalid_argument to ACK_ERROR_ARG 2016-11-24 17:33:36 +01:00
Max Kellermann
0759d72108 Partition: add UpdateEffectiveReplayGainMode()
Move code from replay_gain_get_real_mode().
2016-11-24 15:18:57 +01:00
Max Kellermann
741c6f1179 command: remove the obsolete Error support code 2016-11-10 12:55:08 +01:00
Max Kellermann
4cd21f1e07 decoder/Control: throw exception on Seek() error 2016-11-07 09:05:28 +01:00
Max Kellermann
403f0f8c64 SongLoader, ...: include cleanup 2016-11-07 09:01:57 +01:00
Max Kellermann
a2e3dc0592 db/Interface: migrate Update() from class Error to C++ exceptions 2016-10-29 10:59:18 +02:00
Max Kellermann
df142d4f61 db/simple: migrate Mount() from class Error to C++ exceptions 2016-10-29 10:56:31 +02:00
Max Kellermann
fac8edd47a db/Interface: migrate visitor methods from class Error to C++ exceptions 2016-10-29 10:42:56 +02:00
Max Kellermann
9a9da7b077 command/Database: use std::unique_ptr 2016-10-29 10:42:56 +02:00
Max Kellermann
6961bd61ca LocateUri: migrate from class Error to C++ exceptions 2016-10-27 22:04:41 +02:00
Max Kellermann
c598686bd9 storage: migrate from class Error to C++ exceptions 2016-10-27 21:35:19 +02:00
Max Kellermann
60f72f0ff9 command/Storage: use std::unique_ptr 2016-10-27 21:04:40 +02:00
Max Kellermann
10e32454ef lib/sqlite, sticker: migrate from class Error to C++ exceptions 2016-10-27 07:50:08 +02:00
Max Kellermann
086652dd50 Instance: add GetDatabaseOrThrow() 2016-10-26 18:47:19 +02:00
Max Kellermann
0ce72cbf9d player/Control: convert error from Error to std::exception_ptr
Prepare full C++ exception support in the player thread.
2016-09-08 12:15:14 +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
3da4648112 command/Player: restore "single" mode using AtScopeExit() 2016-09-08 12:07:22 +02:00
Max Kellermann
c60d65dd8f command/All: catch class Error 2016-09-08 12:07:22 +02:00
Max Kellermann
f29949e14d command/Error: support class Error as C++ exception 2016-09-08 10:34:02 +02:00
Max Kellermann
75aa98ddaa command/Error: merge the two try/catch blocks 2016-09-08 10:34:02 +02:00
Max Kellermann
021519f295 command/QueueCommands: eliminate duplicate code in handle_addid() 2016-06-13 18:28:03 +02:00
Eric Wollesen
81a198a76a return id for "addid" with position
Previously the id was being returned only when a position wasn't
specified.
2016-06-13 10:14:20 -06:00
Max Kellermann
e228144159 command/playlist: eliminate spl_print() calls
playlist_file_print() already handles stored playlists.  spl_print()
is never called with a successful result.
2016-04-13 19:47:41 +02:00
Max Kellermann
9b85446808 util/StringPointer: rename typedef pointer to pointer_type 2016-04-12 22:53:06 +02:00
Max Kellermann
2fd5182608 db/Interface: GetSong() throws exception on error 2016-03-19 00:19:50 +01:00
Max Kellermann
b24a5e0662 Partition: add method EmitIdle()
Prepare for moving idle events to class Partition.  Right now, it's
just a wrapper for idle_add().
2016-03-05 19:16:39 +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
ac15581c56 command/error: remove unused function print_playlist_result() 2016-02-28 11:53:38 +01:00
Max Kellermann
9e2e882157 PlaylistPrint: throw PlaylistError on error 2016-02-28 11:52:39 +01:00
Max Kellermann
99ded56047 command/error: remove db_domain from ToAck(Error) 2016-02-28 11:48:12 +01:00
Max Kellermann
5b8dce7456 db/simple: throw DatabaseError on error 2016-02-28 11:40:59 +01:00
Max Kellermann
304d78a4c8 command/error: remove playlist_domain from ToAck(Error)
playlist_domain is no longer used for class Error.
2016-02-28 11:17:43 +01:00
Max Kellermann
b6cb9b853a queue/PlaylistEdit: throw PlaylistError on error 2016-02-28 11:02:36 +01:00
Max Kellermann
ea626368a0 queue/QueueCommands: use std::unique_ptr 2016-02-28 10:56:37 +01:00
Max Kellermann
c81747dd15 queue/PlaylistTag: throw PlaylistError on error 2016-02-28 10:40:31 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
7623c1c5cb SongUpdate: move tag_scan_fallback() to tag/Generic.cxx 2016-02-22 18:00:49 +01:00
Max Kellermann
a5f8fd774d tag/handler: use CamelCase 2016-02-22 17:38:06 +01:00
Max Kellermann
4b79f0047d db/DatabaseError: add exception class DatabaseError 2016-02-07 01:09:33 +01:00
Max Kellermann
6a789b660a command/CommandError: move code to ToAck(DatabaseErrorCode) 2016-02-07 01:09:10 +01:00
Max Kellermann
0d8e44a079 db/DatabaseError: rename enum db_error and make strictly-typed 2016-02-07 01:01:10 +01:00
Max Kellermann
f3503e0026 fs/DirectoryReader: use C++ exceptions instead of class Error 2015-12-29 12:56:26 +01:00
Max Kellermann
3843972b05 command/Error: workaround for gcc 4.x rethrow_exception(exception_ptr) 2015-12-29 12:39:28 +01:00
Max Kellermann
37862f0f20 PlaylistFile: convert more APIs from Error to std::exception 2015-12-28 14:20:37 +01:00
Max Kellermann
1f184f4aec PlaylistFile: throw exception on spl_map_to_fs() failure 2015-12-28 14:20:37 +01:00
Max Kellermann
48693250a4 command/Error: no std::exception_ptr forward declaration
This breaks on some standard library implementations.
2015-12-28 14:20:37 +01:00
Max Kellermann
570dcb6309 command/Error: support nested exceptions 2015-12-28 07:00:01 +01:00
Max Kellermann
19e43087a8 command/Error: move code to ToAck(std::exception_ptr) 2015-12-28 06:53:52 +01:00
Max Kellermann
1c90400081 command/Error: pass std::exception_ptr to PrintError()
Necessary to preserve type information.  The try/catch sequence didn't
work previously.
2015-12-27 06:43:55 +01:00
Max Kellermann
e939d667d9 protocol/Ack: add exception class wrapping enum ack 2015-12-18 09:53:02 +01:00
Max Kellermann
8bb5a565cd PlaylistError: add exception class wrapping enum PlaylistResult 2015-12-18 09:21:11 +01:00
Max Kellermann
51168169e7 util/Tokenizer: use std::runtime_error on syntax error 2015-12-16 11:34:26 +01:00
Max Kellermann
8f93c36466 command/AllCommands: catch and report std::exception 2015-12-16 00:07:51 +01:00
Max Kellermann
28f9a0a900 command/other: re-allow "lsinfo /"
This compatibility hack was accidently broken by commit f072cbbb
2015-11-13 21:04:02 +01:00
Max Kellermann
a6bb3cf60a command/queue: use StringIsEqual() instead of memcmp()
memcmp() can overflow the buffer.
2015-11-13 21:02:33 +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
0f4f04eaa4 command/CommandError: send verbose error message to client 2015-11-11 19:51:09 +01:00
Max Kellermann
2e55d561d3 PlaylistError: remove unused code "ERRNO" 2015-11-11 19:50:57 +01:00
Max Kellermann
36239895bd player/Control: add Lock prefix to locking method names 2015-11-11 16:50:57 +01:00
Max Kellermann
8acf996d90 command/queue: add range parameter to plchanges and plchangesposid 2015-10-27 20:35:40 +01:00
Max Kellermann
f072cbbba7 LocateUri: new library to classify URIs in a standard way 2015-10-22 09:39:28 +02:00
Max Kellermann
0366dcf604 PlaylistPrint: fix -Wunused #ifndef ENABLE_DATABASE 2015-10-20 13:50:00 +02:00
Max Kellermann
fc2154ee92 DetachedSong: move code from Update() to LoadFile()
Avoid duplicate AllocatedPath::FromUTF8() invocations in two callers.
2015-10-20 12:10:42 +02:00
Max Kellermann
76f85e6f7b command/DatabaseCommands: pass URI to handle_lsinfo2() 2015-10-20 12:07:18 +02:00
Max Kellermann
81ce684b35 command/FileCommands: fix access to absolute paths in "readcomments" 2015-10-20 11:25:46 +02:00
Max Kellermann
f0b58c6f24 db/UniqueTags, tag/Set, ...: use typedef tag_mask_t 2015-08-24 11:53:30 +02:00
Max Kellermann
36cd73df51 client, command: use StringIsEqual() 2015-08-14 19:48:30 +02:00
Max Kellermann
6f20889f00 command/CommandListBuilder: postpone "size" initialization 2015-08-14 19:42:11 +02:00
Max Kellermann
8e408725e9 protocol/Result: move current_command to class Response 2015-08-14 19:04:00 +02:00
Max Kellermann
d053797340 protocol/Result: move command_list_num to class Response 2015-08-14 19:00:02 +02:00
Max Kellermann
86e036c393 command: pass Response object to command callbacks 2015-08-13 12:48:31 +02:00
Max Kellermann
7652a2986b client/Response: new Client wrapper class for writing responses 2015-08-12 08:41:05 +02:00
Max Kellermann
b1480167be command/Request: add parser methods
Wrapper for protocol/ArgParser.cxx.
2015-08-11 23:02:34 +02:00
Max Kellermann
e118e958f7 protocol/ArgParser: add overload with max_value parameter 2015-08-11 22:58:04 +02:00
Max Kellermann
9231f420c1 protocol/ArgParser: overload as ParseCommandArg(), pass references 2015-08-11 22:43:10 +02:00
Max Kellermann
0f92d021a1 command/Request: new struct wrapping ConstBuffer<const char *> 2015-08-11 22:43:10 +02:00
Max Kellermann
cbdc3194cc protocol/ArgParser: add struct RangeArg 2015-08-11 22:43:10 +02:00
Max Kellermann
993df0fd28 command/{Queue,Other}: eliminate local "bool" variable 2015-08-11 21:54:29 +02:00
Max Kellermann
f9e0f0d257 PlaylistSave: return bool/Error instead of PlaylistResult 2015-03-24 22:03:17 +01:00
Max Kellermann
1c90b0c19d *: change C-style prototypes, drop "(void)" 2015-03-03 20:05:08 +01:00
Max Kellermann
0febb218ed FileCommands: use Path::HasNewline() 2015-03-03 12:42:27 +01:00
Max Kellermann
6ff394bcc9 StorageCommands: use PathTraitsUTF8 for protocol argument 2015-03-02 21:25:55 +01:00
Max Kellermann
7a8f96b1dd FileCommands: use PathTraitsFS typedefs 2015-02-28 23:00:26 +01:00
Max Kellermann
90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann
00583bc4a8 FileCommands: skip special files completely
Previously, MPD printed the time stamp without printing the file
name.  That made no sense.
2015-02-28 23:00:26 +01:00
Max Kellermann
2d06a8e880 storage/FileInfo: rename to StorageFileInfo 2015-02-28 23:00:26 +01:00
Max Kellermann
676dfabc91 command/{Queue,File}Commands: drop "file:///" prefix for absolute paths
Requiring this prefix makes the client's intention very clear, but it
was too hard to understand why this prefix was needed.  Initially, my
intention was to differentiate from broken clients which prefix relate
URIs with a slash; once MPD allowed that.  In the past few years
however, MPD has disallowed that, and there was no significant
breakage (except for the "add /" special case which some clients
apparently still do).  So I figure it's about time to define that an
URI that begins with a slash points to an arbitrary file on the file
system.
2015-02-09 07:55:06 +01:00
Max Kellermann
593bb5a8a7 StickerDatabase: convert the struct name to upper case 2015-01-28 19:33:56 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
49968541fd sticker/Match: add inequality operators 2014-12-12 22:26:04 +01:00
Max Kellermann
cc143105b8 sticker/Match: add operator "EQUALS"
Mapped to "=" in the MPD protocol.  This is the first operator,
initially supporting value matches in the MPD protocol.
2014-12-12 22:16:00 +01:00
Max Kellermann
fed44e95b3 sticker/Song: add enum StickerOperator to sticker_song_find() 2014-12-12 22:10:24 +01:00
Max Kellermann
204a1de3fd sticker/Database: use the Error library 2014-12-12 21:43:54 +01:00
Max Kellermann
900c4977cc AllCommands: use ARRAY_SIZE() 2014-12-09 21:58:01 +01:00
Max Kellermann
6edfc56c9d command: use ConstBuffer<const char *> for argument list 2014-12-08 13:30:35 +01:00
Max Kellermann
5837a63942 AllCommands: simplify the tokenizer loop 2014-12-08 13:25:41 +01:00
Max Kellermann
3a28f456b1 AllCommands: assign current_command early 2014-12-08 13:25:00 +01:00
Max Kellermann
4f6fc2675c AllCommands: remove redundant initializer 2014-12-08 13:09:12 +01:00
Max Kellermann
1a8c3271da AllCommands: make variables more local 2014-12-06 00:10:34 +01:00
Max Kellermann
bd49e8e76f AllCommands: make the commands array "constexpr" 2014-12-06 00:07:07 +01:00
Max Kellermann
70b5a81a29 {Tag,Song}Print, PlayerCommands: report song duration with milliseconds precision 2014-11-25 17:46:43 +01:00
Max Kellermann
26382713c2 release v0.19.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUa674AAoJECNuiljG20USNMUQAIpl0/cJI98dljXWZ4uzaRoc
 JMPTvWkVUP9qBN3VnNISR+2NXsL7iGO6rXh9MACpfv8mcOf+/jg8LCX/3/RzDkP+
 lnhFqQ+xnl3TUjwpABKM2lU87I8QXamtCbxEvONTpcH4Dt/GVfBolrlzBu1G17cF
 7f07uZntpz/Dhtg0SWCVLS+QDGQtDNCgpXcfGlxWsGfEBWKAC+Aifv+2QDA0nXOU
 WfOU2r3vV3UNmQSu0/O6cyB5Du01SVVYSa5BNpLu3o6CHawAhVcTXdLX12JSDahk
 Qjy9VAF9bX+odZJ9M4xAlRBZYZWKfiZ6Dt0FevevqAllkd2GlQJPXWWXWXJ4PWd+
 a3K/js1hLgCIO2qk8aDKaFGTOnVk5F5eFN6d+jh5gwcuFiGa0CcSWxaCEe7vBVy3
 CTukuUBlgN4hA9gBNNvJrpbV+BO8ZY1LkS6w3E95Qz3VrwclTl5qKW2+6TYLMKBA
 VIBQM8TwOHAKyhn50vhBfk6Zz6c28LkrMc0Ycm5xFD1I3fC6E62vqDVfBUMr9HJi
 fG3PmxcrSTH8ZKgSADjF7DtR0M5munUrQhw7w0pwXUpKuDvUg3nIHulu88Dl9rZq
 MDODNRpBkQwGXs9i4SxLTSA9nQtlAh3x3mqtjOf1i2jhkuSJ8R8jQne+8wDaT0Bt
 dXD9h+qc/8+FOnrB0uYd
 =LYOC
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.4'
2014-11-18 21:47:20 +01:00
Max Kellermann
460cfba6ff QueueCommands: workaround for buggy clients that send "add /" 2014-11-18 21:31:54 +01:00