Max Kellermann
20bf1d68e6
MixRampInfo: move to tag/
2021-12-01 17:09:02 +01:00
Max Kellermann
9bc4c168fd
tag/MixRamp: rename to MixRampParser.cxx
2021-12-01 17:07:53 +01:00
Max Kellermann
a45949b597
tag/MixRamp: [[gnu::...]] attributes
2021-12-01 15:48:33 +01:00
Max Kellermann
6009d4abab
tag/MixRamp: use std::string_view
2021-12-01 15:47:54 +01:00
Max Kellermann
16fb843c9b
tag/MixRamp: fix typo which broken MixRamp
...
Fixes regression by commit 8e0d810968
which is 2 years old, and nobody
noticed. D'oh, how embarassing!
2021-12-01 15:46:31 +01:00
Max Kellermann
933a1a41e6
lib/upnp/Discovery: use InjectEvent instead of DeferEvent
...
Fixes regression by commit 774b4313f2
2021-11-30 18:03:27 +01:00
August2111
1ff8626716
MSVC util/StringAPI.hxx add usage of MSVC compiler
2021-11-26 17:30:17 +01:00
Max Kellermann
c30466b84a
net/IPv4Address: add method GetPortBE()
2021-11-26 16:25:43 +01:00
Max Kellermann
868f1a4431
net/UniqueSocketDescriptor, ...: include <utility> instead of <algorithm>
...
Since C++11, std::swap() lives in <utility>.
2021-11-26 16:25:29 +01:00
Max Kellermann
05f529fffd
util/StringStrip: use [[gnu::...]] attributes
2021-11-26 16:24:55 +01:00
Rosen Penev
f22cf02ed8
fix wrong namespace name
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-26 08:08:45 +01:00
Rosen Penev
5b51d0f733
use some auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-26 08:08:45 +01:00
Rosen Penev
e03f82636a
const reference conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-23 12:33:03 -08:00
Rosen Penev
d53d85bd79
remove unused includes
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-23 12:33:03 -08:00
Max Kellermann
4682ae0898
command/database: support relative offsets for "searchadd"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1337
2021-11-23 12:17:32 +01:00
Max Kellermann
6f83bdd6f3
Merge branch '1' of git://github.com/neheb/MPD
2021-11-23 10:39:07 +01:00
Rosen Penev
9bcd425a85
array conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-23 01:38:10 -08:00
Max Kellermann
ec917f70d2
Merge remote-tracking branches 'neheb/2' and 'neheb/3'
2021-11-23 09:23:43 +01:00
Rosen Penev
40ce4eeb43
use cinttypes header
...
stdint.h is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-22 23:30:36 -08:00
Rosen Penev
29ae84e199
manual braced init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-22 23:30:04 -08:00
Rosen Penev
250011f016
return by braced init list
...
shorter
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-22 23:28:08 -08:00
Max Kellermann
dcb5ca203c
db/DatabasePlaylist: increment only one variable
...
Fixes "searchaddpl" bug emitting bogus error "Bad position".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1338
2021-11-22 20:47:34 +01:00
Max Kellermann
77df5a8f24
lib/pcre: migrate to PCRE2
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1352
2021-11-22 19:32:45 +01:00
Max Kellermann
f74996c02f
Merge remote-tracking branches 'neheb/1', 'neheb/2', 'neheb/3', 'neheb/4' and 'neheb/5'
2021-11-20 07:55:24 +01:00
Max Kellermann
eea2d35d3a
util/AllocatedString, ...: add missing include for std::exchange()
...
Fixes building with GCC 12.
2021-11-19 16:06:20 +01:00
Max Kellermann
d94e8bd82d
queue/IdTable: include cleanup
2021-11-19 16:03:09 +01:00
Max Kellermann
b0c92e1a34
queue/IdTable: lazy-initialize the "data" array
...
With large "max_playlist_length" settings, the "data" array can be
very large, and initializing it during MPD startup causes page faults,
resulting in allocation of physical RAM. This commit postpones the
initialization until the queue is really large, to avoid wasting
memory.
2021-11-19 16:00:39 +01:00
Max Kellermann
ead5bcf048
queue/IdTable: make size const
2021-11-19 15:51:10 +01:00
Shen-Ta Hsieh
e783c2bd2c
util/LazyRandomEngine: use std::optional to avoid allocation
...
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
2021-11-14 03:53:42 +08:00
Rosen Penev
837fc98638
use const references
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:18:33 -08:00
Rosen Penev
5deca66fdc
add various nodiscard
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:17:26 -08:00
Rosen Penev
cfe2dd4147
use nullptr
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:16:19 -08:00
Rosen Penev
00f8d65a17
remove std::move
...
clang-tidy reports this is trivially copyable and thus std::move has no
effect.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:15:21 -08:00
Rosen Penev
4e0e4c00bf
treewide: replace lock_guard with scoped_lock
...
SonarLint reports the latter to be better:
std::scoped_lock basically provides the same feature as std::lock_guard,
but is more generic: It can lock several mutexes at the same time, with a
deadlock prevention mechanism (see {rule:cpp:S5524}). The equivalent code
to perform simultaneous locking with std::lock_guard is significantly more
complex. Therefore, it is simpler to use std::scoped_lock all the time,
even when locking only one mutex (there will be no performance impact).
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 17:13:03 -08:00
Max Kellermann
a8c77a6fba
Merge branch '1' of git://github.com/neheb/MPD
2021-11-11 10:33:17 +01:00
Rosen Penev
31aa6d0c4f
use auto with make_unique
...
C arrays can be used with make_unique in C++17.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 01:33:03 -08:00
Max Kellermann
d051c4931d
Merge branch '2' of git://github.com/neheb/MPD
2021-11-11 10:32:45 +01:00
Rosen Penev
94b0baceb0
convert address_family_ranking to std::array
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 01:27:31 -08:00
Max Kellermann
3464497880
command/database: add optional position parameter to "searchaddpl"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1328
2021-11-11 09:52:49 +01:00
Max Kellermann
651f57bced
command/playlist: save only if at least one song was added
2021-11-11 09:50:31 +01:00
Max Kellermann
b4e72aba6c
command/playlist: move code to SearchInsertIntoPlaylist()
2021-11-11 09:40:41 +01:00
0xC0ncord
061dd2dfef
output/plugins: fix build error with clang and -stdlib=libc++
...
This fixes this build error observed with clang and -stdlib=libc++:
../mpd-0.23.3/src/output/plugins/PipeWireOutputPlugin.cxx:661:55: error: implicit instantiation of undefined template 'std::array<std::byte, 64>'
std::array<std::byte, MAX_CHANNELS * MAX_INTERLEAVE> buffer;
^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
2021-11-10 15:35:56 -05:00
Max Kellermann
5f4ec7de5b
decoder/ffmpeg, lib/ffmpeg: make AVCodec pointers "const"
...
For libavcodec 59 support.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1333
2021-11-09 21:09:14 +01:00
Max Audron
6f81bb4b09
upnp: add option to configure interface for db plugin
...
Add an option to the UPnP database plugin to configure which interface
is used by upnp to discover servers.
upnp by default selects the first interface that is not loopback, which
in some cases might not be the desired interface. For example if wanting
to access a DLNA server over a VPN connection.
The "interface" option can now be set to the name of the desired
interface to achieve this.
The default behaviour remains unchanged.
2021-11-08 23:04:07 +01:00
Max Audron
4ed60a5711
upnp: expose interface configuration on UpnpInit2()
...
Adds the Interface Name as an argument to the *Init functions to make it
possible to select which interface is used by upnp to detect servers.
Currently "nullptr" is passed in to let the upnp library select an
interface, as before.
2021-11-08 22:53:01 +01:00
Max Kellermann
a4e4217204
Main: ignore the "pid_file" setting if started as systemd service
...
Commit 552c30eae
caused problems for those people who still had a
"pid_file" setting (even though that is obsolete with systemd),
because now /run/mpd is owned by root:root (our mpd.service has no
User=mpd directive, so systemd starts MPD as root).
To work around this problem, and to be able to keep
RuntimeDirectory=mpd (which solved a problem of other MPD users), the
best compromise seems to just ignore the "pid_file" setting when it is
of no use.
2021-11-05 09:02:56 +01:00
Max Kellermann
8754d705a1
CommandLine: rename struct options
2021-11-05 08:57:12 +01:00
Max Kellermann
23d4a2d6a5
Main: pass struct options by reference
2021-11-05 08:56:05 +01:00
Max Kellermann
ce77b148d9
CommandLine: add option --systemd
...
This way, MPD can reliably detect whether it was started as systemd
service, which is better than checking sd_booted(), which only checks
whether systemd manages all services, but still MPD could be started
manually.
2021-11-05 08:51:49 +01:00
Max Kellermann
3413b1aeb4
output/alsa: add option thesycon_dsd_workaround
2021-11-04 17:55:53 +01:00
Max Kellermann
356d13e9dd
lib/alsa/HwSetup: add missing include
2021-11-04 17:55:15 +01:00
Max Kellermann
5d0941476a
lib/alsa/Error: a std::system_error category for libasound errors
2021-11-04 14:59:00 +01:00
Max Kellermann
5ff0bbd0f8
lib/fmt/AudioFormatFormatter: add formatter for SampleFormat
2021-11-04 14:55:01 +01:00
Max Kellermann
14b3c0f0af
event/Loop: destruct the Uring::Manager in the destructor before assert()
...
Fixes assertion failure when the EventLoop gets destructed before
Run() was ever called.
Fixes https://bugs.debian.org/998310
2021-11-03 18:32:14 +01:00
Max Kellermann
056514d598
output/snapcast: reset unflushed_input after successful read
...
With the "wave" encoder, this has no effect, but it's more correct.
2021-10-31 16:35:42 +01:00
Max Kellermann
9a21bdfd6a
output/snapcast: implement Pause()
...
This uncomments the code which had been present already in the first
Snapcast commit (copied from the "httpd" output plugin), but I
commented it because I did not know whether I needed to send silence
samples to all Snapcast clients.
As a side effect, this fixes playback when no Snapcast client is
connected; this was broken because Pause() always returned a positive
value when there were no clients.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1310
2021-10-31 16:26:29 +01:00
Max Kellermann
03f99dd26e
db/update/Walk: use GetFilenameSuffix() instead of uri_get_suffix()
...
Unlike GetFilenameSuffix(), uri_get_suffix() removes the query string
first, which breaks file names with question marks in the name.
Therefore, uri_get_suffix() shall only be applied to remote URIs.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1316
2021-10-31 13:18:24 +01:00
Max Kellermann
bfb1b641f9
db/update/InotifyUpdate: fix use-after-free bug
...
Regression by commit 2d8847f428
2021-10-28 13:39:38 +02:00
Max Kellermann
dcd19c0592
config/Path: use StringView::Split()
2021-10-26 12:55:01 +02:00
Max Kellermann
109159e0f7
Permission: use StringView::Split()
2021-10-26 12:25:47 +02:00
Max Kellermann
409b877eea
output/ao: include cleanup
2021-10-26 12:20:18 +02:00
Max Kellermann
c5bf7948ff
fs/StandardDirectory: use the RUNTIME_DIRECTORY environment variable
2021-10-26 09:30:16 +02:00
Max Kellermann
b9f7127691
fs/StandardDirectory: add GetAppRuntimeDir()
2021-10-26 09:30:16 +02:00
Max Kellermann
1e6f5f012c
fs/StandardDirectory: add GetUserRuntimeDir()
2021-10-26 09:30:16 +02:00
Max Kellermann
225d85fd9b
fs/StandardDirectory: use "if" with initializer
2021-10-26 09:29:57 +02:00
Max Kellermann
1bb22f118d
fs/StandardDirectory: add more pure/const attributes
2021-10-26 09:04:20 +02:00
Max Kellermann
48e8a26813
command/playlist: allow range in playlistdelete
2021-10-25 12:23:37 +02:00
Max Kellermann
ade847bc89
PlaylistFile: fold spl_move_index() into handle_playlistmove()
2021-10-25 12:13:45 +02:00
Max Kellermann
a6173e0eae
command/playlist: add position parameter to "playlistadd"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1106
2021-10-25 12:10:47 +02:00
Max Kellermann
258ecb764f
PlaylistFile: add class PlaylistFileEditor
2021-10-23 13:54:50 +02:00
Max Kellermann
6f595e9abb
command/queue: add optional position parameter to "add"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1285
2021-10-23 13:12:44 +02:00
Max Kellermann
35c4c7e8bf
command/queue: move #ifdef out of AddDatabaseSelection()
2021-10-23 13:09:04 +02:00
Max Kellermann
293ed924d1
command/queue: pass Partition to AddDatabaseSelection()
2021-10-23 13:06:31 +02:00
Max Kellermann
c8121176b3
output/alsa: add option "stop_dsd_silence" to work around DSD DAC noise
2021-10-23 12:25:32 +02:00
Max Kellermann
ee270f9b00
meson.build: log_dep is only needed internally
2021-10-23 12:08:43 +02:00
Max Kellermann
bf1d77a4d8
output/alsa: un-inline several methods
2021-10-23 12:02:27 +02:00
Max Kellermann
a9344fafe9
lib/alsa/AllowedFormat: use StringView::RemoveSuffix()
2021-10-23 11:43:31 +02:00
Max Kellermann
b8890726f2
lib/alsa/AllowedFormat: use std::string_view
2021-10-23 11:42:30 +02:00
Max Kellermann
0f84332654
output/alsa: make "mode" const
2021-10-23 11:39:59 +02:00
Max Kellermann
46c82259f7
output/Control: make config fields const
2021-10-22 20:22:22 +02:00
Max Kellermann
2d03823283
output/Control: fold Configure() into the constructor
2021-10-22 20:21:58 +02:00
Max Kellermann
bba144eca5
output/Control: use C++ initializers
2021-10-22 20:21:43 +02:00
Max Kellermann
9af73dad93
output/Multiple: remove unused method Add()
2021-10-22 20:21:35 +02:00
Max Kellermann
f0d66bf6a6
output/Control: pass rvalue reference to move constructor
2021-10-22 20:14:37 +02:00
Max Kellermann
5ad53a7554
output/Thread: remove duplicate code by calling InternalCloseOutput()
2021-10-22 19:54:47 +02:00
Max Kellermann
7b2e3331f2
output/Filtered: improve API docs
2021-10-22 19:54:38 +02:00
Max Kellermann
e16109330d
input/last: clear "uri" in OnCloseTimer()
...
Without clearing the "uri" field, the next Open() call attempts to
reuse the old InputStream, but it has already been closed, so Open()
always returns nullptr.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1300
2021-10-22 12:45:18 +02:00
Max Kellermann
72621531e0
protocol/Result: convert to Client method
2021-10-22 11:55:39 +02:00
Max Kellermann
0a48146efc
client/Client: pass std::string_view to Write()
...
Almost all callers have string literal, and the length is known at
compile time.
2021-10-22 11:54:14 +02:00
Max Kellermann
0c4bf12bfd
player/CrossFade: fix inverted check and wrong variable
...
The inverted check was introduced by commit 46d00dd85f
, and commit
8ad17d25ef
added a check for the wrong variable. D'oh!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1303
2021-10-22 11:49:38 +02:00
Max Kellermann
b8e0855ef3
output/pipewire: obey PipeWire's DSD bit order and interleave
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1297
2021-10-21 21:15:16 +02:00
Max Kellermann
6467502b9d
output/pipewire: restore SampleFormat::DSD after ToPipeWireAudioFormat() call
2021-10-21 21:15:13 +02:00
Max Kellermann
15b67f20e5
output/pipewire: un-inline ParamChanged()
2021-10-21 20:11:22 +02:00
Max Kellermann
0825179f00
output/pipewire: add local reference variables
2021-10-21 20:02:59 +02:00
Max Kellermann
97211d0aad
output/pipewire: rename field "buffer" to "pod_buffer"
2021-10-21 20:02:32 +02:00
Max Kellermann
029c499bfa
output/pipewire: use std::fill_n()
2021-10-21 20:01:44 +02:00
Max Kellermann
0ba867ec16
output/pipewire: use MAX_CHANNELS, not SPA_AUDIO_MAX_CHANNELS
...
MPD supports only 8 channels, so MAX_CHANNELS is enough, the array
doens't need to be SPA_AUDIO_MAX_CHANNELS (which is 64).
2021-10-21 20:01:01 +02:00
Max Kellermann
866d147122
output/pipewire: make field "channels" unsigned
2021-10-21 19:59:48 +02:00
Max Kellermann
32851d1bc7
output/pipewire: DSD support
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1297
2021-10-20 11:39:54 +02:00
Max Kellermann
78257408b4
output/pipewire: report errors from the "state_changed" callback
2021-10-20 11:24:57 +02:00
Max Kellermann
f447b7615e
output/pipewire: check pw_stream_connect() errors
2021-10-20 11:24:51 +02:00
Max Kellermann
1f780b7209
output/Thread: log exception details
2021-10-20 11:24:51 +02:00
Max Kellermann
04bf8a6b1a
output/pipewire: fix memory leak in SendTag()
2021-10-20 10:16:36 +02:00
Max Kellermann
c4c64854d4
output/pipewire: evaluate errno after libpipewire function calls
2021-10-20 10:13:27 +02:00
Max Kellermann
17562dc90b
output/pipewire: remove misplaced noexcept
2021-10-20 09:41:27 +02:00
Max Kellermann
7b24316734
output/pipewire: fix coding style
2021-10-20 09:41:10 +02:00
Max Kellermann
5fab107fd3
lib/nfs/FileReader: use the thread-safe InjectEvent
...
.. instead of DeferEvent, which is not thread-safe. This caused
various playback problems, which was initially caused by the
DeferEvent/InjectEvent split in commit 774b4313f2
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1298
2021-10-20 09:38:09 +02:00
Max Kellermann
f31920e092
event/Loop: add thread assert() to AddDefer()
...
Currently fails in class NfsFileReader due to
https://github.com/MusicPlayerDaemon/MPD/issues/1298
2021-10-20 09:26:27 +02:00
Max Kellermann
eb111a10e7
output/pipewire: remove redundant prefix and newline from log message
2021-10-19 14:38:37 +02:00
Nicolai Syvertsen
5ccf78855d
Implement SendTag for PipeWire output plugin
2021-10-19 14:31:40 +02:00
Max Kellermann
fd5a3b5880
client/Response: reimplement Error() without FmtError()
...
With libfmt versions older than 7, this leads to an endless recursion
between Error() and FmtError(), resulting in a crash due to stack
overflow. D'oh!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1295
2021-10-19 13:40:11 +02:00
Max Kellermann
6120c1360c
neighbor/Glue: remove unreachable "throw" statement
...
Should have been removed by commit a8087dc12c
2021-10-19 13:40:11 +02:00
Max Kellermann
a8087dc12c
neighbor/Glue: mention failed plugin name in error message
2021-10-19 13:29:00 +02:00
Max Kellermann
070c03dbf7
event/Thread, ...: fix printf->libfmt remains
2021-10-19 13:19:07 +02:00
Max Kellermann
4f1e79b6b8
filter/ReplayGain: emit "mixer" event when replay gain changes volume
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1294
2021-10-19 10:03:21 +02:00
Max Kellermann
aa9933c0b5
output/pipewire: add noexcept
2021-10-19 08:58:50 +02:00
Max Kellermann
0697d1f859
output/pipewire: include cleanup
2021-10-19 08:57:33 +02:00
Nicolai Syvertsen
b941a7df83
Implement volume updates for pipewire output
2021-10-19 00:01:45 +02:00
Max Kellermann
31151cec3c
command/playlist: "load" supports relative positions
...
This commit also increases the PROTOCOL_VERSION so clients can detect
the availability of the feature.
2021-10-18 22:08:22 +02:00
Max Kellermann
07e8c338df
command/queue: move position parameter functions to separate library
2021-10-18 22:07:04 +02:00
Max Kellermann
b22d7218aa
command/player, ...: use decimal notation
...
During the libfmt migration, I converted "%1.3f" to just "{:1.3}"
without the "f" suffix, but libfmt defaults to scientific notation,
which can break some MPD clients.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1291
2021-10-18 16:54:53 +02:00
Max Kellermann
d5be8c74b0
output/pipewire: attempt to change the graph sample rate
...
Requires PipeWire 0.3.32.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1283
2021-10-18 16:46:23 +02:00
Max Kellermann
c112cb60da
output/snapcast: fix typo which caused "Failed to get chunk"
...
This bug caused a 9 second offset in all time stamps. Due to that,
the Snapcast server thought the chunks are too old and discarded them.
Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1287
2021-10-18 16:40:11 +02:00
Max Kellermann
907af2ad02
Permission: refactor getPermissionFromPassword() to return std::optional
...
This replaces the output parameter (which is bad API design). As a
side effect, it fixes the bad [[gnu::pure]] attribute added by commit
a636d2127
which caused optimizing compilers to miscompile calls to
that function. "Pure" functions can be assumed to have no output
arguments, so the compiler can assume the function doesn't modify
them.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1282
2021-10-17 19:58:50 +02:00
Thomas Zander
6a2e7bbc02
protocol/ArgParser.cxx: Add missing #include <stdio.h>
...
Fixes a build problem on platforms where stdio.h is not included
transitively. snprintf() is defined in stdio.h.
2021-10-16 17:38:07 +02:00
Max Kellermann
771c46032f
meson.build: add missing libfmt dependencies
...
Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1281
The problem occurred when there was libfmt-dev installed, but it was
too old (e.g. on Debian Buster), and Meson used the wrap fallback.
Those internal MPD libraries where the libfmt dependency was not
declared were still using the old system libfmt headers, which are not
ABI-compatible with MPD's own libfmt build.
2021-10-15 14:26:59 +02:00
Max Kellermann
85611aa456
storage/smbclient: add StoragePlugin.prefixes
...
Should have been part of commit
ef24cfa523
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1279
2021-10-15 10:24:30 +02:00
Max Kellermann
466b5cb08d
neighbor/smbclient: FmtError() instead of FormatErrno()
...
Fixes part 2 of https://github.com/MusicPlayerDaemon/MPD/issues/1279
2021-10-15 09:40:36 +02:00
Max Kellermann
3f2f3251cb
neighbor/smbclient: use [[gnu::pure]]
...
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1279
2021-10-15 09:39:34 +02:00
Max Kellermann
608896571c
command/queue: add position parameter to "load"
...
Another one from https://github.com/MusicPlayerDaemon/MPD/issues/888
2021-10-14 15:11:11 +02:00
Max Kellermann
2e5ca1cbd2
command/database: add "position" parameter to "findadd" and "searchadd"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/888
2021-10-14 15:03:02 +02:00
Max Kellermann
680fb51c37
Permission: add "player" to default permission set
...
Forgot that in commit 9a766f4cd9
2021-10-14 14:58:38 +02:00
Max Kellermann
77d74b404e
Permission: add option "host_permissions"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1115
2021-10-14 14:44:18 +02:00
Max Kellermann
a636d2127a
Permission: add "pure" attributes
2021-10-14 14:26:51 +02:00
Max Kellermann
9a766f4cd9
Permission: split permission "player" from "control"
...
Some users want certain clients to fully control playback, but do not
want them to be able to trigger database update.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1124
2021-10-14 14:19:51 +02:00
Max Kellermann
8ad17d25ef
player/CrossFade: do not cross-fade songs shorter than 20 seconds
...
From the feature request: "I generally like to have crossfade on, but
when it happens during such short tracks (e.g. 20 seconds or less) it
doesn't really sound good as those tracks are not really meant to be
crossfaded and intended to act as a bridge on their own."
Sounds reasonable. This commit doesn't add an option, but hard-codes
the limit to 20 seconds. If it turns out that users want to have it
configurable, we can still add the option.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1184
2021-10-14 13:47:24 +02:00
Max Kellermann
46d00dd85f
player/CrossFade: move code to CanCrossFadeSong()
2021-10-14 13:42:27 +02:00
Max Kellermann
ec52b13449
player/CrossFade: add method IsEnabled()
2021-10-14 13:41:50 +02:00
Max Kellermann
cf6ca1b0ba
player/CrossFade: use C++11 initializers
2021-10-14 13:38:42 +02:00
Max Kellermann
37bd6de658
db/simple: add option to hide CUE target songs
...
This reduces duplicates in the music database by hiding the original
song file when it is referenced by a CUE sheet.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1275
2021-10-14 13:28:37 +02:00
Max Kellermann
f7622ca332
db/update/Walk: move PurgeDanglingFromPlaylists() to Playlist.cxx
2021-10-14 13:12:10 +02:00
Max Kellermann
b82b56970b
db/simple/Song: reorder fields for better packing
2021-10-14 12:55:02 +02:00
Max Kellermann
e4eb5b79c9
output/shout: move shout_new() call to Enable()
...
Don't allocate any memory until the output is really enabled.
2021-10-14 12:28:36 +02:00
Max Kellermann
1cfea20b22
output/shout: remove the defunct "timeout" option
...
The implementation was removed 12 years ago in commit f6455d5f79
and
nobody missed it.
2021-10-14 12:04:13 +02:00
Max Kellermann
efa3ffa8d8
Revert "db/update/playlist: remove non-existent targets while scanning"
...
This reverts commit 9200fa6d06
. It was
wrong because it works only if the target song has already been
scanned.
2021-10-14 11:50:41 +02:00
Max Kellermann
1b8c94d6b9
db/update/Playlist: move code to another UpdatePlaylistFile() method
2021-10-14 11:36:45 +02:00
Max Kellermann
cd5c1f3f45
db/update/playlist: remove empty playlist directories
2021-10-13 19:23:24 +02:00
Max Kellermann
9200fa6d06
db/update/playlist: remove non-existent targets while scanning
2021-10-13 19:23:24 +02:00
Max Kellermann
1bbe9896f6
Main: make inotify errors non-fatal
2021-10-13 18:55:05 +02:00
Max Kellermann
2d8847f428
db/update/InotifyUpdate: convert to class, no global variables
2021-10-13 18:47:56 +02:00