From c26703b7e61576c94dd720ff89cd4162ddede250 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Oct 2018 18:34:47 +0200 Subject: [PATCH 1/7] SongFilter: check value.empty() after checking tag fallbacks In this new order, a filter 'AlbumArtist ""' matches only on songs which neither have `AlbumArtist` nor `Artist`. --- NEWS | 1 + src/SongFilter.cxx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 8b0029784..2ca870de9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.20.22 (not yet released) * protocol - add tag fallbacks for AlbumArtistSort, ArtistSort + - fix empty string filter on fallback tags - "count group ..." can print an empty group - fix broken command "list ... group" * storage diff --git a/src/SongFilter.cxx b/src/SongFilter.cxx index faf5deb2a..8f6d3c67f 100644 --- a/src/SongFilter.cxx +++ b/src/SongFilter.cxx @@ -110,15 +110,6 @@ SongFilter::Item::Match(const Tag &_tag) const noexcept } if (tag < TAG_NUM_OF_ITEM_TYPES && !visited_types[tag]) { - /* If the search critieron was not visited during the - sweep through the song's tag, it means this field - is absent from the tag or empty. Thus, if the - searched string is also empty - then it's a match as well and we should return - true. */ - if (value.empty()) - return true; - bool result = false; if (ApplyTagFallback(TagType(tag), [&](TagType tag2) { @@ -136,6 +127,15 @@ SongFilter::Item::Match(const Tag &_tag) const noexcept return true; })) return result; + + /* If the search critieron was not visited during the + sweep through the song's tag, it means this field + is absent from the tag or empty. Thus, if the + searched string is also empty + then it's a match as well and we should return + true. */ + if (value.empty()) + return true; } return false; From 61eff1cddf8e69eec313042fd2edae5f590ae099 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Oct 2018 18:39:50 +0200 Subject: [PATCH 2/7] Makefile.am: install the SVG icon Closes #366 --- Makefile.am | 7 +++++++ NEWS | 1 + 2 files changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index 50b98da76..00687936c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1702,6 +1702,13 @@ FILTER_LIBS = \ $(PCM_LIBS) +# +# Icon +# + +iconsdir = $(datadir)/icons/hicolor/scalable/apps +icons_DATA = mpd.svg + # # systemd unit # diff --git a/NEWS b/NEWS index 2ca870de9..dae501a4f 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ ver 0.20.22 (not yet released) - now runs as a service - add button to start/stop MPD - add option to auto-start on boot +* install the SVG icon ver 0.20.21 (2018/08/17) * database From 005e6913395f5ec2d8838667f8987e1eaf7b5de2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Oct 2018 18:44:28 +0200 Subject: [PATCH 3/7] decoder/fluidsynth: adapt to API change in version 2.0 Closes #360 --- NEWS | 2 ++ src/decoder/plugins/FluidsynthDecoderPlugin.cxx | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index dae501a4f..6553fbef0 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ ver 0.20.22 (not yet released) - fix broken command "list ... group" * storage - curl: URL-encode paths +* decoder + - fluidsynth: adapt to API change in version 2.0 * Android - now runs as a service - add button to start/stop MPD diff --git a/src/decoder/plugins/FluidsynthDecoderPlugin.cxx b/src/decoder/plugins/FluidsynthDecoderPlugin.cxx index 3eaf1d67e..88a841142 100644 --- a/src/decoder/plugins/FluidsynthDecoderPlugin.cxx +++ b/src/decoder/plugins/FluidsynthDecoderPlugin.cxx @@ -64,7 +64,12 @@ fluidsynth_level_to_mpd(enum fluid_log_level level) * logging library. */ static void -fluidsynth_mpd_log_function(int level, char *message, gcc_unused void *data) +fluidsynth_mpd_log_function(int level, +#if FLUIDSYNTH_VERSION_MAJOR >= 2 + const +#endif + char *message, + void *) { Log(fluidsynth_domain, fluidsynth_level_to_mpd(fluid_log_level(level)), From e4e14ef6b0ee4a4dd7300c03ab2700669f5be1a6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Oct 2018 18:47:59 +0200 Subject: [PATCH 4/7] Makefile.am: include mpd.svg in source tarball --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 00687936c..6a47d5d78 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2478,6 +2478,7 @@ endif # EXTRA_DIST = $(doc_DATA) autogen.sh \ + mpd.svg \ test/test_archive_bzip2.sh \ test/test_archive_iso9660.sh \ test/test_archive_zzip.sh \ From f7d1408a1afd00c9a7f164dae6a82707bc83df6e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Oct 2018 19:32:25 +0200 Subject: [PATCH 5/7] android/build.py: improved libc++ linker flags (for NDK r18) The flag `-stdlib=libc++` doesn't appear to work because it attempts to load `libc++` and not `libc++_static`, and it omits `libc++abi`. --- android/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/build.py b/android/build.py index caf85f06c..a51dbe3b6 100755 --- a/android/build.py +++ b/android/build.py @@ -132,13 +132,15 @@ class AndroidNdkToolchain: libcxx_path = os.path.join(ndk_path, 'sources/cxx-stl/llvm-libc++') libcxx_libs_path = os.path.join(libcxx_path, 'libs', android_abi) - libstdcxx_flags = '-stdlib=libc++' + libstdcxx_flags = '' libstdcxx_cxxflags = libstdcxx_flags + ' -isystem ' + os.path.join(libcxx_path, 'include') + ' -isystem ' + os.path.join(ndk_path, 'sources/android/support/include') - libstdcxx_ldflags = libstdcxx_flags + ' -static-libstdc++ -L' + libcxx_libs_path + libstdcxx_ldflags = libstdcxx_flags + ' -L' + libcxx_libs_path + libstdcxx_libs = '-lc++_static -lc++abi' if use_cxx: self.cxxflags += ' ' + libstdcxx_cxxflags self.ldflags += ' ' + libstdcxx_ldflags + self.libs += ' ' + libstdcxx_libs self.env = dict(os.environ) From 751fff07fb28720156d0d1dc833a2b6534959a0d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Oct 2018 19:51:29 +0200 Subject: [PATCH 6/7] input/Error: work around clang bug leading to crash Closes #373 --- NEWS | 1 + src/input/Error.hxx | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 6553fbef0..6f50551f7 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ ver 0.20.22 (not yet released) - now runs as a service - add button to start/stop MPD - add option to auto-start on boot +* work around clang bug leading to crash * install the SVG icon ver 0.20.21 (2018/08/17) diff --git a/src/input/Error.hxx b/src/input/Error.hxx index b52b9d06b..0811abc68 100644 --- a/src/input/Error.hxx +++ b/src/input/Error.hxx @@ -30,7 +30,15 @@ * exist? This function attempts to recognize exceptions thrown by * various input plugins. */ +#ifndef __clang__ +/* the "pure" attribute must be disabled because it triggers a clang + bug, wrongfully leading to std::terminate() even though the + function catches all exceptions thrown by std::rethrow_exception(); + this can be reproduced with clang 7 from Android NDK r18b and on + clang 6 on FreeBSD + (https://github.com/MusicPlayerDaemon/MPD/issues/373) */ gcc_pure +#endif bool IsFileNotFound(std::exception_ptr e); From 9274bc15bc41bbe490fde847f8422468cc20375d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Oct 2018 19:52:37 +0200 Subject: [PATCH 7/7] release v0.20.22 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6f50551f7..b331b18fb 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.20.22 (not yet released) +ver 0.20.22 (2018/10/23) * protocol - add tag fallbacks for AlbumArtistSort, ArtistSort - fix empty string filter on fallback tags