Merge branch 'v0.23.x'
This commit is contained in:
commit
8a7b7dffec
4
NEWS
4
NEWS
@ -27,6 +27,10 @@ ver 0.24 (not yet released)
|
|||||||
* remove Haiku support
|
* remove Haiku support
|
||||||
* require libfmt 7 or later
|
* require libfmt 7 or later
|
||||||
|
|
||||||
|
ver 0.23.12 (not yet released)
|
||||||
|
* tags
|
||||||
|
- fix crash bug due to race condition
|
||||||
|
|
||||||
ver 0.23.11 (2022/11/28)
|
ver 0.23.11 (2022/11/28)
|
||||||
* database
|
* database
|
||||||
- simple: move default database to ~/.cache/mpd/db from ~/.cache/mpd.db
|
- simple: move default database to ~/.cache/mpd/db from ~/.cache/mpd.db
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.musicpd"
|
package="org.musicpd"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionCode="70"
|
android:versionCode="71"
|
||||||
android:versionName="0.23.11">
|
android:versionName="0.23.12">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
|
||||||
|
|
||||||
|
@ -27,7 +27,11 @@
|
|||||||
#include "util/IntrusiveList.hxx"
|
#include "util/IntrusiveList.hxx"
|
||||||
#include "util/IntrusiveHashSet.hxx"
|
#include "util/IntrusiveHashSet.hxx"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class RemoteTagCacheHandler;
|
class RemoteTagCacheHandler;
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
#include "io/UniqueFileDescriptor.hxx"
|
#include "io/UniqueFileDescriptor.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
class Path;
|
class Path;
|
||||||
class FileInfo;
|
class FileInfo;
|
||||||
|
|
||||||
|
@ -187,10 +187,6 @@ public:
|
|||||||
SetOption(CURLOPT_POSTFIELDSIZE, (long)size);
|
SetOption(CURLOPT_POSTFIELDSIZE, (long)size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetHttpPost(const struct curl_httppost *post) {
|
|
||||||
SetOption(CURLOPT_HTTPPOST, post);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool GetInfo(CURLINFO info, T value_r) const noexcept {
|
bool GetInfo(CURLINFO info, T value_r) const noexcept {
|
||||||
return ::curl_easy_getinfo(handle, info, value_r) == CURLE_OK;
|
return ::curl_easy_getinfo(handle, info, value_r) == CURLE_OK;
|
||||||
@ -200,10 +196,10 @@ public:
|
|||||||
* Returns the response body's size, or -1 if that is unknown.
|
* Returns the response body's size, or -1 if that is unknown.
|
||||||
*/
|
*/
|
||||||
[[gnu::pure]]
|
[[gnu::pure]]
|
||||||
int64_t GetContentLength() const noexcept {
|
curl_off_t GetContentLength() const noexcept {
|
||||||
double value;
|
curl_off_t value;
|
||||||
return GetInfo(CURLINFO_CONTENT_LENGTH_DOWNLOAD, &value)
|
return GetInfo(CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &value)
|
||||||
? (int64_t)value
|
? value
|
||||||
: -1;
|
: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,8 +261,14 @@ TagBuilder::RemoveAll() noexcept
|
|||||||
void
|
void
|
||||||
TagBuilder::RemoveType(TagType type) noexcept
|
TagBuilder::RemoveType(TagType type) noexcept
|
||||||
{
|
{
|
||||||
|
if (items.empty())
|
||||||
|
/* don't acquire the tag_pool_lock if we're not going
|
||||||
|
to call tag_pool_put_item() anyway */
|
||||||
|
return;
|
||||||
|
|
||||||
const auto begin = items.begin(), end = items.end();
|
const auto begin = items.begin(), end = items.end();
|
||||||
|
|
||||||
|
const std::scoped_lock<Mutex> protect(tag_pool_lock);
|
||||||
items.erase(std::remove_if(begin, end,
|
items.erase(std::remove_if(begin, end,
|
||||||
[type](TagItem *item) {
|
[type](TagItem *item) {
|
||||||
if (item->type != type)
|
if (item->type != type)
|
||||||
|
Loading…
Reference in New Issue
Block a user