Commit Graph

109 Commits

Author SHA1 Message Date
Max Kellermann
c729f16dcd song/DetachedSong: copy the AudioFormat from LightSong
Enables the "Format" row in "playlistinfo" responses.

https://github.com/MusicPlayerDaemon/MPD/issues/1094
2021-02-18 22:16:11 +01:00
Max Kellermann
5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann
bbfa6fe632 db/simple: purge songs for unavailable decoder plugins on update 2020-10-28 14:36:20 +01:00
Max Kellermann
c3cfb5fe16 Merge branch 'v0.21.x' 2020-07-06 20:56:52 +02:00
Max Kellermann
bfdf13dca3 decoder/Plugin: allow scan_{file,stream}() to throw
Bug #915 is about an I/O exception thrown where none was allowed,
leading to crash via std::terminate().  However, instead of catching
and logging the error inside the decoder plugin, it should be able to
propagate the I/O error to the MPD core, so MPD can avoid trying other
decoder plugins.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/915
2020-07-06 14:13:34 +02:00
Rosen Penev
e4dad42ca1 use std chr functions
The ones in std have overloads for const char/char.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:36:53 +02:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
The former was deprecated with C++14.

According to the C++11 and C++17 standards, both files are identical.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Max Kellermann
2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann
496f43e25d Merge branch 'v0.21.x' 2019-11-04 15:07:46 +01:00
Max Kellermann
bea3b954a5 meson.build, SongUpdate: disable db-specific archive code if -Ddatabase=false
Fixes another build failure.
2019-11-04 14:15:48 +01:00
Max Kellermann
7775691965 db/simple/Song: rename "uri" to "filename"
This attribute is not a URI; it is just the filename without its
parent directory path.  To avoid confusion, let's rename it to
"filename", leaving the struct without a "uri" attribute.
2019-09-04 12:04:35 +02:00
Max Kellermann
497d090814 db/simple/Song: remove static method NewFile() 2019-09-04 12:03:41 +02:00
Max Kellermann
f4d0bd8205 db/simple/Song: make "parent" a reference, not a pointer 2019-09-04 12:02:17 +02:00
Max Kellermann
40a2880857 util/UriUtil: split 2019-08-09 20:21:12 +02:00
Max Kellermann
d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann
a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann
9a78371b5c DetachedSong: allow LoadFile(), Update() to throw 2019-05-22 10:19:25 +02:00
Max Kellermann
3fc4da382e db/simple/Song: allow LoadFile(), UpdateFile() to throw
Preparing to move logger calls out of lower-level libaries, and
propagating error details to the caller instead.
2019-05-22 10:19:24 +02:00
Max Kellermann
bbdf2dcf1e db/simple/Song: wrap in std::unique_ptr<> 2019-05-21 22:46:34 +02:00
Max Kellermann
f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann
90201e9970 DetachedSong, db/LightSong, SongFilter: move to src/song/ 2018-08-02 13:51:18 +02:00
Max Kellermann
72b6c09a73 db/simple: add an AudioFormat to each Song 2018-07-06 22:49:02 +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
1e3f0650df SongUpdate: add "noexcept" 2018-01-21 11:53:42 +01:00
Max Kellermann
914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +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
6636c69a11 storage/FileInfo: convert mtime to std::chrono::system_clock::time_point 2017-02-11 23:45:15 +01:00
Max Kellermann
329c3ab21b fs/FileInfo: use std::chrono::system_clock 2017-02-10 23:48:21 +01:00
Max Kellermann
03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
403f0f8c64 SongLoader, ...: include cleanup 2016-11-07 09:01:57 +01:00
Max Kellermann
c598686bd9 storage: migrate from class Error to C++ exceptions 2016-10-27 21:35:19 +02:00
Max Kellermann
100308db02 db/update: catch exceptions from Storage plugins 2016-09-16 17:43:32 +02:00
Max Kellermann
1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
a670ff6d3e SongUpdate: remove obsolete overload UpdateFileInArchive(Storage) 2016-02-26 15:06:16 +01:00
Max Kellermann
d3ae05506d SongUpdate: remove archive handling from LoadFile()
This code has been moved to LoadFromArchive().
2016-02-26 15:05:44 +01:00
Max Kellermann
35567e6507 SongUpdate: add UpdateFileInArchive(ArchiveFile&) 2016-02-26 14:53:37 +01:00
Max Kellermann
c4537fe6f6 TagArchive: add TagBuilder overload with ScanGenericTags() fallback
Load APE/ID3 tags from archives.
2016-02-26 14:03:16 +01:00
Max Kellermann
3d9652ae35 TagStream: add TagBuilder overload with ScanGenericTags() fallback
This commit adds support for APE/ID3 tags from NFS/SMB files.

See http://bugs.musicpd.org/view.php?id=4270
2016-02-26 13:48:38 +01:00
Max Kellermann
a9130cb99c TagFile: add TagBuilder overload with ScanGenericTags() fallback 2016-02-26 13:48:38 +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
8211d4a1c2 DetachedSong: check AllocatedPath::FromUTF8() result 2015-10-20 12:16:25 +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
41cc31c124 SongUpdate: use OpenArchiveInputStream() to open archive file
Don't pass Path::c_str() to tag_stream_scan() which requires a UTF-8
string.
2015-03-01 00:48:44 +01:00
Max Kellermann
605af61a0f db/simple: eliminate UpdateFileInArchive() if archive API is disabled
Reduce some unnecessary overhead.
2015-03-01 00:25:30 +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
2d06a8e880 storage/FileInfo: rename to StorageFileInfo 2015-02-28 23:00:26 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00