This eliminates all `Storage::GetInfo()` calls from
`UpdateWalk::PurgeDeletedFromDirectory()` and instead uses a "marker"
field to mark items that have been visited; later, all unmarked items
can be deleted.
This eliminates a lot of redundant I/O which is noticable with the
`curl` storage plugin (i.e. WebDAV).
Let OnHeaders() check the status.
The status checking code was added by commit 4f021cbced in 2011,
but in 2008, commit a8e81326d0 enabled `CURLOPT_FAILONERROR`, which
means the status checking code never had any effect.
This allows `LoadExcludeListOrLog()` to hide boring "404 Not Found"
log messages via `IsFileNotFound()`.
Without clearing all `in_playlist` flags, the songs will never be
revealed again if they were hidden once by a CUE sheet, not even after
the CUE sheet gets deleted or modified.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1784
This should prevent ffmpeg from taking priority over the gme plugin.
The ffmpeg plugin is more buggy than gme.
One of the prominent bugs of preferring ffmpeg over gme is that ffmpeg
cannot seek SAP files while gme can. This should prevent that from
happening.
By default, if the parent of a process dies, the process gets SIGHUP
and is supposed to shut down. This however doesn't work for MPD,
because MPD redefines SIGHUP with a different meaning (like most
daemons do).
To work around this, we configure the kernel to send SIGTERM instead
of SIGHUP.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
Fixes a busy loop in BufferingInputStream::RunThreadLocked() because
the method never learns that seeking is ignored, even though the HTTP
stream is already broken and can never be read; nobody cared to check
for errors.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1727
The original sidplay project has been mostly unmaintained for nearly
12 years, and the most recent release was in 2016, while the
libsidplayfp project has been actively maintained all the time.
By default, if the parent of a process dies, the process gets SIGHUP
and is supposed to shut down. This however doesn't work for MPD,
because MPD redefines SIGHUP with a different meaning (like most
daemons do).
To work around this, we configure the kernel to send SIGTERM instead
of SIGHUP.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
This effectively reverts commit 0f02bbc2fe which was a horrible
kludge for JACK support on Windows. Maintaining this kludge doesn't
seem worth the trouble (the JACK version was never updated), and
apparently nobody uses this.
Fixes a busy loop in BufferingInputStream::RunThreadLocked() because
the method never learns that seeking is ignored, even though the HTTP
stream is already broken and can never be read; nobody cared to check
for errors.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1727
Boost makes building a piece of software much more difficult than
necessary. It's a huge library, and just uncompressing it takes a
considerable amount of time. MPD only used a tiny fraction of it, yet
its header bloat made the MPD build very slow. Locating Boost was
difficult due to its arcane build system and its resistance to use
pkg-config; it's always a special case. MPD could never use features
of newer Boost versions because Linux distributions always shipped old
Boost versions. Boost made everything complicated and slow.
So, finally, after getting rid of GLib (commit ccdb94b06c), switching
to C++ and using Boost (commit 0801b3f495), we've finally get rid of
it 8 years later.
Unfortunately, I had to reimplement parts of it along the way
(e.g. IntrusiveList). Kind of NIH, but on the other hand, compiling
MPD has become much easier for users.
When drop_start_samples and drop_end_samples overlap and are greater
than the actual number of samples, the `num_samples` calculation in
SubmitPCM() could underflow.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1712
The function spl_valid_name() should verify playlist names and prevent
path traversal, but it failed to do so on Windows, because it forgot
to check for backslashes.
This buggy piece of code was already present when stored playlists
were initially implemented in 2006 by commit 08003904d7, and
even during the many rounds of code refactoring, nobody ever bothered
to verify it. D'oh!
(Thanks, Paul Arzelier)