Max Kellermann
e7353ec7e7
Queue: "setprio" re-enqueues old song if priority has been raised
...
This commit changes a minor queue priority design to something which
makes a little bit more sense.
Previously, a song that had already been played would only be
re-enqueued if its priority had just been raised above the current
song's. This means that if it was already above, it was not
re-enqueued. That is a surprising behavior, because users expect a
song to be played when its priority is raised.
Now the song is always re-enqueued if its priority is raised (and
above the current song's - no matter if it has already been above
before).
https://bugs.musicpd.org/view.php?id=4592
2016-12-09 13:02:26 +01:00
Max Kellermann
e3237f057d
systemd: more paranoid security settings
2016-12-09 10:41:44 +01:00
Florian Schlichting
54d5d9d1cc
systemd: protect /usr when running under systemd
2016-12-09 10:41:44 +01:00
Clément B
31d9aebf0b
systemd: also disable mpd.socket when disabling mpd.service
...
e.g. when running 'update-rc.d mpd disable'
2016-12-09 10:41:43 +01:00
Max Kellermann
5013de6770
LogInit: convert use_stdout flag to out_fd=STDOUT_FILENO
2016-12-04 20:15:45 +01:00
Max Kellermann
301abac0c1
LogInit: initialize out_fd properly to avoid closing stdin
2016-12-04 20:13:37 +01:00
Max Kellermann
9614c48e4c
LogInit: throw exception instead of calling FatalError()
2016-12-04 20:07:41 +01:00
Max Kellermann
c6e1ca1c22
system/Error: use std::generic_category() for errno on Windows
...
It's wrong to use std::system_category() for both GetLastError() and
errno on Windows. Apparently, everybody uses std::generic_category()
for errno values, which appears to be a safe choice.
Some discussion on this confusing topic can be found here:
https://stackoverflow.com/questions/28746372/system-error-categories-and-standard-system-error-codes
2016-12-04 20:07:11 +01:00
Max Kellermann
30dc473697
system/Error: allow using errno functions on Windows
...
The Windows standard library emulates part of POSIX, which includes
errno.
2016-12-04 20:07:09 +01:00
Max Kellermann
65974ceabc
PlaylistFile: remove redundant existence check
2016-12-04 20:04:16 +01:00
Max Kellermann
6caf53d1c2
fs/FileSystem: RenameFile() throws exception on error
2016-12-04 19:59:33 +01:00
Max Kellermann
dee6e498d9
fs/CheckFile: use IsAccessDenied()
2016-12-04 19:56:25 +01:00
Max Kellermann
b3723274f7
decoder/Bridge: move code to DecoderControl::SetReady()
2016-12-03 14:20:51 +01:00
Max Kellermann
9fb7cc796b
decoder/Control: add attribute configured_audio_format
...
Obsoletes the same variable from AudioConfig.cxx.
2016-12-03 14:12:08 +01:00
Max Kellermann
3472208c05
ReplayGainGlobal: move replay_gain_mode to struct Partition
2016-12-03 13:56:25 +01:00
Max Kellermann
fc30e1d559
Partition: pass ReplayGainConfig to constructor
2016-12-03 13:55:14 +01:00
Max Kellermann
cd4bb444ff
player/Control: make ReplayGainConfig const
2016-12-03 13:47:13 +01:00
Max Kellermann
e443513996
Main: call replay_gain_global_init() before forking
2016-12-03 13:27:59 +01:00
Max Kellermann
3d16f22135
player/Control: use C++11 initializers
2016-12-03 13:08:00 +01:00
Max Kellermann
6cc1ff5eeb
decoder/Control: make ReplayGainConfig const
2016-12-03 13:05:25 +01:00
Max Kellermann
3000b9dcde
filter/ReplayGain: add ReplayGainConfig copy
...
Remove dependency on ReplayGain global variables.
2016-12-03 12:51:02 +01:00
Max Kellermann
3b867462a3
filter/ReplayGain: remove FilterPlugin instance, add explicit constructor
2016-12-03 12:34:23 +01:00
Max Kellermann
b8aa9348b9
filter/Registry: make filter_plugins static
2016-12-03 12:24:30 +01:00
Max Kellermann
513e3a3d21
filter/ReplayGain: forward-declare struct ReplayGainInfo
2016-12-03 12:20:32 +01:00
Max Kellermann
bfb0897b54
filter/ReplayGain: convert pointers to references
2016-12-03 12:13:45 +01:00
Max Kellermann
86e8b8c10d
decoder/Thread: skip the ReplayGain loader if the feature is disabled
...
https://bugs.musicpd.org/view.php?id=4595
2016-11-25 13:26:40 +01:00
Max Kellermann
ee57c3490a
{decoder,player}/Control: add ReplayGain{Config,Mode} attributes
...
Don't use the global variables in class DecoderBridge; instead,
forward these values to the decoder thread via PlayerControl and
DecoderControl.
2016-11-25 12:51:55 +01:00
Max Kellermann
77c1f54876
ReplayGainConfig: add struct ReplayGainConfig, move globals to ReplayGainGlobal.cxx
2016-11-25 11:13:08 +01:00
Max Kellermann
dc5984d0e0
ReplayGainConfig: move code to ParsePreamp()
2016-11-24 17:45:27 +01:00
Max Kellermann
7afbd4800f
filter/ReplayGain: use ToString(ReplayGainMode)
2016-11-24 17:39:00 +01:00
Max Kellermann
0720702c91
ReplayGainMode: add ToString(), FromString()
...
Move code from ReplayGainConfig.cxx.
2016-11-24 17:34:57 +01:00
Max Kellermann
5f396e824f
ReplayGainMode: convert to strictly-typed enum
2016-11-24 17:34:57 +01:00
Max Kellermann
4f229c254c
ReplayGainInfo: move enum ReplayGainMode to separate header
2016-11-24 17:34:57 +01:00
Max Kellermann
25e58df5e0
ReplayGainInfo: don't use array in struct ReplayGainInfo
...
Declare two named elements. An enum should not be used as an array
index, as this is error prone.
2016-11-24 17:34:57 +01:00
Max Kellermann
1261327fa6
ReplayGainInfo: implement fallback in Get()
...
Eliminates Complete().
2016-11-24 17:34:57 +01:00
Max Kellermann
09c3cc58e4
ReplayGainInfo: add method Get()
2016-11-24 17:34:57 +01:00
Max Kellermann
7ef31f84a7
command/Error: translate std::invalid_argument to ACK_ERROR_ARG
2016-11-24 17:33:36 +01:00
Max Kellermann
85c2b396ce
test/FakeDecoderAPI: move code to DumpReplayGainTuple()
2016-11-24 17:17:30 +01:00
Max Kellermann
0759d72108
Partition: add UpdateEffectiveReplayGainMode()
...
Move code from replay_gain_get_real_mode().
2016-11-24 15:18:57 +01:00
Max Kellermann
9b9144f25d
decoder/Control: use C++11 initializers
2016-11-24 14:58:17 +01:00
Max Kellermann
b677e891b4
decoder/{mikmod,modplug}: throw exception instead of calling FatalError()
2016-11-24 14:09:58 +01:00
Max Kellermann
509f62f68d
output/MultipleOutputs: throw exception instead of calling FatalError()
2016-11-24 14:04:40 +01:00
Max Kellermann
868bf752f3
MusicPipe: disallow copying
2016-11-23 18:06:15 +01:00
Max Kellermann
051cdc9670
MusicPipe: use C++11 initializers
2016-11-23 18:04:23 +01:00
Max Kellermann
4de5c216ff
MusicChunk: disallow copying
2016-11-23 17:57:29 +01:00
Max Kellermann
ad2c7304ea
MusicChunk: use C++11 initializers
2016-11-23 17:56:36 +01:00
Max Kellermann
4dd1309c3f
filter/Plugin: rename with CamelCase
2016-11-23 17:43:50 +01:00
Steven OBrien
541da2740d
db/simple: add missing "return"
...
SimpleDatabase::Visit() always throws exception when visiting a song.
Adding a song to the queue always results in a "No such directory"
error response, although the song is successfully added. This
behaviour was introduced by commit
3ff728ab02
. This patch fixes this.
https://bugs.musicpd.org/view.php?id=4601
2016-11-23 17:30:30 +01:00
Max Kellermann
95e2bec215
decoder/DecoderPlugin: container_scan() returns forward_list<DetachedSong>
...
Speed up container_scan() again, by eliminating the need to call
scan_file() for each item.
2016-11-22 16:49:31 +01:00
Max Kellermann
72c96052b4
decoder/gme: move gme_container_scan() down
2016-11-22 16:49:30 +01:00