ParseTimePoint.
%Z is a glibc extension to strptime, and is a no-op there, due to the
mapping between timezone names and their definition (especially when the
name comes from a different machine) being ambiguous / impossible. Time
in HTTP headers is guaranteed to be UTC.
Passing an unknown format to strptime() implementations that don't
support it will generally cause them to return NULL, which will lead to
ParseTimePoint throwing an exception and ParseTimeStamp using an
unnecessary fallback.
Since the timezone name goes at the end of the string, we don't need to
use %Z to skip it (could be an issue in a different time stamp format),
so simply removing %Z works best.
If the constructor moves from an ExportedSong instance which refers to
somebody else's "Tag" instance, the newly constructed instance will
instead refer to its own empty "tag_buffer" field. This broke
SimpleDatabase::GetSong(), i.e. all songs on the queue restored from
the state file or added using the "addid" command.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1089
The "move" command doesn't allow open-ended ranges because they don't
make a lot of sense; moving an open-ended range is only possible if
the destination index is before the range, and in that case, the
client should be well aware how many songs there are.
Closes https://github.com/MusicPlayerDaemon/MPD/pull/1057
After commit 1afa33c3c7, an old bug was revealed:
SimpleDatabase::GetSong() constructs an ExportedSong instance by
moving the return value of Song::Export(), which causes the
LightSong::tag field to be dangling on the moved-from
ExportedSong::tag_buffer. This broke tags from CUE sheets.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1070
Commit 79b2366387 added the field `skip`
to support unaligned reads, but set the `offset` field to a wrong
value. This resulted in miscalculation of `remaining`, causing
an assertion failure.
The fix is to assign `offset` the correct value, but consider the
`skip` value in the assertion.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1067
Some FFmpeg filters change the sample format, and since MPD assumes
this never happens, this results in loud noise instead of music. This
commit finally implements the TODO comment by sending one frame of
silence to the filter and checking the output frame's format.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1009
Pass a std::string to PathTraitsUTF8::Relative(), implicitly casting
it to std::string_view. This selects the right overload which returns
std::string_view instead of `const char *`; the latter could return
`nullptr` which would cause the implicit conversion of the return
value to std::string_view to crash.
Regression caused by commits ead208987d and a98d627c0b.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/995
This allows users to disable the "CUE files as directories" feature
without having to disable the CUE playlist plugin completely. This
feature has been annoying some users.
The bug https://bugzilla.samba.org/show_bug.cgi?id=11413 makes MPD
crash after at most a minute of using the plugin. Since this bug is
five years old already and it doesn't look like it will ever be fixed,
all libsmbclient code in MPD is scheduled for removal. For now, the
plugin is disabled by default so people are less likely to hit the
crash bug.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/991
This got lost in commit 5d597a3646 (v0.21.19), but it was never
noticed because the state_file_interval was way too short due to
commit 3413d1bf23, fixed recently by commit 27cc7b352d
Fixes regression by commit 23d5a2b862 -
that commit always pretended that any Opus file has both track and
album gain, and thus disabled the fallback to the other if one is not
set.
This patch changes the logic to only submit ReplayGain if at least one
value is set, and apply the offset only to that value. If none is
available, then the new check in HandleAudio() will submit only the
output gain.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/977
Oh no, 3413d1bf23 was broken! Instead of passing a number as
"seconds" to the duration constructor, it just abused the duration
constructor as cast operator, which caused custom state_file_interval
settings to be extremely short.