Max Kellermann
fdb28eb0c4
fs/NarrowPath: preserve nullptr in Path operator
...
Fixes Path::IsNull() checks on Windows.
2020-04-23 17:10:28 +02:00
Max Kellermann
7ded244a61
lib/nfs/Connection: pass POLLHUP and POLLERR to nfs_service()
2020-04-23 16:58:53 +02:00
Max Kellermann
8ed533acf3
event/SocketMonitor: handle epoll_ctl()=EBADF/ENOENT in Schedule()
...
This fixes a freeze bug in the NFS input/storage plugins: when libnfs
auto-reconnets after a failure, it installs the new socket on the same
file descriptor number. MPD's attempt to unregister the old socket by
calling SocketMonitor::Steal() from NfsConnection::ScheduleSocket()
fails because the new/old socket number is not registered in epoll, so
epoll_ctl() returns ENOENT. The problem is that it left
`scheduled_flags`, and so subsequent Schedule() calls will use
`EPOLL_CTL_MOD`, which will fail again and again. Instead, we need to
use `EPOLL_CTL_ADD` to register the new socket.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/806
Closes https://github.com/MusicPlayerDaemon/MPD/issues/756
2020-04-23 16:58:26 +02:00
Max Kellermann
a27580d0cc
lib/nfs/Connection: don't pass HANGUP to Schedule()
...
This flag is output-only.
2020-04-23 15:21:04 +02:00
Max Kellermann
905db05cf9
zeroconf/AvahiPoll: don't pass ERROR|HANGUP to Schedule()
...
These flags are output-only.
2020-04-23 15:19:24 +02:00
Max Kellermann
4242aee21e
event/SocketMonitor: remove HANGUP|ERROR from ScheduleRead()
...
These flags are output-only. Using them here is misleading.
2020-04-23 15:18:18 +02:00
Max Kellermann
e71bd2a08b
event/PollGroupWinSelect: make EVENT_{READ,WRITE} static
2020-04-23 15:10:57 +02:00
Max Kellermann
e53a4d0a9e
lib/nfs/FileReader: reset state
in OnNfsCallback()
...
The object's state is `IDLE` when OnNfsCallback() gets invoked, so
let's use the start of the method to reset the `state` field.
2020-04-23 14:54:52 +02:00
Max Kellermann
159389164a
lib/nfs/FileReader: set state=IDLE
before invoking callback
...
Fixes assertion failure if the callback fails.
2020-04-23 14:51:43 +02:00
geneticdrift
0a92fbc18e
tag/Fallback: add tag fallback for AlbumSort
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/832
2020-04-22 22:00:38 +02:00
Max Kellermann
138c29320b
gme: adapt to API change in the upcoming version 0.7.0
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/833
2020-04-22 21:53:00 +02:00
Max Kellermann
8f00dbea45
lib/icu/Compare: add Windows implementation
...
Using CompareStringEx() and FindNLSStringEx().
Implements a missing piece for
https://github.com/MusicPlayerDaemon/MPD/issues/820
2020-04-22 21:42:12 +02:00
Max Kellermann
f3fd2eb618
lib/icu/Compare: use AllocatedString::Clone()
2020-04-22 21:39:13 +02:00
Max Kellermann
fc92db83cf
lib/icu/Collate: use NORM_IGNORECASE instead of LINGUISTIC_IGNORECASE
...
LINGUISTIC_IGNORECASE is unimplemented on Wine, but since we don't
have any locale support (yet), and we're using LOCALE_NAME_INVARIANT,
NORM_IGNORECASE should essentially be the same, so why bother.
2020-04-22 21:39:13 +02:00
Max Kellermann
3b0f8d5516
lib/icu/CaseFold: remove Windows implementation
...
Reverts commit fb3564fbe7
LCMapStringEx() doesn't do what I imagined it would do 5 years ago.
D'oh!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/820
2020-04-22 19:32:36 +02:00
Rosen Penev
a5273d6992
Fix unsafe float comparison.
...
Switching == to >= should be safe here since the next if is the opposite.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-22 18:21:40 +02:00
Thomas Guillem
b18074f899
storage/curl: fix path comparison when the server escapes differently
...
Unescape the base path and the path coming from the server (href) to fix the
comparison when the server uses different escaped characters.
The outputted name need to be unescaped. Doing that before or after the
HrefToEscapedName() call should not change the current behavior.
2020-04-15 13:50:12 +02:00
Thomas Guillem
3d8067a041
storage/curl: fix href when file has a '&' char
...
If the file name is "Hello & bye", 3 CharacterData events will be sent with the
State::HREF state:
- "Hello%20"
- "&"
- "%20bye"
Reproduced with files hosted on an apache2 DAV server: 2.4.38-3+deb10u3.
2020-04-15 13:18:16 +02:00
Florian Heese
f6fe001fa9
Added missing channel order setups for ALSA
2020-04-15 13:13:09 +02:00
Max Kellermann
32a5bf043b
player/Thread: drain outputs at end of song in "single" mode
...
Without this, the Pause() call would drop the ring buffers and would
skip a considerable portion of the end of the song.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/824
2020-04-14 16:07:03 +02:00
Max Kellermann
8d2079482f
Merge branch 'lkj' of git://github.com/neheb/MPD into v0.21.x
2020-04-14 13:12:42 +02:00
Max Kellermann
c331c75fde
increment version number to 0.21.23
2020-04-14 13:12:36 +02:00
Rosen Penev
6080c3b4ba
Math.hxx: move cmath include out of define
...
The _GLIBCXX_USE_C99_MATH macro is defined in glibcxx by c++config.h, which
gets included by every header. Which means a header needs to be present.
(cherry picked from commit 79e9aff338
)
2020-04-09 14:24:06 -07:00
Max Kellermann
5ccfcffcc1
release v0.21.22
2020-04-02 17:48:56 +02:00
Max Kellermann
afe2aaa5f6
fs/io/GzipOutputStream: increase buffer size to 16 kB
...
Reduce I/O overhead.
2020-04-02 17:17:58 +02:00
Max Kellermann
9b11caa0e6
fs/io/BufferedReader: larger default buffer (4 kB -> 16 kB)
...
Reduce I/O overhead.
2020-04-02 17:17:27 +02:00
Max Kellermann
a689b881d3
test/meson.build: work around linker failure due to statically linked CURL
2020-04-02 17:16:05 +02:00
Max Kellermann
e94c436264
src/event/meson.build: depend in libnet.a
...
The event library uses various libnet.a classes,
e.g. SocketDescriptor.
2020-04-02 17:16:05 +02:00
Max Kellermann
bad829509e
test/ShutdownHandler: add inline
to work around Windows linker problems
2020-04-02 17:16:05 +02:00
Max Kellermann
9c66b0414a
test/*: fix Windows build using class FromNarrowPath
2020-04-02 17:16:05 +02:00
Max Kellermann
4d453a8313
fs/NarrowPath: add class FromNarrowPath
...
Move code from ParseCommandLine().
2020-04-02 17:15:34 +02:00
Max Kellermann
61d7b436a2
fs/NarrowPath: un-inline Windows constructor
2020-04-02 16:27:44 +02:00
Max Kellermann
cdddaf21b0
db/simple/Directory: optimize GetName() using the parent's path
...
This method gets called a lot during MPD startup, via FindChild() and
directory_load_subdir(), so this is worth optimizing at the expense of
code readability.
This speeds up MPD startup by 10%.
2020-04-02 16:12:08 +02:00
Max Kellermann
b267ba5f0a
tag/Pool: enlarge hash table
...
This consumes more memory (plus 48 kB on 32 bit systems), but reduces
the number of hash collisions, speeding up MPD startup with large
databases.
2020-04-02 15:45:35 +02:00
Max Kellermann
8270043053
Revert "decoder/ffmpeg: copy the AVPacket in ffmpeg_send_packet()"
...
This reverts commit eb192137d6
.
This is no longer necessary because we require FFmpeg 3.1 or newer
since MPD 0.21.2.
This fixes a deprecation warning because the implicit AVPacket copy
constructor copies the deprecated attribute `convergence_duration`.
2020-04-01 17:30:28 +02:00
Max Kellermann
c00ce42bca
python/build/libs.py: update libmpdclient to 2.18
2020-04-01 17:17:30 +02:00
Max Kellermann
3852ddbbce
.travis.yml: install more packages on OSX
...
Enable lots of plugins for better CI coverage.
2020-04-01 16:37:45 +02:00
Max Kellermann
672bc3ab67
time/Convert: fix GetTimeZoneOffset() on Windows
...
Was using the wrong parameter.
2020-04-01 16:21:29 +02:00
Max Kellermann
62229f14da
test/time: add test for LocalTime(), GmTime()
2020-04-01 16:21:29 +02:00
Max Kellermann
a4c925c8d7
test/meson.build: move TestTime to time/
2020-04-01 16:12:01 +02:00
Max Kellermann
60610e90b1
test/net/TestIPv[46]Address: fix Windows build errors
2020-04-01 16:09:24 +02:00
Max Kellermann
90184e0ce7
python/build/libs.py: update CURL to 7.69.1
2020-04-01 15:49:16 +02:00
Max Kellermann
9c3e1d450a
fs/io/GunzipReader: increase buffer size to 64 kB
...
Reduces I/O overhead while reading a compressed database file.
2020-03-31 15:07:39 +02:00
Thomas Guillem
60f2116202
android/Settings: remove the EXPIRIMENTAL text
...
Using MPD from Android since quite some times now. I consider it very stable
now.
2020-03-26 17:31:31 +01:00
Thomas Guillem
4ff2532330
android: add TV support
...
TODO: Not sure the app could be accepted on the play store without a valid
banner.
2020-03-26 17:31:20 +01:00
Thomas Guillem
9c15760c4d
android/Main: handle API26 NotificationChannel
...
This seems to be required on recent Android versions (tested with Android 10).
This is also required for android TV services (cf. next commit).
This is done using Java reflection so that the project doesn't depend on
android compat libs.
2020-03-26 17:30:55 +01:00
Max Kellermann
e1c43ec65f
Merge branch 'ucl' of git://github.com/neheb/MPD into v0.21.x
2020-03-26 17:28:21 +01:00
Thomas Guillem
4dd10894ba
lib/curl/Request: fix Exception "error" on Android
...
Apparently, it's not possible to change CURLOPT_NETRC on Android.
2020-03-26 17:26:14 +01:00
Rosen Penev
608d7ec1e7
[clang-tidy] change integer prefixes to uppercase
...
Found with readability-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26 17:25:20 +01:00
Max Kellermann
8474599ed6
lib/curl/Easy: add method Unpause()
2020-03-26 17:22:10 +01:00