Commit Graph

16590 Commits

Author SHA1 Message Date
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
Max Kellermann
72f6e018e7 Log: remove the obsolete printf-style functions 2021-10-13 17:41:19 +02:00
Max Kellermann
2fbbd540bb more [[gnu::...]] attributes 2021-10-13 17:38:01 +02:00
Max Kellermann
18f64b5fb7 system/FatalError: remove obsolete library 2021-10-13 16:53:01 +02:00
Max Kellermann
d2a8b1e8a5 db/update/InotifySource: make errors non-fatal 2021-10-13 16:53:01 +02:00
Max Kellermann
184e8eca7c win32/Win32Main: throw on error 2021-10-13 16:37:56 +02:00
Max Kellermann
0a8886704a Main: move top-level exception handler to main()
Allows win32_main() to throw exceptions.
2021-10-13 16:37:34 +02:00
Max Kellermann
0712314d23 archive/{zzip,iso9660}: ignore file names which are invalid UTF-8
These malformed strings must not be transferred over the wire, because
the MPD protocol is defined to be UTF-8.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1274
2021-10-13 15:51:08 +02:00
Max Kellermann
f8cbba1850 util/Alloc: remove unused library 2021-10-13 14:48:16 +02:00
Max Kellermann
635ec3ce37 util/VarSize: use plain malloc() 2021-10-13 14:46:40 +02:00
Max Kellermann
8e71130e8a tag/FixString: use class AllocatedArray 2021-10-13 14:40:33 +02:00
Max Kellermann
ed7baf3ae1 tag/Id3Scan: use StringView::Strip() instead of duplicating the string 2021-10-13 14:32:43 +02:00
Max Kellermann
1e159af2ce tag/Id3Scan: merge duplicate code into InvokeOnTag() 2021-10-13 14:30:57 +02:00
Max Kellermann
dffed6e393 tag/Id3Scan: add class Id3String 2021-10-13 14:24:17 +02:00
Max Kellermann
bf656af555 playlist/SoundCloud: use AllocatedString for concatenation 2021-10-13 12:47:57 +02:00
Max Kellermann
d2b8852d19 playlist/SoundCloud: move code to TranslateSoundCloudUri() 2021-10-13 12:23:15 +02:00
Max Kellermann
7d4de71899 sticker/SongSticker: use AllocatedString for concatenation 2021-10-13 12:19:45 +02:00
Max Kellermann
e1c16d78e4 decoder/wavpack: use AllocatedString for concatenation 2021-10-13 12:15:57 +02:00
Max Kellermann
a49b49cba7 decoder/wavpack: fix WVC file support
The wrong variable was used.  This has been broken by commit
4eeea640f4 seven years ago - and nobody as noticed, d'oh!
2021-10-13 12:11:39 +02:00
Max Kellermann
f510564d9d more [[gnu::...]] attributes 2021-10-13 12:07:05 +02:00
Max Kellermann
1c4b484a56 avahi/Poll: use FineTimerEvent in AvahiTimeout
libavahi-client uses this one to schedule events immediately.
However, CoarseTimerEvent may be called too late, and cause timeouts.
2021-10-13 11:13:54 +02:00
Max Kellermann
b394d8d059 net/Resolver: include cleanup 2021-10-13 11:06:10 +02:00
Max Kellermann
a15c1c71d5 util/WritableBuffer: add WritableBuffer<void>::{FromVoid,ToVoid}() 2021-10-13 11:05:33 +02:00
Max Kellermann
8d679e7e00 util/IntrusiveList: add IntrusiveList::swap() 2021-10-13 11:04:42 +02:00
Max Kellermann
2b30ac2351 util/IntrusiveList: add another missing ToNode() call 2021-10-13 11:04:21 +02:00
Max Kellermann
1c97793b49 util/IntrusiveList: do not use the deprecated class std::iterator
Deprecated in C++17.  Since C++17, one is supposed to declare those 5
types manually.
2021-10-13 11:03:49 +02:00
Max Kellermann
4dae8b41da event/PipeEvent: new class wrapping SocketEvent 2021-10-13 10:45:55 +02:00
Max Kellermann
be8ed2f59e tag/Settings: use [[gnu::const]] 2021-10-13 10:37:26 +02:00
Max Kellermann
08491fcd86 tag/Format: use [[gnu::pure]] 2021-10-13 10:37:26 +02:00
Max Kellermann
abed633fcb tag/FixString: use [[gnu::pure]] 2021-10-13 10:37:26 +02:00
Max Kellermann
db2a9cb6d5 tag/Builder: use [[gnu::pure]] 2021-10-13 10:37:26 +02:00
Max Kellermann
7caeb3b0d8 tag/ParseName: use [[gnu::pure]] 2021-10-13 10:32:22 +02:00
Max Kellermann
08500be239 tag/VorbisComment: use [[gnu::pure]] 2021-10-13 10:31:51 +02:00