Skip to content

Commit

Permalink
get_artist: shows support
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Mar 13, 2024
1 parent 29eaa7a commit 0d99603
Show file tree
Hide file tree
Showing 36 changed files with 387 additions and 296 deletions.
8 changes: 8 additions & 0 deletions tests/mixins/test_browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ def test_get_artist(self, yt):
results = yt.get_artist("UCLZ7tlKC06ResyDmEStSrOw") # no album year
assert len(results) >= 11

def test_get_artist_shows(self, yt_oauth):
# with audiobooks - only with authentication
results = yt_oauth.get_artist("UCyiY-0Af0O6emoI3YvCEDaA")
assert len(results["shows"]["results"]) == 10

results = yt_oauth.get_artist_albums(results["shows"]["browseId"], results["shows"]["params"])
assert len(results) == 100

def test_get_artist_albums(self, yt):
artist = yt.get_artist("UCAeLFBCQS7FvI8PvBrWvSBg")
results = yt.get_artist_albums(artist["albums"]["browseId"], artist["albums"]["params"])
Expand Down
6 changes: 3 additions & 3 deletions ytmusicapi/locales/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In some places, for example the search() or get_artist() features, there is no o
offered other than parsing display text, which depends on the user's language. Changing the API language is desirable,
since artist and song titles are also language dependent.

This package uses the Linux command line utility xgettext, which you can install for example using your package manager.
This package uses the Linux command line utility xgettext (install via package manager).

Add new translatable texts from code
----------------------------------------
Expand All @@ -27,7 +27,7 @@ Copy the base template:
Update translation
------------------

``cd locales && sh update_po.sh``
``cd locales && ./update_po.sh``

Edit translation
----------------
Expand All @@ -37,4 +37,4 @@ Finalize translation
---------------------
To generate mo files, run

``cd locales && sh update_mo.sh``
``cd locales && ./update_mo.sh``
Binary file modified ytmusicapi/locales/ar/LC_MESSAGES/base.mo
Binary file not shown.
38 changes: 21 additions & 17 deletions ytmusicapi/locales/ar/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# Copyright (C) 2023 sigma67
# This file is distributed under the same license as ytmusicapi
# sigma67 <ytmusicapi@gmail.com>
#
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-05 20:13+0100\n"
"POT-Creation-Date: 2024-03-13 20:07+0100\n"
"PO-Revision-Date: 2023-01-02 22:14+0530\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -17,62 +17,66 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.2.2\n"

#: parsers/i18n.py:22
#: parsers/i18n.py:32
msgid "artist"
msgstr "فنان"

#: parsers/i18n.py:23
#: parsers/i18n.py:33
msgid "playlist"
msgstr "قائمةالتشغيل"

#: parsers/i18n.py:24
#: parsers/i18n.py:34
msgid "song"
msgstr "أغنية"

#: parsers/i18n.py:25
#: parsers/i18n.py:35
msgid "video"
msgstr "فيديو"

#: parsers/i18n.py:26
#: parsers/i18n.py:36
msgid "station"
msgstr "محطة"

#: parsers/i18n.py:27
#: parsers/i18n.py:37
msgid "profile"
msgstr "الملف الشخصي"

#: parsers/i18n.py:28
#: parsers/i18n.py:38
msgid "podcast"
msgstr "بودكاست"

#: parsers/i18n.py:29
#: parsers/i18n.py:39
msgid "episode"
msgstr "حلقة"

#: parsers/i18n.py:35
#: parsers/i18n.py:46
msgid "albums"
msgstr "ألبومات"

#: parsers/i18n.py:35
#: parsers/i18n.py:47
msgid "singles"
msgstr "الفردي"

#: parsers/i18n.py:35
#: parsers/i18n.py:48
msgid "shows"
msgstr "الكتب المسموعة والعروض"

#: parsers/i18n.py:49
msgid "videos"
msgstr "أشرطة فيديو"

#: parsers/i18n.py:35
#: parsers/i18n.py:50
msgid "playlists"
msgstr "قوائم التشغيل"

#: parsers/i18n.py:35
#: parsers/i18n.py:51
msgid "related"
msgstr "ذات صلة"

#: parsers/i18n.py:35
#: parsers/i18n.py:52
msgid "episodes"
msgstr "أحدث الحلقات"

#: parsers/i18n.py:35
#: parsers/i18n.py:53
msgid "podcasts"
msgstr "بودكاست"
36 changes: 20 additions & 16 deletions ytmusicapi/locales/base.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-05 20:13+0100\n"
"POT-Creation-Date: 2024-03-13 20:07+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -17,62 +17,66 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: parsers/i18n.py:22
#: parsers/i18n.py:32
msgid "artist"
msgstr ""

#: parsers/i18n.py:23
#: parsers/i18n.py:33
msgid "playlist"
msgstr ""

#: parsers/i18n.py:24
#: parsers/i18n.py:34
msgid "song"
msgstr ""

#: parsers/i18n.py:25
#: parsers/i18n.py:35
msgid "video"
msgstr ""

#: parsers/i18n.py:26
#: parsers/i18n.py:36
msgid "station"
msgstr ""

#: parsers/i18n.py:27
#: parsers/i18n.py:37
msgid "profile"
msgstr ""

#: parsers/i18n.py:28
#: parsers/i18n.py:38
msgid "podcast"
msgstr ""

#: parsers/i18n.py:29
#: parsers/i18n.py:39
msgid "episode"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:46
msgid "albums"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:47
msgid "singles"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:48
msgid "shows"
msgstr ""

#: parsers/i18n.py:49
msgid "videos"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:50
msgid "playlists"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:51
msgid "related"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:52
msgid "episodes"
msgstr ""

#: parsers/i18n.py:35
#: parsers/i18n.py:53
msgid "podcasts"
msgstr ""
Binary file modified ytmusicapi/locales/de/LC_MESSAGES/base.mo
Binary file not shown.
38 changes: 21 additions & 17 deletions ytmusicapi/locales/de/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Copyright (C) 2023 sigma67
# This file is distributed under the same license as ytmusicapi
# sigma67 <ytmusicapi@gmail.com>
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-05 20:13+0100\n"
"POT-Creation-Date: 2024-03-13 20:07+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -17,62 +17,66 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: parsers/i18n.py:22
#: parsers/i18n.py:32
msgid "artist"
msgstr "künstler"

#: parsers/i18n.py:23
#: parsers/i18n.py:33
msgid "playlist"
msgstr "playlist"

#: parsers/i18n.py:24
#: parsers/i18n.py:34
msgid "song"
msgstr "titel"

#: parsers/i18n.py:25
#: parsers/i18n.py:35
msgid "video"
msgstr "video"

#: parsers/i18n.py:26
#: parsers/i18n.py:36
msgid "station"
msgstr "sender"

#: parsers/i18n.py:27
#: parsers/i18n.py:37
msgid "profile"
msgstr "profil"

#: parsers/i18n.py:28
#: parsers/i18n.py:38
msgid "podcast"
msgstr ""

#: parsers/i18n.py:29
#: parsers/i18n.py:39
msgid "episode"
msgstr "Folge"

#: parsers/i18n.py:35
#: parsers/i18n.py:46
msgid "albums"
msgstr "alben"

#: parsers/i18n.py:35
#: parsers/i18n.py:47
msgid "singles"
msgstr "singles"

#: parsers/i18n.py:35
#: parsers/i18n.py:48
msgid "shows"
msgstr "Hörbücher und Serien"

#: parsers/i18n.py:49
msgid "videos"
msgstr "videos"

#: parsers/i18n.py:35
#: parsers/i18n.py:50
msgid "playlists"
msgstr "playlists"

#: parsers/i18n.py:35
#: parsers/i18n.py:51
msgid "related"
msgstr "das könnte fans auch gefallen"

#: parsers/i18n.py:35
#: parsers/i18n.py:52
msgid "episodes"
msgstr "neueste folgen"

#: parsers/i18n.py:35
#: parsers/i18n.py:53
msgid "podcasts"
msgstr "podcasts"
Binary file modified ytmusicapi/locales/en/LC_MESSAGES/base.mo
Binary file not shown.
Loading

0 comments on commit 0d99603

Please sign in to comment.