Commit Graph

47 Commits

Author SHA1 Message Date
Max Kellermann 131dcce0a1 playlist/Mapper: use Storage::OpenFile() 2024-05-17 12:54:08 +02:00
Max Kellermann a5d7f5e1fa client/Client: add interface IClient
This allows detangling dependencies and fixes a linker problem in
test/test_translate_song.cxx.
2023-11-26 08:11:06 +01:00
Max Kellermann a564b7eedb test/test_translate_song: remove unused Log() symbol 2023-11-21 20:46:10 +01:00
Max Kellermann a302d34f6d tag/Names: convert to C++ 2023-03-06 15:16:33 +01:00
Max Kellermann ab99a57997 test/meson.build: reduce test_translate_song. dependencies 2022-11-12 12:17:35 +01:00
Rosen Penev 97425d56e7
remove gcc_unused
[[maybe_unused]] (introduced in C++17) is standard C++.

https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Max Kellermann cefc773992 playlist/PlaylistSong: pass std::string_view 2020-03-13 19:58:36 +01:00
Max Kellermann 991bbea875 Merge branch 'v0.21.x' 2019-07-29 11:32:00 +02:00
Max Kellermann 90ea3bf985 playlist/Song: support backslash in relative URIs
Closes https://github.com/MusicPlayerDaemon/MPD/issues/607
2019-07-29 09:58:53 +02:00
Max Kellermann 83b0871248 test/test_translate_song: remove unused variable "s1" 2019-07-29 09:52:57 +02:00
Max Kellermann e0d5d88104 Log: make LogLevel the first parameter
Prepare for templated functions.
2019-05-23 12:17:59 +02:00
Max Kellermann 9a78371b5c DetachedSong: allow LoadFile(), Update() to throw 2019-05-22 10:19:25 +02:00
Max Kellermann 214ddee2f5 util/Time*: move to time/ 2019-05-08 15:47:58 +02:00
Max Kellermann 137ffba1b4 test/test_translate_song: move MakeTag() to header 2019-03-16 13:23:02 +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 01b6e1cbf2 test: use GTest instead of cppunit 2018-10-16 21:26:04 +02:00
Max Kellermann 90201e9970 DetachedSong, db/LightSong, SongFilter: move to src/song/ 2018-08-02 13:51:18 +02:00
Max Kellermann fcfdeac1c7 test/test_translate_song: use std::to_string() 2018-01-24 13:38:44 +01:00
Max Kellermann 1e3f0650df SongUpdate: add "noexcept" 2018-01-21 11:53:42 +01:00
Max Kellermann 3c5e4e2788 storage/Plugin: return std::unique_ptr<Storage> 2018-01-02 16:11:17 +01:00
Max Kellermann b886dfae4d DetachedSong, db/LightSong, db/simple/Song: use std::chrono::system_clock::time_point 2017-08-18 12:22:47 +02:00
Max Kellermann 377a2860cc Log: add "noexcept" 2017-05-16 10:15:43 +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 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 d184231169 db/DatabaseSong: DatabaseDetachSong(uri) returns instance, not pointer 2017-02-08 09:59:12 +01:00
Max Kellermann 03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Max Kellermann 31d77ec580 input/curl, ...: use strncmp() instead of memcmp() to avoid crash 2017-01-03 13:17:02 +01:00
Max Kellermann 22dcca9832 util/Error: remove obsolete class 2016-11-10 12:58:26 +01:00
Max Kellermann 6961bd61ca LocateUri: migrate from class Error to C++ exceptions 2016-10-27 22:04:41 +02:00
Max Kellermann 8d41e9658f Instance: remove Error parameter from GetDatabase() 2016-10-26 18:52:00 +02:00
Max Kellermann 2fd5182608 db/Interface: GetSong() throws exception on error 2016-03-19 00:19:50 +01: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 e0405f1781 test/test_translate_song: use PATH_LITERAL() 2015-06-22 22:12:08 +02:00
Max Kellermann 7c25d83f1c Tag: use SignedSongTime for the song duration 2014-08-29 13:20:58 +02:00
Max Kellermann 6ad933982f DetachedSong: use std::chrono::duration for start_ms and end_ms 2014-08-28 13:03:18 +02:00
Max Kellermann 41a7203c28 Tag: add class const_iterator and methods begin(), end()
Enables using range-based "for".
2014-07-12 17:22:39 +02:00
Max Kellermann be081929f4 storage/local: remove utf8 path from constructor
Build the UTF-8 version of the path automatically in the constructor.
2014-02-07 23:41:06 +01:00
Max Kellermann ffd16b55a6 StoragePlugin: add method MapToRelativeUTF8()
Replaces map_to_relative_path() from Mapper.cxx.
2014-02-07 19:09:28 +01:00
Max Kellermann c13810ebaa Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07 00:42:14 +01:00
Max Kellermann cf6281a5a7 Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-04 11:22:33 +01:00
Max Kellermann 29072797ca db/DatabasePlaylist: pass Database reference around
Reduce global variable usage, move to frontend code.
2014-02-04 00:57:43 +01:00
Max Kellermann ca36ac2ba1 SongLoader: new class that merges duplicate code
There was quite a lot of duplicate code for loading DetachedSong
objects, with different semantics for "securely" loading local files.
2014-02-03 23:32:10 +01:00
Max Kellermann 9d34fc394c Database*: move to db/ 2014-01-24 16:38:44 +01:00
Max Kellermann f1f19841bd playlist/*: move to playlist/plugins/ 2014-01-23 23:30:12 +01:00
Max Kellermann 4f120f3714 PlaylistSong: modify the given song object in-place
Reduce bloat.
2014-01-21 00:28:37 +01:00
Max Kellermann dd20a3ce7e test: add unit test for playlist_check_translate_song() 2014-01-21 00:28:34 +01:00