Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fbc0c9872 | ||
|
|
8d8325701e | ||
|
|
456974051e | ||
|
|
7546d9c784 |
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.16.0)
|
||||
# KDE Applications version, managed by release script.
|
||||
set(RELEASE_SERVICE_VERSION_MAJOR "24")
|
||||
set(RELEASE_SERVICE_VERSION_MINOR "11")
|
||||
set(RELEASE_SERVICE_VERSION_MICRO "70")
|
||||
set(RELEASE_SERVICE_VERSION_MICRO "90")
|
||||
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
|
||||
|
||||
project(audiotube VERSION ${RELEASE_SERVICE_VERSION})
|
||||
|
||||
@@ -14,8 +14,8 @@ msgstr ""
|
||||
"X-Crowdin-Project: kdeorg\n"
|
||||
"X-Crowdin-Project-ID: 269464\n"
|
||||
"X-Crowdin-Language: zh-CN\n"
|
||||
"X-Crowdin-File: /kf6-trunk/messages/audiotube/audiotube.pot\n"
|
||||
"X-Crowdin-File-ID: 48698\n"
|
||||
"X-Crowdin-File: /kf6-stable/messages/audiotube/audiotube.pot\n"
|
||||
"X-Crowdin-File-ID: 52528\n"
|
||||
|
||||
#: asyncytmusic.cpp:65
|
||||
#, kde-format
|
||||
|
||||
+10
-1
@@ -83,6 +83,15 @@ std::optional<T> optional_key(py::handle obj, const char *name) {
|
||||
return obj[name].cast<std::optional<T>>();
|
||||
}
|
||||
|
||||
std::string ensure_string(py::handle obj) {
|
||||
auto variant = obj.cast<std::variant<std::string, int>>();
|
||||
if (std::holds_alternative<std::string>(variant)) {
|
||||
return std::get<std::string>(variant);
|
||||
}
|
||||
|
||||
return std::to_string(std::get<int>(variant));
|
||||
}
|
||||
|
||||
meta::Thumbnail extract_thumbnail(py::handle thumbnail) {
|
||||
return {
|
||||
thumbnail["url"].cast<std::string>(),
|
||||
@@ -330,7 +339,7 @@ std::optional<search::SearchResultItem> extract_search_result(py::handle result)
|
||||
result["browseId"].cast<std::string>(),
|
||||
result["title"].cast<std::string>(),
|
||||
result["author"].cast<std::optional<std::string>>(),
|
||||
result["itemCount"].cast<std::string>(),
|
||||
ensure_string(result["itemCount"]),
|
||||
extract_py_list<meta::Thumbnail>(result["thumbnails"])
|
||||
};
|
||||
} else if (resultType == "artist") {
|
||||
|
||||
Reference in new issue
Block a user