Commit Graph

769 Commits

Author SHA1 Message Date
Max Kellermann 6ee7d88af0 db/update/Archive: fix inverted nullptr check
Regression by commit bbdf2dcf1e
2019-05-22 10:18:18 +02:00
Max Kellermann bbdf2dcf1e db/simple/Song: wrap in std::unique_ptr<> 2019-05-21 22:46:34 +02:00
Max Kellermann 02bb47dd08 db/simple/Song: move struct Disposer to separate header
Allow forward-declaring it.
2019-05-21 22:42:32 +02:00
Max Kellermann 0c48b8d084 db/simple/Song: add noexcept 2019-05-21 22:41:21 +02:00
Max Kellermann 8462559b2f db/simple/Song: include cleanup 2019-05-21 22:40:08 +02:00
Max Kellermann 214ddee2f5 util/Time*: move to time/ 2019-05-08 15:47:58 +02:00
Max Kellermann 2b4e9cc635 db/update/Service: wrap UpdateWalk in std::unique_ptr<> 2019-04-26 14:55:00 +02:00
Max Kellermann c7c303eec3 db/DatabaseListener: add noexcept 2019-04-24 14:57:30 +02:00
Max Kellermann ccc58f2a32 Merge branch 'v0.21.x' 2019-04-18 11:49:05 +02:00
Eugene Gorodinsky 8d18b4c24b Fix meson.build to work properly with '-Ddatabase=false' 2019-04-18 08:55:13 +02:00
Max Kellermann 093bf5d859 event/*, ...: make GetEventLoop() const 2019-04-04 20:07:57 +02:00
Max Kellermann ea5e6d8f33 Merge branch 'v0.21.x' 2019-04-04 10:29:58 +02:00
Max Kellermann f6941f9a44 event/SocketMonitor: don't cancel if OnSocketReady() returns false
Expect OnSocketReady() to cancel events.  If it returns false, the
SocketMonitor may be destructed already.  This fixes a use-after-free
bug in the "httpd" output plugin.
2019-04-04 10:24:58 +02:00
Max Kellermann c60d374fc8 db/DatabasePlaylist: pass DatabaseSelection to search_add_to_playlist() 2019-03-25 19:04:34 +01:00
Max Kellermann 30e0644722 db/simple: call ReturnSong() on mounted database
Fixes a memory leak, or an assertion failure in the debug build.
2019-02-22 14:52:13 +01:00
Max Kellermann 3ada464020 db/simple: use C++11 initializer 2019-02-22 14:52:01 +01:00
Max Kellermann b59f37bc0a db/simple/Directory: close the Database in destructor
Fixes assertion failure.
2019-02-20 22:50:15 +01:00
Max Kellermann cf2d171ccc db/simple: reorder checks in assert() to fix assertion failure
`light_song.Get()` could cause an assertion failure because the
`Manual<>` object must not be used if uninitialized.

Regression by commit ebc006ab52
2019-02-20 21:24:01 +01:00
Max Kellermann 6c28adbcd2 db/Plugin: use std::unique_ptr<> to manage Database pointers 2019-02-20 20:43:31 +01:00
Max Kellermann 2125e3ed57 db/simple/Directory: add noexcept 2019-02-20 20:39:49 +01:00
Max Kellermann 037bb07d08 db/VHelper: include DetachedSong.hxx to fix GCC 9 build failure
GCC 9's libstdc++ is unable to use forward-declared types as
std::vector item because the compiler wants to resolve `noexcept()` on
the item destructor.
2019-01-21 14:34:12 +01:00
Thomas Klausner 3a0480a482 Add missing include of stdlib.h.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/456
2019-01-15 16:52:40 +01:00
Max Kellermann 7ec887eea2 Merge branch 'add-meson-dependencies' of git://github.com/jacobvosmaer/MPD 2019-01-04 19:06:49 +01:00
Max Kellermann 1c7bd7d5c4 db/update/InotifyQueue: check for ACK_ERROR_UPDATE_ALREADY
Since commit cc64c715a2, UpdateService::Enqueue() throws
ProtocolError(ACK_ERROR_UPDATE_ALREADY) instead of returning 0.
2018-12-28 14:02:41 +01:00
Max Kellermann 3c4ed9cbe3 db/update/InotifyQueue: catch UpdateService::Enqueue() exceptions 2018-12-28 14:00:58 +01:00
Max Kellermann 2677b90244 db/update/InotifyQueue: add noexcept 2018-12-28 14:00:55 +01:00
Max Kellermann 1b20fa441d db/update/InotifyQueue: update code comment 2018-12-28 14:00:10 +01:00
Jacob Vosmaer 66f5b0fed7 Add boost_dep in subdir meson.build files 2018-12-09 17:20:47 +01:00
Max Kellermann 4b7078297d db/upnp: use the generic ::CollectUniqueTags() function
This function implements the "group" feature on top of the
Database::Visit() method.
2018-11-19 20:08:10 +01:00
Max Kellermann 841694ccf2 db/Interface: document CollectUniqueTags() 2018-11-19 19:40:00 +01:00
Max Kellermann bda77ffc5b db/Interface: remove IsPlugin(), use dynamic_cast instead 2018-11-19 19:38:20 +01:00
Max Kellermann ed9ece5ea3 db/Interface: make the constructor protected 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 303b3071e4 db/UniqueTags: remove pure attribute because function may throw 2018-11-19 11:32:53 +01:00
Max Kellermann eb6d5f34fc db/UniqueTags: include cleanup 2018-11-19 11:11:45 +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 7cfe929c36 db/Count: print empty group if song without grouped tag exists
Be consistent with "list" responses.
2018-10-22 12:42:18 +02:00
Max Kellermann 6c06244e83 db/Count: move code to tag/VisitCallback.hxx 2018-10-22 11:50:51 +02:00
Max Kellermann 0340b01392 db/Count: use ApplyTagFallback() 2018-10-22 10:46:26 +02:00
Max Kellermann 94592c1406 build with Meson instead of autotools
So long, autotools!  This is my last MPD related project to migrate
away from it.  It has its strengths, but also very obvious weaknesses
and weirdnesses.  Today, many of its quirks are not needed anymore,
and are cumbersome and slow.  Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann 6c40a27809 db/update/ExcludeList: fix variable name in #else block 2018-10-01 08:40:53 +02:00
Max Kellermann 8736a3533b db/update/ExcludeList: add missing #ifdef 2018-10-01 08:40:15 +02:00
Max Kellermann 0701333ec1 db/proxy: forward filter as expression to server
This adds support for the full set of MPD 0.21 filter types.
2018-09-02 22:39:45 +02:00
Max Kellermann a8e70f0901 db/proxy: forward sort and window to server 2018-09-02 17:51:30 +02:00
Max Kellermann c7c32a3ce9 db/Print: move sort/window emulation code to class DatabaseVisitorHelper
That way, each plugin can decide to implement it better.
2018-09-02 17:37:02 +02:00
Max Kellermann 94694e0f33 db/simple: pass DatabaseSelection to WalkMount()
This passes the new `sort` and `window` attributes to the mounted
database.
2018-09-02 17:13:35 +02:00
Max Kellermann a73176a1e9 db/Helpers: fix include guard 2018-09-02 12:32:33 +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