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
libfmt version 10 apparently doesn't know how to format a
`StringBuffer`, failing the MPD build. Since we have a formatter
specialization for `AudioFormat`, let's use that - it's better and
easier to use.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807
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.
Since using libfmt (commit: dfc5b49) ICY MetaData was broken. Eg MP3 streams encoded with LAME were affected resulting in missing stream titles on VLC or strange noises on Sonos hardware. This commit fixes the icy-metaint field.
Add an `always_off` option to outputs that causes them to never start
playback even if they're enabled.
This allows placeholder `null` outputs to be defined for the purpose
of having an external client react to the enabled state without the
side effects of real outputs. Like an external mixer, the client can
perform some action when an output is enabled.
Normally `null` outputs can be used for playback so it's possible for
MPD to continue playback silently if a problem occurs with all the real
outputs (or there are none enabled).
openmpt_at_end is a string, not an integer
Fixes build error:
src/decoder/plugins/OpenmptDecoderPlugin.cxx: In function 'void mod_decode(DecoderClient&, InputStream&)':
src/decoder/plugins/OpenmptDecoderPlugin.cxx:85:44: error: invalid cast from type 'std::string_view' {aka 'std::basic_string_view<char>'} to type 'unsigned in '
85 | mod.ctl_set("play.at_end", std::to_string((unsigned)openmpt_at_end));
| ^~~~~~~~~~~~~~~~~~~~~~~~
Fixes hide_playlist_targets not working after server restart
Currently, `hide_playlists_targets` works by skipping songs with
`in_playlist` value set to true in
[`Directory::Walk`](a57bcd0238/src/db/plugins/simple/Directory.cxx (L237)). But
`in_playlist` is not stored and only updated in
[`UpdateWalk::PurgeDanglingFromPlaylists`](a57bcd0238/src/db/update/Playlist.cxx (L139)),
which will only be executed while updating DB.
This causes the problem that playlist target songs are correctly
hidden after database update, but will remain visible after mpd server
restarted. This pr solves the problem by storing `in_playlist` value
of songs into the `SimpleDatabase` file.