Merge branch 'v0.21.x'

This commit is contained in:
Max Kellermann 2020-05-05 19:00:53 +02:00
commit ba576ffa37
6 changed files with 13 additions and 11 deletions

7
NEWS
View File

@ -38,6 +38,13 @@ ver 0.22 (not yet released)
* switch to C++17
- GCC 7 or clang 4 (or newer) recommended
ver 0.21.24 (not yet released)
* protocol
- "tagtypes" requires no permissions
* database
- simple: fix crash when mounting twice
* fix unit test failure
ver 0.21.23 (2020/04/23)
* protocol
- add tag fallback for AlbumSort

View File

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd"
android:installLocation="auto"
android:versionCode="46"
android:versionName="0.21.23">
android:versionCode="47"
android:versionName="0.21.24">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>

View File

@ -201,7 +201,7 @@ static constexpr struct command commands[] = {
{ "subscribe", PERMISSION_READ, 1, 1, handle_subscribe },
{ "swap", PERMISSION_CONTROL, 2, 2, handle_swap },
{ "swapid", PERMISSION_CONTROL, 2, 2, handle_swapid },
{ "tagtypes", PERMISSION_READ, 0, -1, handle_tagtypes },
{ "tagtypes", PERMISSION_NONE, 0, -1, handle_tagtypes },
{ "toggleoutput", PERMISSION_ADMIN, 1, 1, handle_toggleoutput },
#ifdef ENABLE_DATABASE
{ "unmount", PERMISSION_ADMIN, 1, 1, handle_unmount },

View File

@ -448,12 +448,7 @@ SimpleDatabase::Mount(const char *local_uri, const char *storage_uri)
// TODO: update the new database instance?
try {
Mount(local_uri, std::move(db));
} catch (...) {
db->Close();
throw;
}
Mount(local_uri, std::move(db));
}
inline DatabasePtr

View File

@ -62,7 +62,7 @@ mixramp_interpolate(const char *ramp_list, float required_db) noexcept
++ramp_list;
/* Check for exact match. */
if (db >= required_db) {
if (db == required_db) {
return duration;
}

View File

@ -36,7 +36,7 @@
* C99 math can be optionally omitted with gcc's libstdc++.
* Use boost if unavailable.
*/
#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH)
#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH_TR1)
#include <boost/math/special_functions/round.hpp>
using boost::math::lround;
#else