diff --git a/tests/mixins/test_search.py b/tests/mixins/test_search.py index c52d2045..8d4bbbd3 100644 --- a/tests/mixins/test_search.py +++ b/tests/mixins/test_search.py @@ -2,7 +2,7 @@ from ytmusicapi import YTMusic from ytmusicapi.exceptions import YTMusicUserError -from ytmusicapi.parsers.search import ALL_RESULT_TYPES +from ytmusicapi.parsers.search import ALL_RESULT_TYPES, API_RESULT_TYPES class TestSearch: @@ -22,7 +22,7 @@ def test_search_queries(self, query: str, yt_instance: str, request: pytest.Fixt assert ["resultType" in r for r in results] == [True] * len(results) assert len(results) >= 5 assert not any( - artist["name"].lower() in ALL_RESULT_TYPES + artist["name"].lower() in API_RESULT_TYPES for result in results if "artists" in result for artist in result["artists"] diff --git a/ytmusicapi/locales/ar/LC_MESSAGES/base.mo b/ytmusicapi/locales/ar/LC_MESSAGES/base.mo index d41fc6e6..ccb98711 100644 Binary files a/ytmusicapi/locales/ar/LC_MESSAGES/base.mo and b/ytmusicapi/locales/ar/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/ar/LC_MESSAGES/base.po b/ytmusicapi/locales/ar/LC_MESSAGES/base.po index eb816c7c..f158abce 100644 --- a/ytmusicapi/locales/ar/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/ar/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "ألبوم" + +#: parsers/i18n.py:33 msgid "artist" msgstr "فنان" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "قائمةالتشغيل" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "أغنية" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "فيديو" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "محطة" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "الملف الشخصي" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "بودكاست" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "حلقة" #: parsers/i18n.py:46 +msgid "single" +msgstr "أغنية منفردة" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ألبوم قصير" + +#: parsers/i18n.py:55 msgid "albums" msgstr "ألبومات" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "الفردي" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "الكتب المسموعة والعروض" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "أشرطة فيديو" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "قوائم التشغيل" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "ذات صلة" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "أحدث الحلقات" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "بودكاست" diff --git a/ytmusicapi/locales/base.pot b/ytmusicapi/locales/base.pot index 092f59ec..2f0f46e3 100644 --- a/ytmusicapi/locales/base.pot +++ b/ytmusicapi/locales/base.pot @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 -msgid "artist" +msgid "album" msgstr "" #: parsers/i18n.py:33 -msgid "playlist" +msgid "artist" msgstr "" #: parsers/i18n.py:34 -msgid "song" +msgid "playlist" msgstr "" #: parsers/i18n.py:35 -msgid "video" +msgid "song" msgstr "" #: parsers/i18n.py:36 -msgid "station" +msgid "video" msgstr "" #: parsers/i18n.py:37 -msgid "profile" +msgid "station" msgstr "" #: parsers/i18n.py:38 -msgid "podcast" +msgid "profile" msgstr "" #: parsers/i18n.py:39 +msgid "podcast" +msgstr "" + +#: parsers/i18n.py:40 msgid "episode" msgstr "" #: parsers/i18n.py:46 -msgid "albums" +msgid "single" msgstr "" #: parsers/i18n.py:47 +msgid "ep" +msgstr "" + +#: parsers/i18n.py:55 +msgid "albums" +msgstr "" + +#: parsers/i18n.py:56 msgid "singles" msgstr "" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "" diff --git a/ytmusicapi/locales/de/LC_MESSAGES/base.mo b/ytmusicapi/locales/de/LC_MESSAGES/base.mo index c2d73a29..c76f5bc4 100644 Binary files a/ytmusicapi/locales/de/LC_MESSAGES/base.mo and b/ytmusicapi/locales/de/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/de/LC_MESSAGES/base.po b/ytmusicapi/locales/de/LC_MESSAGES/base.po index 4d8f56a2..25402e88 100644 --- a/ytmusicapi/locales/de/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/de/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "album" + +#: parsers/i18n.py:33 msgid "artist" msgstr "künstler" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "playlist" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "titel" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "video" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "sender" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "profil" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Folge" #: parsers/i18n.py:46 +msgid "single" +msgstr "single" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "alben" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "singles" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Hörbücher und Serien" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "videos" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "playlists" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "das könnte fans auch gefallen" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "neueste folgen" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "podcasts" diff --git a/ytmusicapi/locales/en/LC_MESSAGES/base.mo b/ytmusicapi/locales/en/LC_MESSAGES/base.mo index 24046f04..dad0d03a 100644 Binary files a/ytmusicapi/locales/en/LC_MESSAGES/base.mo and b/ytmusicapi/locales/en/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/en/LC_MESSAGES/base.po b/ytmusicapi/locales/en/LC_MESSAGES/base.po index 51d4d95e..ba2075b3 100644 --- a/ytmusicapi/locales/en/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/en/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "album" + +#: parsers/i18n.py:33 msgid "artist" msgstr "" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "" #: parsers/i18n.py:46 +msgid "single" +msgstr "single" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Audiobooks and shows" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "fans might also like" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "latest episodes" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "" diff --git a/ytmusicapi/locales/es/LC_MESSAGES/base.mo b/ytmusicapi/locales/es/LC_MESSAGES/base.mo index 636e68f9..890141d4 100644 Binary files a/ytmusicapi/locales/es/LC_MESSAGES/base.mo and b/ytmusicapi/locales/es/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/es/LC_MESSAGES/base.po b/ytmusicapi/locales/es/LC_MESSAGES/base.po index 56b7bc94..2ab7bb15 100644 --- a/ytmusicapi/locales/es/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/es/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "álbum" + +#: parsers/i18n.py:33 msgid "artist" msgstr "artista" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "lista de reproducción" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "canción" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "vídeo" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "emisora" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "perfil" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "Pódcast" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Episodio" #: parsers/i18n.py:46 +msgid "single" +msgstr "álbum" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "álbumes" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "sencillos" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Audiolibros y series" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "vídeos" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "listas de reproducción" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "puede que también te guste" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "últimos episodios" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "pódcasts" diff --git a/ytmusicapi/locales/fr/LC_MESSAGES/base.mo b/ytmusicapi/locales/fr/LC_MESSAGES/base.mo index 01f987fe..628f0811 100644 Binary files a/ytmusicapi/locales/fr/LC_MESSAGES/base.mo and b/ytmusicapi/locales/fr/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/fr/LC_MESSAGES/base.po b/ytmusicapi/locales/fr/LC_MESSAGES/base.po index e39fffbc..fd7f4772 100644 --- a/ytmusicapi/locales/fr/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/fr/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "album" + +#: parsers/i18n.py:33 msgid "artist" msgstr "artiste" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "playlist" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "titre" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "vidéo" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "radio" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "profil" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Épisode" #: parsers/i18n.py:46 +msgid "single" +msgstr "single" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Livres audio et émissions" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "vidéos" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "vous aimerez peut-être aussi" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "épisodes les plus récents" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "" diff --git a/ytmusicapi/locales/hi/LC_MESSAGES/base.mo b/ytmusicapi/locales/hi/LC_MESSAGES/base.mo index 8d100f33..b54dbe24 100644 Binary files a/ytmusicapi/locales/hi/LC_MESSAGES/base.mo and b/ytmusicapi/locales/hi/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/hi/LC_MESSAGES/base.po b/ytmusicapi/locales/hi/LC_MESSAGES/base.po index 559929ce..23c672f6 100644 --- a/ytmusicapi/locales/hi/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/hi/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "एल्‍बम" + +#: parsers/i18n.py:33 msgid "artist" msgstr "कलाकार" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "प्लेलिस्ट" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "गीत" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "वीडियो" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "स्टेशन" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "प्रोफ़ाइल" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "पॉडकास्ट" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "एपिसोड" #: parsers/i18n.py:46 +msgid "single" +msgstr "सिंगल" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ईपी" + +#: parsers/i18n.py:55 msgid "albums" msgstr "एलबम" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "एकल" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "ऑडियो बुक और ऑडियो शो" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "वीडियो" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "प्लेलिस्ट" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "सम्बंधित" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "सबसे नए एपिसोड" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "पॉडकास्ट" diff --git a/ytmusicapi/locales/it/LC_MESSAGES/base.mo b/ytmusicapi/locales/it/LC_MESSAGES/base.mo index ec10cc97..f23ca6f1 100644 Binary files a/ytmusicapi/locales/it/LC_MESSAGES/base.mo and b/ytmusicapi/locales/it/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/it/LC_MESSAGES/base.po b/ytmusicapi/locales/it/LC_MESSAGES/base.po index 2228ff66..4a01b830 100644 --- a/ytmusicapi/locales/it/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/it/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "album" + +#: parsers/i18n.py:33 msgid "artist" msgstr "artista" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "brano" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "stazione" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "profilo" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Puntata" #: parsers/i18n.py:46 +msgid "single" +msgstr "singolo" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "album" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "singoli" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Audiolibri e programmi" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "video" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "playlist" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "ai fan potrebbe anche piacere" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "puntate più recenti" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "podcast" diff --git a/ytmusicapi/locales/ja/LC_MESSAGES/base.mo b/ytmusicapi/locales/ja/LC_MESSAGES/base.mo index 4b4ec269..906c11be 100644 Binary files a/ytmusicapi/locales/ja/LC_MESSAGES/base.mo and b/ytmusicapi/locales/ja/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/ja/LC_MESSAGES/base.po b/ytmusicapi/locales/ja/LC_MESSAGES/base.po index d39ffb28..4722d9f8 100644 --- a/ytmusicapi/locales/ja/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/ja/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "アルバム" + +#: parsers/i18n.py:33 msgid "artist" msgstr "アーティスト" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "プレイリスト" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "曲" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "動画" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "ステーション" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "プロフィール" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "ポッドキャスト" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "エピソード" #: parsers/i18n.py:46 +msgid "single" +msgstr "シングル" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "アルバム" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "シングル" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "オーディオブックと番組" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "動画" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "プレイリスト" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "おすすめのアーティスト" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "最新エピソード" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "ポッドキャスト" diff --git a/ytmusicapi/locales/ko/LC_MESSAGES/base.mo b/ytmusicapi/locales/ko/LC_MESSAGES/base.mo index bf01f89a..36f9725f 100644 Binary files a/ytmusicapi/locales/ko/LC_MESSAGES/base.mo and b/ytmusicapi/locales/ko/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/ko/LC_MESSAGES/base.po b/ytmusicapi/locales/ko/LC_MESSAGES/base.po index 76121d14..531be2af 100644 --- a/ytmusicapi/locales/ko/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/ko/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "앨범" + +#: parsers/i18n.py:33 msgid "artist" msgstr "아티스트" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "재생목록" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "노래" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "동영상" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "스테이션" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "프로필" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "팟캐스트" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "에피소드" #: parsers/i18n.py:46 +msgid "single" +msgstr "싱글" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "앨범" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "싱글" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "오디오북 및 프로그램" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "동영상" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "재싱목록" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "fans might also like" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "최신 에피소드" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "팟캐스트" diff --git a/ytmusicapi/locales/nl/LC_MESSAGES/base.mo b/ytmusicapi/locales/nl/LC_MESSAGES/base.mo index 1daabeb4..48bc7d34 100644 Binary files a/ytmusicapi/locales/nl/LC_MESSAGES/base.mo and b/ytmusicapi/locales/nl/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/nl/LC_MESSAGES/base.po b/ytmusicapi/locales/nl/LC_MESSAGES/base.po index 9de7ed28..2206944e 100644 --- a/ytmusicapi/locales/nl/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/nl/LC_MESSAGES/base.po @@ -19,65 +19,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "album" + +#: parsers/i18n.py:33 msgid "artist" msgstr "artiest" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "afspeellijst" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "nummer" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "video" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "station" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "profiel" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Aflevering" #: parsers/i18n.py:46 +msgid "single" +msgstr "single" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "albums" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "singles" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Audioboeken en -series" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "video's" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "afspeellijsten" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "gerelateerd" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "nieuwste afleveringen" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "podcasts" diff --git a/ytmusicapi/locales/pt/LC_MESSAGES/base.mo b/ytmusicapi/locales/pt/LC_MESSAGES/base.mo index 4784fe23..4e70fede 100644 Binary files a/ytmusicapi/locales/pt/LC_MESSAGES/base.mo and b/ytmusicapi/locales/pt/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/pt/LC_MESSAGES/base.po b/ytmusicapi/locales/pt/LC_MESSAGES/base.po index 34597724..875d2afb 100644 --- a/ytmusicapi/locales/pt/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/pt/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "álbum" + +#: parsers/i18n.py:33 msgid "artist" msgstr "artista" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "lista de reprodução" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "música" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "vídeo" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "estação" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "perfil" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Episódio" #: parsers/i18n.py:46 +msgid "single" +msgstr "single" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "álbuns" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "solteiros" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Audiolivros e programas" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "vídeos" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "listas de reprodução" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "relacionado" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "episódios novos" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "podcasts" diff --git a/ytmusicapi/locales/ru/LC_MESSAGES/base.mo b/ytmusicapi/locales/ru/LC_MESSAGES/base.mo index c0d1a213..fb73a5ce 100644 Binary files a/ytmusicapi/locales/ru/LC_MESSAGES/base.mo and b/ytmusicapi/locales/ru/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/ru/LC_MESSAGES/base.po b/ytmusicapi/locales/ru/LC_MESSAGES/base.po index 7158704e..45e5e89a 100644 --- a/ytmusicapi/locales/ru/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/ru/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "альбом" + +#: parsers/i18n.py:33 msgid "artist" msgstr "художник" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "плейлист" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "песня" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "видео" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "станция" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "профиль" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "Подкаст" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Выпуск" #: parsers/i18n.py:46 +msgid "single" +msgstr "сингл" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "альбомы" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "синглы" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Аудиокниги и аудиошоу" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "ролики" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "плейлисты" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "связанные с" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "новые выпуски" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "подкасты" diff --git a/ytmusicapi/locales/tr/LC_MESSAGES/base.mo b/ytmusicapi/locales/tr/LC_MESSAGES/base.mo index 3ab7c5b3..6256128b 100644 Binary files a/ytmusicapi/locales/tr/LC_MESSAGES/base.mo and b/ytmusicapi/locales/tr/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/tr/LC_MESSAGES/base.po b/ytmusicapi/locales/tr/LC_MESSAGES/base.po index d157fb08..4d2b10bb 100644 --- a/ytmusicapi/locales/tr/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/tr/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "albüm" + +#: parsers/i18n.py:33 msgid "artist" msgstr "sanatçı" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "çalma listesi" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "şarkı" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "video" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "istasyon" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "profil" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "Bölüm" #: parsers/i18n.py:46 +msgid "single" +msgstr "single" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "albümler" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "bekarlar" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "Sesli kitaplar ve programlar" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "videolar" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "çalma listeleri" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "ilişkili" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "son bölümler" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "podcast'ler" diff --git a/ytmusicapi/locales/ur/LC_MESSAGES/base.mo b/ytmusicapi/locales/ur/LC_MESSAGES/base.mo index d7d7339b..d6c43a82 100644 Binary files a/ytmusicapi/locales/ur/LC_MESSAGES/base.mo and b/ytmusicapi/locales/ur/LC_MESSAGES/base.mo differ diff --git a/ytmusicapi/locales/ur/LC_MESSAGES/base.po b/ytmusicapi/locales/ur/LC_MESSAGES/base.po index 00b1ac94..60849492 100644 --- a/ytmusicapi/locales/ur/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/ur/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "البم" + +#: parsers/i18n.py:33 msgid "artist" msgstr "فنکار" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "پلے لسٹ" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "نغمہ" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "ویڈیو" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "اسٹیشن" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "پروفائ" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "پوڈکاسٹ" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "ایپی سوڈ" #: parsers/i18n.py:46 +msgid "single" +msgstr "واحد" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "البمز" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "سنگلز" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "آڈیو بکس اور شوز" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "ویڈیوز" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "پلے لسٹس" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "متعلقہ" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "تازہ ترین ایپی سوڈز" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "پوڈکاسٹس" diff --git a/ytmusicapi/locales/zh_CN/LC_MESSAGES/base.po b/ytmusicapi/locales/zh_CN/LC_MESSAGES/base.po index 968be539..fe101189 100644 --- a/ytmusicapi/locales/zh_CN/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/zh_CN/LC_MESSAGES/base.po @@ -17,65 +17,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "专辑" + +#: parsers/i18n.py:33 msgid "artist" msgstr "音乐人" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "播放列表" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "歌曲" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "视频" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "电台" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "个人资料" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "播客" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "分集" #: parsers/i18n.py:46 +msgid "single" +msgstr "单曲" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "迷你专辑" + +#: parsers/i18n.py:55 msgid "albums" msgstr "专辑" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "单曲" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "有声读物和节目" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "视频" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "精选" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "粉丝可能还会喜欢" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "最新分集" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "播客" diff --git a/ytmusicapi/locales/zh_TW/LC_MESSAGES/base.po b/ytmusicapi/locales/zh_TW/LC_MESSAGES/base.po index 75e833ea..f531c827 100644 --- a/ytmusicapi/locales/zh_TW/LC_MESSAGES/base.po +++ b/ytmusicapi/locales/zh_TW/LC_MESSAGES/base.po @@ -18,65 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: parsers/i18n.py:32 +msgid "album" +msgstr "專輯" + +#: parsers/i18n.py:33 msgid "artist" msgstr "藝人" -#: parsers/i18n.py:33 +#: parsers/i18n.py:34 msgid "playlist" msgstr "播放清單" -#: parsers/i18n.py:34 +#: parsers/i18n.py:35 msgid "song" msgstr "歌曲" -#: parsers/i18n.py:35 +#: parsers/i18n.py:36 msgid "video" msgstr "影片" -#: parsers/i18n.py:36 +#: parsers/i18n.py:37 msgid "station" msgstr "電台" -#: parsers/i18n.py:37 +#: parsers/i18n.py:38 msgid "profile" msgstr "個人資料" -#: parsers/i18n.py:38 +#: parsers/i18n.py:39 msgid "podcast" msgstr "" -#: parsers/i18n.py:39 +#: parsers/i18n.py:40 msgid "episode" msgstr "單集" #: parsers/i18n.py:46 +msgid "single" +msgstr "單曲" + +#: parsers/i18n.py:47 +msgid "ep" +msgstr "ep" + +#: parsers/i18n.py:55 msgid "albums" msgstr "專輯" -#: parsers/i18n.py:47 +#: parsers/i18n.py:56 msgid "singles" msgstr "單曲" -#: parsers/i18n.py:48 +#: parsers/i18n.py:57 msgid "shows" msgstr "有聲書與節目" -#: parsers/i18n.py:49 +#: parsers/i18n.py:58 msgid "videos" msgstr "影片" -#: parsers/i18n.py:50 +#: parsers/i18n.py:59 msgid "playlists" msgstr "精選收錄" -#: parsers/i18n.py:51 +#: parsers/i18n.py:60 msgid "related" msgstr "粉絲可能也會喜歡" -#: parsers/i18n.py:52 +#: parsers/i18n.py:61 msgid "episodes" msgstr "最新集數" -#: parsers/i18n.py:53 +#: parsers/i18n.py:62 msgid "podcasts" msgstr "Podcast" diff --git a/ytmusicapi/mixins/search.py b/ytmusicapi/mixins/search.py index 0c831b80..70f6e91b 100644 --- a/ytmusicapi/mixins/search.py +++ b/ytmusicapi/mixins/search.py @@ -208,7 +208,6 @@ def search( for res in section_list: result_type = category = None - search_result_types = self.parser.get_search_result_types() if "musicCardShelfRenderer" in res: top_result = parse_top_result( @@ -234,8 +233,10 @@ def search( else: continue + api_search_result_types = self.parser.get_api_result_types() + search_results.extend( - parse_search_results(shelf_contents, search_result_types, result_type, category) + parse_search_results(shelf_contents, api_search_result_types, result_type, category) ) if filter: # if filter is set, there are continuations @@ -244,7 +245,7 @@ def request_func(additionalParams): return self._send_request(endpoint, body, additionalParams) def parse_func(contents): - return parse_search_results(contents, search_result_types, result_type, category) + return parse_search_results(contents, api_search_result_types, result_type, category) search_results.extend( get_continuations( diff --git a/ytmusicapi/parsers/i18n.py b/ytmusicapi/parsers/i18n.py index 6b1bbf43..6ac8e75d 100644 --- a/ytmusicapi/parsers/i18n.py +++ b/ytmusicapi/parsers/i18n.py @@ -40,6 +40,14 @@ def get_search_result_types(self): _("episode"), ] + @i18n + def get_api_result_types(self): + return [ + _("single"), + _("ep"), + *self.get_search_result_types(), + ] + @i18n def parse_channel_contents(self, results: list) -> dict: # type: ignore[name-defined] diff --git a/ytmusicapi/parsers/search.py b/ytmusicapi/parsers/search.py index df62eb1b..90462aed 100644 --- a/ytmusicapi/parsers/search.py +++ b/ytmusicapi/parsers/search.py @@ -4,8 +4,18 @@ from ._utils import * from .songs import * -UNIQUE_RESULT_TYPES = ["artist", "playlist", "song", "video", "station", "profile", "podcast", "episode"] -ALL_RESULT_TYPES = ["album", *UNIQUE_RESULT_TYPES] +ALL_RESULT_TYPES = [ + "album", + "artist", + "playlist", + "song", + "video", + "station", + "profile", + "podcast", + "episode", +] +API_RESULT_TYPES = ["single", "ep", *ALL_RESULT_TYPES] def get_search_result_type(result_type_local, result_types_local): @@ -61,7 +71,7 @@ def parse_top_result(data, search_result_types): return search_result -def parse_search_result(data, search_result_types, result_type, category): +def parse_search_result(data, api_search_result_types, result_type, category): default_offset = (not result_type or result_type == "album") * 2 search_result = {"category": category} video_type = nav(data, [*PLAY_BUTTON, "playNavigationEndpoint", *NAVIGATION_VIDEO_TYPE], True) @@ -159,7 +169,7 @@ def parse_search_result(data, search_result_types, result_type, category): flex_item = get_flex_column_item(data, 1) runs = flex_item["text"]["runs"] # ignore the first run if it is a type specifier (like "Single" or "Album") - runs_offset = (len(runs[0]) == 1 and runs[0]["text"].lower() in search_result_types) * 2 + runs_offset = (len(runs[0]) == 1 and runs[0]["text"].lower() in api_search_result_types) * 2 song_info = parse_song_runs(runs[runs_offset:]) search_result.update(song_info) @@ -188,9 +198,10 @@ def parse_album_playlistid_if_exists(data: dict[str, Any]) -> Optional[str]: return nav(data, WATCH_PID, True) or nav(data, WATCH_PLAYLIST_ID, True) if data else None -def parse_search_results(results, search_result_types, resultType=None, category=None): +def parse_search_results(results, api_search_result_types, resultType=None, category=None): return [ - parse_search_result(result[MRLIR], search_result_types, resultType, category) for result in results + parse_search_result(result[MRLIR], api_search_result_types, resultType, category) + for result in results ]