Date: Friday, April 21, 2023 @ 18:37:52
  Author: arojas
Revision: 475084

Drop patch

Deleted:
  audiotube/trunk/58460cf3.patch

----------------+
 58460cf3.patch |  161 -------------------------------------------------------
 1 file changed, 161 deletions(-)

Deleted: 58460cf3.patch
===================================================================
--- 58460cf3.patch      2023-04-21 18:32:56 UTC (rev 475083)
+++ 58460cf3.patch      2023-04-21 18:37:52 UTC (rev 475084)
@@ -1,161 +0,0 @@
-From 58460cf3d72e5f799ed606169e8410beaee5820f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= <[email protected]>
-Date: Wed, 12 Apr 2023 12:13:26 +0200
-Subject: [PATCH] Add support for ytmusicapi 1.0.0
-
----
- flatpak/python3-yt-dlp.json     |  4 ++--
- flatpak/python3-ytmusicapi.json |  8 ++++----
- requirements.txt                |  2 +-
- src/example/main.cpp            |  2 +-
- src/ytmusic.cpp                 | 12 ++++++++----
- src/ytmusic.h                   |  6 +++---
- 6 files changed, 19 insertions(+), 15 deletions(-)
-
-diff --git a/flatpak/python3-yt-dlp.json b/flatpak/python3-yt-dlp.json
-index 46aeb1bf..fdab9485 100644
---- a/flatpak/python3-yt-dlp.json
-+++ b/flatpak/python3-yt-dlp.json
-@@ -27,8 +27,8 @@
-         },
-         {
-             "type": "file",
--            "url": 
"https://files.pythonhosted.org/packages/85/dc/549a807a53c13fd4a8dac286f117a7a71260defea9ec0c05d6027f2ae273/websockets-10.4.tar.gz";,
--            "sha256": 
"eef610b23933c54d5d921c92578ae5f89813438fded840c2e9809d378dc765d3"
-+            "url": 
"https://files.pythonhosted.org/packages/bd/90/6b5802fad3992d6eac7163216e0389a72475cbb57b23005135190e96d160/websockets-11.0.1.tar.gz";,
-+            "sha256": 
"369410925b240b30ef1c1deadbd6331e9cd865ad0b8966bf31e276cc8e0da159"
-         },
-         {
-             "type": "file",
-diff --git a/flatpak/python3-ytmusicapi.json b/flatpak/python3-ytmusicapi.json
-index dfe19f06..f13e5794 100644
---- a/flatpak/python3-ytmusicapi.json
-+++ b/flatpak/python3-ytmusicapi.json
-@@ -27,13 +27,13 @@
-         },
-         {
-             "type": "file",
--            "url": 
"https://files.pythonhosted.org/packages/fe/ca/466766e20b767ddb9b951202542310cba37ea5f2d792dae7589f1741af58/urllib3-1.26.14-py2.py3-none-any.whl";,
--            "sha256": 
"75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"
-+            "url": 
"https://files.pythonhosted.org/packages/7b/f5/890a0baca17a61c1f92f72b81d3c31523c99bec609e60c292ea55b387ae8/urllib3-1.26.15-py2.py3-none-any.whl";,
-+            "sha256": 
"aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"
-         },
-         {
-             "type": "file",
--            "url": 
"https://files.pythonhosted.org/packages/14/a9/5ba638ca601c74f169e0e0b055526566f2fa6b6402233a29aba607dca58e/ytmusicapi-0.25.0-py3-none-any.whl";,
--            "sha256": 
"be355bb3409c0e6c25a95ffd92213bd216561cdd8a0493a36a82d1726ff6efb9"
-+            "url": 
"https://files.pythonhosted.org/packages/0a/74/fee0f00aa3205662c12bf216f609b713ed015695476c60416127871d476c/ytmusicapi-1.0.0-py3-none-any.whl";,
-+            "sha256": 
"769f4ac9fc90b59e9bdb2cc5ef1e9829dd0a7b1ff1a246007b6c738770fce939"
-         }
-     ]
- }
-\ No newline at end of file
-diff --git a/requirements.txt b/requirements.txt
-index a83e7de4..67bdfa47 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -3,5 +3,5 @@
- #
- # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR 
LicenseRef-KDE-Accepted-GPL
- 
--ytmusicapi==0.25.0
-+ytmusicapi==1.0.0
- yt-dlp
-diff --git a/src/example/main.cpp b/src/example/main.cpp
-index 8e936f41..2f95c849 100644
---- a/src/example/main.cpp
-+++ b/src/example/main.cpp
-@@ -8,7 +8,7 @@
- 
- int main() {
-     const auto ytm = YTMusic();
--    const auto results = ytm.search("the french dispatch");
-+    const auto results = ytm.search("Saint Motel");
- 
-     std::cout << "Found " << results.size() << " results." << std::endl;
- 
-diff --git a/src/ytmusic.cpp b/src/ytmusic.cpp
-index 68c3c8ec..4ee9f31b 100644
---- a/src/ytmusic.cpp
-+++ b/src/ytmusic.cpp
-@@ -22,7 +22,7 @@ void pyPrintPretty(py::handle obj) {
- 
- #define UNEXPORT __attribute__ ((visibility("hidden")))
- 
--constexpr auto TESTED_YTMUSICAPI_VERSION = "0.25.0";
-+constexpr auto TESTED_YTMUSICAPI_VERSION = "1.0.0";
- 
- struct UNEXPORT YTMusicPrivate {
-     py::scoped_interpreter guard {};
-@@ -135,7 +135,7 @@ inline auto extract_py_list(py::handle obj) {
- 
- album::Track extract_album_track(py::handle track) {
-     return {
--        track["isExplicit"].cast<bool>(),
-+        optional_key<bool>(track, "isExplicit"),
-         track["title"].cast<std::string>(),
-         extract_py_list<meta::Artist>(track["artists"]),
-         track["album"].cast<std::optional<std::string>>(),
-@@ -201,7 +201,7 @@ playlist::Track extract_playlist_track(py::handle track) {
-         track["likeStatus"].cast<std::optional<std::string>>(),
-         extract_py_list<meta::Thumbnail>(track["thumbnails"]),
-         track["isAvailable"].cast<bool>(),
--        track["isExplicit"].cast<bool>()
-+        optional_key<bool>(track, "isExplicit")
-     };
- }
- 
-@@ -277,6 +277,10 @@ std::optional<artist::Artist::Section<T>> 
extract_artist_section(py::handle arti
- std::optional<search::SearchResultItem> extract_search_result(py::handle 
result) {
-     const auto resultType = result["resultType"].cast<std::string>();
- 
-+    if (result["category"].cast<std::optional<std::string>>() == "Top 
result") {
-+        return {};
-+    }
-+
-     if (resultType == "video") {
-         return search::Video {
-             {
-@@ -298,7 +302,7 @@ std::optional<search::SearchResultItem> 
extract_search_result(py::handle result)
-                 extract_py_list<meta::Thumbnail>(result["thumbnails"])
-             },
-             result["album"].is_none() ? std::optional<meta::Album> {} : 
extract_meta_album(result["album"]),
--            result["isExplicit"].cast<bool>()
-+            optional_key<bool>(result, "isExplicit")
-         };
-     } else if (resultType == "album") {
-         return search::Album {
-diff --git a/src/ytmusic.h b/src/ytmusic.h
-index 2449fabb..77834813 100644
---- a/src/ytmusic.h
-+++ b/src/ytmusic.h
-@@ -61,7 +61,7 @@ struct Playlist {
- 
- struct Song : public Media {
-     std::optional<meta::Album> album;
--    bool is_explicit;
-+    std::optional<bool> is_explicit;
- };
- 
- struct Album {
-@@ -147,7 +147,7 @@ struct Artist {
- 
- namespace album {
-     struct Track {
--        bool is_explicit;
-+        std::optional<bool> is_explicit;
-         std::string title;
-         std::vector<meta::Artist> artists;
-         std::optional<std::string> album;
-@@ -216,7 +216,7 @@ struct Track {
-     std::optional<std::string> like_status;
-     std::vector<meta::Thumbnail> thumbnails;
-     bool is_available;
--    bool is_explicit;
-+    std::optional<bool> is_explicit;
- };
- 
- struct Playlist {
--- 
-GitLab
-

Reply via email to