Support station search results, update localization (#160)
This commit is contained in:
parent
26fa787b06
commit
c5124adbfb
17 changed files with 152 additions and 138 deletions
|
|
@ -10,7 +10,7 @@ This package uses the Linux command line utility xgettext, which you can install
|
||||||
Add new translatable texts from code
|
Add new translatable texts from code
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
``xgettext -d base -o locales/base.pot ytmusicapi/*.py``
|
``xgettext -d base -o locales/base.pot *.py mixins/*.py parsers/*.py``
|
||||||
|
|
||||||
``sed --in-place locales/base.pot --expression=s/CHARSET/UTF-8/``
|
``sed --in-place locales/base.pot --expression=s/CHARSET/UTF-8/``
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,34 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,37 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr "künstler"
|
msgstr "künstler"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr "playlist"
|
msgstr "playlist"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr "titel"
|
msgstr "titel"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr "video"
|
msgstr "video"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr "sender"
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr "alben"
|
msgstr "alben"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr "singles"
|
msgstr "singles"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr "videos"
|
msgstr "videos"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr "playlists"
|
msgstr "playlists"
|
||||||
|
|
||||||
#~ msgid "album"
|
|
||||||
#~ msgstr "album"
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,34 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,37 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr "artista"
|
msgstr "artista"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr "lista de reproducción"
|
msgstr "lista de reproducción"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr "canción"
|
msgstr "canción"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr "vídeo"
|
msgstr "vídeo"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr "emisora"
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr "álbumes"
|
msgstr "álbumes"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr "sencillos"
|
msgstr "sencillos"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr "vídeos"
|
msgstr "vídeos"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr "listas de reproducción"
|
msgstr "listas de reproducción"
|
||||||
|
|
||||||
#~ msgid "album"
|
|
||||||
#~ msgstr "álbum"
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,37 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr "artiste"
|
msgstr "artiste"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr "playlist"
|
msgstr "playlist"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr "titre"
|
msgstr "titre"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr "vidéo"
|
msgstr "vidéo"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr "radio"
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr "albums"
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr "singles"
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr "vidéos"
|
msgstr "vidéos"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr "playlists"
|
msgstr ""
|
||||||
|
|
||||||
#~ msgid "album"
|
|
||||||
#~ msgstr "album"
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,37 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr "artista"
|
msgstr "artista"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr "playlist"
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr "brano"
|
msgstr "brano"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr "video"
|
msgstr ""
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr "stazione"
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr "album"
|
msgstr "album"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr "singoli"
|
msgstr "singoli"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr "video"
|
msgstr "video"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr "playlist"
|
msgstr "playlist"
|
||||||
|
|
||||||
#~ msgid "album"
|
|
||||||
#~ msgstr "album"
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# Translations for ytmusicapi
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2021 sigma67
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as ytmusicapi
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# sigma67 <ytmusicapi@gmail.com>
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-07-21 09:15+0200\n"
|
"POT-Creation-Date: 2021-02-01 14:31+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,37 +17,38 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "artist"
|
msgid "artist"
|
||||||
msgstr "アーティスト"
|
msgstr "アーティスト"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "playlist"
|
msgid "playlist"
|
||||||
msgstr "プレイリスト"
|
msgstr "プレイリスト"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "song"
|
msgid "song"
|
||||||
msgstr "曲"
|
msgstr "曲"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:44
|
#: parsers/browsing.py:21
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr "動画"
|
msgstr "動画"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:21
|
||||||
|
msgid "station"
|
||||||
|
msgstr "ステーション"
|
||||||
|
|
||||||
|
#: parsers/browsing.py:123
|
||||||
msgid "albums"
|
msgid "albums"
|
||||||
msgstr "アルバム"
|
msgstr "アルバム"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "singles"
|
msgid "singles"
|
||||||
msgstr "シングル"
|
msgstr "シングル"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr "動画"
|
msgstr "動画"
|
||||||
|
|
||||||
#: ytmusicapi/parsers.py:93
|
#: parsers/browsing.py:123
|
||||||
msgid "playlists"
|
msgid "playlists"
|
||||||
msgstr "プレイリスト"
|
msgstr "プレイリスト"
|
||||||
|
|
||||||
#~ msgid "album"
|
|
||||||
#~ msgstr "アルバム"
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,12 @@ class Parser:
|
||||||
search_result = {}
|
search_result = {}
|
||||||
if not resultType:
|
if not resultType:
|
||||||
resultType = get_item_text(data, 1).lower()
|
resultType = get_item_text(data, 1).lower()
|
||||||
result_types = ['artist', 'playlist', 'song', 'video']
|
result_types = ['artist', 'playlist', 'song', 'video', 'station']
|
||||||
result_types_local = [_('artist'), _('playlist'), _('song'), _('video')]
|
result_types_local = [
|
||||||
|
_('artist'), _('playlist'),
|
||||||
|
_('song'), _('video'),
|
||||||
|
_('station')
|
||||||
|
]
|
||||||
# default to album since it's labeled with multiple values ('Single', 'EP', etc.)
|
# default to album since it's labeled with multiple values ('Single', 'EP', etc.)
|
||||||
if resultType not in result_types_local:
|
if resultType not in result_types_local:
|
||||||
resultType = 'album'
|
resultType = 'album'
|
||||||
|
|
@ -27,23 +31,28 @@ class Parser:
|
||||||
|
|
||||||
search_result['resultType'] = resultType
|
search_result['resultType'] = resultType
|
||||||
|
|
||||||
if resultType in ['artist']:
|
if resultType != 'artist':
|
||||||
|
search_result['title'] = get_item_text(data, 0)
|
||||||
|
|
||||||
|
if resultType == 'artist':
|
||||||
search_result['artist'] = get_item_text(data, 0)
|
search_result['artist'] = get_item_text(data, 0)
|
||||||
parse_menu_playlists(data, search_result)
|
parse_menu_playlists(data, search_result)
|
||||||
|
|
||||||
elif resultType in ['album']:
|
elif resultType == 'album':
|
||||||
search_result['title'] = get_item_text(data, 0)
|
|
||||||
search_result['type'] = get_item_text(data, 1)
|
search_result['type'] = get_item_text(data, 1)
|
||||||
search_result['artist'] = get_item_text(data, 1, 2)
|
search_result['artist'] = get_item_text(data, 1, 2)
|
||||||
search_result['year'] = get_item_text(data, 1, 4, True)
|
search_result['year'] = get_item_text(data, 1, 4, True)
|
||||||
|
|
||||||
elif resultType in ['playlist']:
|
elif resultType == 'playlist':
|
||||||
search_result['title'] = get_item_text(data, 0)
|
|
||||||
search_result['author'] = get_item_text(data, 1, default_offset)
|
search_result['author'] = get_item_text(data, 1, default_offset)
|
||||||
search_result['itemCount'] = get_item_text(data, 1,
|
search_result['itemCount'] = get_item_text(data, 1,
|
||||||
default_offset + 2).split(' ')[0]
|
default_offset + 2).split('\xa0')[0]
|
||||||
|
|
||||||
elif resultType in ['song']:
|
elif resultType == 'station':
|
||||||
|
search_result['videoId'] = nav(data, NAVIGATION_VIDEO_ID)
|
||||||
|
search_result['playlistId'] = nav(data, NAVIGATION_PLAYLIST_ID)
|
||||||
|
|
||||||
|
elif resultType == 'song':
|
||||||
search_result['duration'] = None
|
search_result['duration'] = None
|
||||||
if 'menu' in data:
|
if 'menu' in data:
|
||||||
toggle_menu = find_object_by_key(nav(data, MENU_ITEMS),
|
toggle_menu = find_object_by_key(nav(data, MENU_ITEMS),
|
||||||
|
|
@ -51,12 +60,10 @@ class Parser:
|
||||||
if toggle_menu:
|
if toggle_menu:
|
||||||
search_result['feedbackTokens'] = parse_song_menu_tokens(toggle_menu)
|
search_result['feedbackTokens'] = parse_song_menu_tokens(toggle_menu)
|
||||||
|
|
||||||
elif resultType in ['video']:
|
elif resultType == 'video':
|
||||||
search_result['views'] = None
|
search_result['views'] = None
|
||||||
|
|
||||||
elif resultType in ['upload']:
|
elif resultType == 'upload':
|
||||||
search_result['title'] = get_item_text(data, 0)
|
|
||||||
|
|
||||||
browse_id = nav(data, NAVIGATION_BROWSE_ID, True)
|
browse_id = nav(data, NAVIGATION_BROWSE_ID, True)
|
||||||
if not browse_id: # song result
|
if not browse_id: # song result
|
||||||
flex_items = [
|
flex_items = [
|
||||||
|
|
@ -97,7 +104,6 @@ class Parser:
|
||||||
search_result['videoId'] = nav(
|
search_result['videoId'] = nav(
|
||||||
data, PLAY_BUTTON + ['playNavigationEndpoint', 'watchEndpoint', 'videoId'],
|
data, PLAY_BUTTON + ['playNavigationEndpoint', 'watchEndpoint', 'videoId'],
|
||||||
True)
|
True)
|
||||||
search_result['title'] = get_item_text(data, 0)
|
|
||||||
|
|
||||||
song_info = parse_song_runs(get_flex_column_item(data, 1)['text']['runs'])
|
song_info = parse_song_runs(get_flex_column_item(data, 1)['text']['runs'])
|
||||||
search_result.update(song_info)
|
search_result.update(song_info)
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,7 @@ def parse_song_runs(runs):
|
||||||
for run in runs:
|
for run in runs:
|
||||||
text = run['text']
|
text = run['text']
|
||||||
if 'navigationEndpoint' in run: # artist or album
|
if 'navigationEndpoint' in run: # artist or album
|
||||||
item = {
|
item = {'name': text, 'id': nav(run, NAVIGATION_BROWSE_ID, True)}
|
||||||
'name': text,
|
|
||||||
'id': nav(run, NAVIGATION_BROWSE_ID, True)
|
|
||||||
}
|
|
||||||
|
|
||||||
if item['id'] and item['id'].startswith('MPRE'): # album
|
if item['id'] and item['id'].startswith('MPRE'): # album
|
||||||
parsed['album'] = item
|
parsed['album'] = item
|
||||||
|
|
@ -33,7 +30,8 @@ def parse_song_runs(runs):
|
||||||
parsed['artists'].append(item)
|
parsed['artists'].append(item)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if text.endswith(' views'):
|
# note: YT uses non-breaking space \xa0 to separate number and magnitude
|
||||||
|
if re.match(r"^\d([^ ])* [^ ]*$", text):
|
||||||
parsed['views'] = text.split(' ')[0]
|
parsed['views'] = text.split(' ')[0]
|
||||||
|
|
||||||
elif re.match(r"^(\d+:)*\d+:\d+$", text):
|
elif re.match(r"^(\d+:)*\d+:\d+$", text):
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ class YTMusic(BrowsingMixin, WatchMixin, LibraryMixin, PlaylistsMixin, UploadsMi
|
||||||
Permits both authenticated and non-authenticated requests.
|
Permits both authenticated and non-authenticated requests.
|
||||||
Authentication header data must be provided on initialization.
|
Authentication header data must be provided on initialization.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
auth: str = None,
|
auth: str = None,
|
||||||
user: str = None,
|
user: str = None,
|
||||||
|
|
@ -84,11 +83,9 @@ class YTMusic(BrowsingMixin, WatchMixin, LibraryMixin, PlaylistsMixin, UploadsMi
|
||||||
|
|
||||||
with open(pkg_resources.resource_filename('ytmusicapi', 'context.json')) as json_file:
|
with open(pkg_resources.resource_filename('ytmusicapi', 'context.json')) as json_file:
|
||||||
self.context = json.load(json_file)
|
self.context = json.load(json_file)
|
||||||
|
|
||||||
self.context['context']['client']['hl'] = language
|
self.context['context']['client']['hl'] = language
|
||||||
supported_languages = [
|
supported_languages = [f for f in pkg_resources.resource_listdir('ytmusicapi', 'locales')]
|
||||||
f for f in pkg_resources.resource_listdir('ytmusicapi', 'locales')
|
|
||||||
]
|
|
||||||
if language not in supported_languages:
|
if language not in supported_languages:
|
||||||
raise Exception("Language not supported. Supported languages are "
|
raise Exception("Language not supported. Supported languages are "
|
||||||
', '.join(supported_languages))
|
', '.join(supported_languages))
|
||||||
|
|
@ -96,8 +93,8 @@ class YTMusic(BrowsingMixin, WatchMixin, LibraryMixin, PlaylistsMixin, UploadsMi
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, self.language)
|
locale.setlocale(locale.LC_ALL, self.language)
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
with suppress(locale.Error):
|
with suppress(locale.Error):
|
||||||
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
|
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
|
||||||
self.lang = gettext.translation('base',
|
self.lang = gettext.translation('base',
|
||||||
localedir=pkg_resources.resource_filename(
|
localedir=pkg_resources.resource_filename(
|
||||||
'ytmusicapi', 'locales'),
|
'ytmusicapi', 'locales'),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue