Compare commits
163
Commits
lol
..
work/library
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
188f4363c4 | ||
|
|
4c43b60714 | ||
|
|
7824d796b4 | ||
|
|
692df68464 | ||
|
|
45a3e9540f | ||
|
|
d2561d8f1f | ||
|
|
aa8c5fefca | ||
|
|
c83d7f582b | ||
|
|
62385df312 | ||
|
|
dad015195b | ||
|
|
b89fed88ee | ||
|
|
613dd1eb51 | ||
|
|
b7754e7d60 | ||
|
|
644c343e95 | ||
|
|
c9d530be76 | ||
|
|
aa0268694f | ||
|
|
8e873e726d | ||
|
|
dca3373056 | ||
|
|
6d57cad22c | ||
|
|
b67fdc384f | ||
|
|
32f98a7c9b | ||
|
|
2b8ac69916 | ||
|
|
ad6fe5e633 | ||
|
|
1ad6586a07 | ||
|
|
0249604199 | ||
|
|
1a93e0d944 | ||
|
|
347613a7f2 | ||
|
|
424c67a268 | ||
|
|
64d7a911fa | ||
|
|
961dca328d | ||
|
|
433d95969c | ||
|
|
15f439c38e | ||
|
|
ca4d5d8b77 | ||
|
|
06338900dc | ||
|
|
8ec674fbef | ||
|
|
58eefc29eb | ||
|
|
9312331755 | ||
|
|
1d25f46f52 | ||
|
|
a775cd58be | ||
|
|
ae5ed3b10b | ||
|
|
8aab91568e | ||
|
|
6647346314 | ||
|
|
bfb41310ad | ||
|
|
c3371adda4 | ||
|
|
9bcf017c8d | ||
|
|
2c0b13ff9f | ||
|
|
abfd901a82 | ||
|
|
135b8859d6 | ||
|
|
f8637b686c | ||
|
|
53f466c976 | ||
|
|
762976159e | ||
|
|
de1a872f74 | ||
|
|
3f39fc9e90 | ||
|
|
e8e6a5f1e2 | ||
|
|
51a9799281 | ||
|
|
73078eb5e7 | ||
|
|
d138b5c67b | ||
|
|
ef3846df6b | ||
|
|
a31494d83f | ||
|
|
b131fcc7d9 | ||
|
|
e6379db384 | ||
|
|
f50cf92e9a | ||
|
|
e9e0e4f143 | ||
|
|
dfc0b8cbcd | ||
|
|
473b4ee83e | ||
|
|
f40c9fd497 | ||
|
|
0ca21344f8 | ||
|
|
d4d85a8b58 | ||
|
|
cfd4b3de53 | ||
|
|
96c5f344cc | ||
|
|
d6e8ddca11 | ||
|
|
db63766cc7 | ||
|
|
048e876710 | ||
|
|
d7e74e2a5f | ||
|
|
722b78e49b | ||
|
|
734caa0280 | ||
|
|
69901cb69c | ||
|
|
e230adf223 | ||
|
|
07584b73f4 | ||
|
|
1b29a028a6 | ||
|
|
736d1789c9 | ||
|
|
01f22c517a | ||
|
|
edd171c97b | ||
|
|
873c791262 | ||
|
|
068a5b756a | ||
|
|
db35f2a5e6 | ||
|
|
c06bb7ad03 | ||
|
|
1c63395497 | ||
|
|
ba79cd6b5a | ||
|
|
a458b36ed3 | ||
|
|
1c51c183f0 | ||
|
|
7a69653933 | ||
|
|
f9a286b136 | ||
|
|
87e1a7ef90 | ||
|
|
e5561d0256 | ||
|
|
998ba22a21 | ||
|
|
a79fb43569 | ||
|
|
0365309415 | ||
|
|
c0df2785df | ||
|
|
e0ae3f0c93 | ||
|
|
b95850013b | ||
|
|
4ec46a10bf | ||
|
|
05e9949487 | ||
|
|
7b1bce6297 | ||
|
|
b6fa3b3aa9 | ||
|
|
5b5e41a563 | ||
|
|
8fcac61500 | ||
|
|
0420a694f7 | ||
|
|
78cf01b0e8 | ||
|
|
b5f8ae8d85 | ||
|
|
58c183df56 | ||
|
|
2272f88db9 | ||
|
|
d7f1a408fd | ||
|
|
b7c99086e9 | ||
|
|
28c5b7d562 | ||
|
|
c163b6b995 | ||
|
|
7e62862bd3 | ||
|
|
89402fb770 | ||
|
|
4717953a06 | ||
|
|
eefab11079 | ||
|
|
25d5749970 | ||
|
|
5e4c45038f | ||
|
|
7967d37f14 | ||
|
|
1ee5a49c72 | ||
|
|
44aedfd702 | ||
|
|
5e4fcb7d35 | ||
|
|
d6dcce1a88 | ||
|
|
e34530bf7d | ||
|
|
56b440f689 | ||
|
|
e2cebadaef | ||
|
|
49d55d73d1 | ||
|
|
a9ec57a008 | ||
|
|
f4e11ba490 | ||
|
|
44176b49ac | ||
|
|
79ff9230ba | ||
|
|
d6682dbfe3 | ||
|
|
ef53ac4b1a | ||
|
|
c503d0607a | ||
|
|
5f63abd8bb | ||
|
|
e2530e94cf | ||
|
|
1f3e1ff98e | ||
|
|
f7353bfcd5 | ||
|
|
bdeca89a95 | ||
|
|
a707a0523f | ||
|
|
70243a6e59 | ||
|
|
2f4cb7868a | ||
|
|
1fa0a3f4b2 | ||
|
|
f24a74d195 | ||
|
|
38c448335f | ||
|
|
9afeae2ccc | ||
|
|
583973a731 | ||
|
|
dc5c25cf42 | ||
|
|
a4fcc55638 | ||
|
|
1aa7559fe7 | ||
|
|
6f4ec382e8 | ||
|
|
a67631ec92 | ||
|
|
d861b7cc59 | ||
|
|
87fd82b43b | ||
|
|
0902b4aa19 | ||
|
|
7ccb638662 | ||
|
|
c35c563878 | ||
|
|
84cdaade07 | ||
|
|
f3dec29198 |
No files matched your search
@@ -1,2 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
# SPDX-FileCopyrightText: 2021 Bhushan Shah <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
*.kdev4
|
||||
CMakeLists.txt.user
|
||||
flatpak/flatpak-builder-tools/
|
||||
build/
|
||||
@@ -0,0 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
include:
|
||||
- 'https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/reuse-lint.yml'
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: AudioTube
|
||||
Upstream-Contact: Jonah Brüchert <[email protected]>
|
||||
Source: https://invent.kde.org/plasma-mobile/audiotube
|
||||
|
||||
# Sample paragraph, commented out:
|
||||
#
|
||||
# Files: ...
|
||||
# Copyright: $YEAR $NAME <$CONTACT>
|
||||
# License: ...
|
||||
# Comment: ...
|
||||
|
||||
Files: README.md
|
||||
Copyright: 2021 Jonah Brüchert <[email protected]>
|
||||
License: CC0-1.0
|
||||
|
||||
Files: org.kde.audiotube.desktop
|
||||
org.kde.audiotube.json
|
||||
Copyright: 2021 Jonah Brüchert <[email protected]>
|
||||
License: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
Files: logo.png
|
||||
org.kde.audiotube.svg
|
||||
Copyright: 2021 Mathis Brüchert <[email protected]>
|
||||
License: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
+19
-5
@@ -1,18 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
|
||||
project(audiotube)
|
||||
|
||||
include(FeatureSummary)
|
||||
|
||||
set(PROJECT_VERSION "22.04")
|
||||
set(QT5_MIN_VERSION 5.15)
|
||||
set(KF5_MIN_VERSION 5.81)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
@@ -21,11 +26,20 @@ include(ECMSetupVersion)
|
||||
include(ECMGenerateHeaders)
|
||||
include(ECMPoQmTools)
|
||||
|
||||
ecm_setup_version(${PROJECT_VERSION}
|
||||
VARIABLE_PREFIX AUDIOTUBE
|
||||
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
)
|
||||
|
||||
kde_enable_exceptions()
|
||||
|
||||
find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED COMPONENTS Core Gui Qml QuickControls2 Svg DBus)
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 I18n)
|
||||
find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED COMPONENTS Core Gui Qml QuickControls2 Svg Sql)
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 I18n CoreAddons Crash)
|
||||
find_package(pybind11 REQUIRED)
|
||||
find_package(Ytdlp REQUIRED RUNTIME)
|
||||
find_package(YTMusicAPI REQUIRED RUNTIME)
|
||||
|
||||
ki18n_install(po)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) <year> <owner>. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,119 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES
|
||||
NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE
|
||||
AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
|
||||
ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE
|
||||
OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS
|
||||
LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION
|
||||
OR WORKS PROVIDED HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer exclusive
|
||||
Copyright and Related Rights (defined below) upon the creator and subsequent
|
||||
owner(s) (each and all, an "owner") of an original work of authorship and/or
|
||||
a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for the
|
||||
purpose of contributing to a commons of creative, cultural and scientific
|
||||
works ("Commons") that the public can reliably and without fear of later claims
|
||||
of infringement build upon, modify, incorporate in other works, reuse and
|
||||
redistribute as freely as possible in any form whatsoever and for any purposes,
|
||||
including without limitation commercial purposes. These owners may contribute
|
||||
to the Commons to promote the ideal of a free culture and the further production
|
||||
of creative, cultural and scientific works, or to gain reputation or greater
|
||||
distribution for their Work in part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any expectation
|
||||
of additional consideration or compensation, the person associating CC0 with
|
||||
a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
|
||||
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
|
||||
and publicly distribute the Work under its terms, with knowledge of his or
|
||||
her Copyright and Related Rights in the Work and the meaning and intended
|
||||
legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be protected
|
||||
by copyright and related or neighboring rights ("Copyright and Related Rights").
|
||||
Copyright and Related Rights include, but are not limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display, communicate,
|
||||
and translate a Work;
|
||||
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
|
||||
iii. publicity and privacy rights pertaining to a person's image or likeness
|
||||
depicted in a Work;
|
||||
|
||||
iv. rights protecting against unfair competition in regards to a Work, subject
|
||||
to the limitations in paragraph 4(a), below;
|
||||
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal protection
|
||||
of databases, and under any national implementation thereof, including any
|
||||
amended or successor version of such directive); and
|
||||
|
||||
vii. other similar, equivalent or corresponding rights throughout the world
|
||||
based on applicable law or treaty, and any national implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention of,
|
||||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
|
||||
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
|
||||
and Related Rights and associated claims and causes of action, whether now
|
||||
known or unknown (including existing as well as future claims and causes of
|
||||
action), in the Work (i) in all territories worldwide, (ii) for the maximum
|
||||
duration provided by applicable law or treaty (including future time extensions),
|
||||
(iii) in any current or future medium and for any number of copies, and (iv)
|
||||
for any purpose whatsoever, including without limitation commercial, advertising
|
||||
or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the
|
||||
benefit of each member of the public at large and to the detriment of Affirmer's
|
||||
heirs and successors, fully intending that such Waiver shall not be subject
|
||||
to revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason be
|
||||
judged legally invalid or ineffective under applicable law, then the Waiver
|
||||
shall be preserved to the maximum extent permitted taking into account Affirmer's
|
||||
express Statement of Purpose. In addition, to the extent the Waiver is so
|
||||
judged Affirmer hereby grants to each affected person a royalty-free, non
|
||||
transferable, non sublicensable, non exclusive, irrevocable and unconditional
|
||||
license to exercise Affirmer's Copyright and Related Rights in the Work (i)
|
||||
in all territories worldwide, (ii) for the maximum duration provided by applicable
|
||||
law or treaty (including future time extensions), (iii) in any current or
|
||||
future medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional purposes
|
||||
(the "License"). The License shall be deemed effective as of the date CC0
|
||||
was applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder of
|
||||
the License, and in such case Affirmer hereby affirms that he or she will
|
||||
not (i) exercise any of his or her remaining Copyright and Related Rights
|
||||
in the Work or (ii) assert any associated claims and causes of action with
|
||||
respect to the Work, in either case contrary to Affirmer's express Statement
|
||||
of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered,
|
||||
licensed or otherwise affected by this document.
|
||||
|
||||
b. Affirmer offers the Work as-is and makes no representations or warranties
|
||||
of any kind concerning the Work, express, implied, statutory or otherwise,
|
||||
including without limitation warranties of title, merchantability, fitness
|
||||
for a particular purpose, non infringement, or the absence of latent or other
|
||||
defects, accuracy, or the present or absence of errors, whether or not discoverable,
|
||||
all to the greatest extent permissible under applicable law.
|
||||
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without limitation
|
||||
any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims
|
||||
responsibility for obtaining any necessary consents, permissions or other
|
||||
rights required for any use of the Work.
|
||||
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a party
|
||||
to this document and has no duty or obligation with respect to this CC0 or
|
||||
use of the Work.
|
||||
@@ -4,9 +4,9 @@ AudioTube is a client for YouTube Music.
|
||||
|
||||
# Dependencies
|
||||
|
||||
It depends on Qt and Kirigami in addition to a few python packages:
|
||||
It depends on Qt, Kirigami, KI18n, KCoreAddons and KCrash in addition to a few python packages:
|
||||
* ytmusicapi
|
||||
* youtube_dl
|
||||
* yt_dlp
|
||||
|
||||
YouTube uses webp images for the cover art, so you will need to install qtimageformats.
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import ytmusicapi" RESULT_VARIABLE YTMUSICAPI_CHECK_RESULT)
|
||||
|
||||
if (${YTMUSICAPI_CHECK_RESULT} EQUAL 0)
|
||||
set(YTMusicAPI_FOUND TRUE)
|
||||
endif()
|
||||
@@ -0,0 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import yt_dlp" RESULT_VARIABLE YTDLP_CHECK_RESULT)
|
||||
|
||||
if (${YTDLP_CHECK_RESULT} EQUAL 0)
|
||||
set(Ytdlp_FOUND TRUE)
|
||||
endif()
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "python3-youtube_dl",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"youtube_dl\" --no-build-isolation"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/94/a0/b8325b524700daae1c04a6156473ab7091d44071353f1d7c9e66b9c7f019/youtube_dl-2021.4.26.tar.gz",
|
||||
"sha256": "6f311ffaf8b88cdcf27a2301a2272455e213bdb780aa447246933a3da4532879"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "python3-yt-dlp",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"yt-dlp\" --no-build-isolation"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/b4/7b/0960d02701f783bb052ec69ea32789d878d2cce05a03950adbd75f164758/websockets-10.2.tar.gz",
|
||||
"sha256": "8351c3c86b08156337b0e4ece0e3c5ec3e01fcd14e8950996832a23c99416098"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/2a/18/70c32fe9357f3eea18598b23aa9ed29b1711c3001835f7cf99a9818985d0/Brotli-1.0.9.zip",
|
||||
"sha256": "4d1b810aa0ed773f81dceda2cc7b403d01057458730e309856356d4ef4188438"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/16/b3/f7aa8edf2ff4495116f95fd442b2a346aa55d1d46313143c8814886dbcdb/mutagen-1.45.1-py3-none-any.whl",
|
||||
"sha256": "9c9f243fcec7f410f138cb12c21c84c64fde4195481a30c9bfb05b5f003adfed"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/c0/61/3a08dc08c0c60498a0136a7eec1a098f08be79f75bf35fdd0a15a1bace70/yt_dlp-2022.3.8.2-py3-none-any.whl",
|
||||
"sha256": "05179f0f2c34f06910003bb9f80af68ff798b072ca0f826c0e6704a3fbd5b306"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/24/40/e249ac3845a2333ce50f1bb02299ffb766babdfe80ca9d31e0158ad06afd/pycryptodomex-3.14.1.tar.gz",
|
||||
"sha256": "2ce76ed0081fd6ac8c74edc75b9d14eca2064173af79843c24fa62573263c1f2"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
@@ -7,33 +7,33 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/cb/cf/871177f1fc795c6c10787bc0e1f27bb6cf7b81dbde399fd35860472cecbc/urllib3-1.26.4.tar.gz",
|
||||
"sha256": "e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937"
|
||||
"url": "https://files.pythonhosted.org/packages/cb/58/834a6445479c72544d9285badce0a58650520c8ba5adfae7b98e61d133bb/ytmusicapi-0.21.0-py3-none-any.whl",
|
||||
"sha256": "29d8d44e1911458041882a453b05c37021ff850757c648f93a45d1775dddbae2"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz",
|
||||
"sha256": "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"
|
||||
"url": "https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl",
|
||||
"sha256": "d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/ee/2d/9cdc2b527e127b4c9db64b86647d567985940ac3698eeabc7ffaccb4ea61/chardet-4.0.0.tar.gz",
|
||||
"sha256": "0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"
|
||||
"url": "https://files.pythonhosted.org/packages/ec/03/062e6444ce4baf1eac17a6a0ebfe36bb1ad05e1df0e20b110de59c278498/urllib3-1.26.9-py2.py3-none-any.whl",
|
||||
"sha256": "44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/06/a9/cd1fd8ee13f73a4d4f491ee219deeeae20afefa914dfb4c130cfc9dc397a/certifi-2020.12.5.tar.gz",
|
||||
"sha256": "1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"
|
||||
"url": "https://files.pythonhosted.org/packages/06/b3/24afc8868eba069a7f03650ac750a778862dc34941a4bebeb58706715726/charset_normalizer-2.0.12-py3-none-any.whl",
|
||||
"sha256": "6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/6b/47/c14abc08432ab22dc18b9892252efaf005ab44066de871e72a38d6af464b/requests-2.25.1.tar.gz",
|
||||
"sha256": "27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"
|
||||
"url": "https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl",
|
||||
"sha256": "f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/61/b5/da439d5f75db7ff17790b19136c835f9a315530436ee7bc9d75aeea2f6e5/ytmusicapi-0.16.0.tar.gz",
|
||||
"sha256": "ffde3fb5a78123ac59dee37fc1f32793f34f9a4fa3d3e69a1fc08064112c2b5d"
|
||||
"url": "https://files.pythonhosted.org/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl",
|
||||
"sha256": "84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
set -e
|
||||
|
||||
export GIT_CLONE_ARGS="--depth 1 --single-branch"
|
||||
@@ -12,5 +16,5 @@ else
|
||||
git -C flatpak-builder-tools pull
|
||||
fi
|
||||
|
||||
./flatpak-builder-tools/pip/flatpak-pip-generator youtube_dl
|
||||
./flatpak-builder-tools/pip/flatpak-pip-generator yt-dlp
|
||||
./flatpak-builder-tools/pip/flatpak-pip-generator ytmusicapi
|
||||
@@ -1,12 +1,159 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
<component type="desktop-application">
|
||||
<id>org.kde.audiotube</id>
|
||||
<name>AudioTube</name>
|
||||
<name xml:lang="ar">تيوب الصوتي</name>
|
||||
<name xml:lang="az">AudioTube</name>
|
||||
<name xml:lang="ca">AudioTube</name>
|
||||
<name xml:lang="ca-valencia">AudioTube</name>
|
||||
<name xml:lang="cs">AudioTube</name>
|
||||
<name xml:lang="de">AudioTube</name>
|
||||
<name xml:lang="en-GB">AudioTube</name>
|
||||
<name xml:lang="es">AudioTube</name>
|
||||
<name xml:lang="eu">AudioTube</name>
|
||||
<name xml:lang="fi">AudioTube</name>
|
||||
<name xml:lang="fr">AudioTube</name>
|
||||
<name xml:lang="hi">ओडियो-ट्यूब</name>
|
||||
<name xml:lang="it">AudioTube</name>
|
||||
<name xml:lang="ko">AudioTube</name>
|
||||
<name xml:lang="nl">AudioTube</name>
|
||||
<name xml:lang="pa">ਆਡੀਓ-ਟਿਊਬ</name>
|
||||
<name xml:lang="pl">AudioTube</name>
|
||||
<name xml:lang="pt">AudioTube</name>
|
||||
<name xml:lang="pt-BR">AudioTube</name>
|
||||
<name xml:lang="ro">AudioTube</name>
|
||||
<name xml:lang="sk">AudioTube</name>
|
||||
<name xml:lang="sl">AudioTube</name>
|
||||
<name xml:lang="sv">AudioTube</name>
|
||||
<name xml:lang="tr">AudioTube</name>
|
||||
<name xml:lang="uk">AudioTube</name>
|
||||
<name xml:lang="x-test">xxAudioTubexx</name>
|
||||
<name xml:lang="zh-CN">AudioTube</name>
|
||||
<summary>Convergent YouTube Music client</summary>
|
||||
<summary xml:lang="ar">عميل موسيقى يوتيوب متعدد المنصات</summary>
|
||||
<summary xml:lang="az">Birləşmiş YouTube Musiqi müştərisi</summary>
|
||||
<summary xml:lang="ca">Client convergent de música de YouTube</summary>
|
||||
<summary xml:lang="ca-valencia">Client convergent de música de YouTube</summary>
|
||||
<summary xml:lang="de">Konvergentes YouTube-Musikprogramm</summary>
|
||||
<summary xml:lang="en-GB">Convergent YouTube Music client</summary>
|
||||
<summary xml:lang="es">Cliente de música de YouTube convergente</summary>
|
||||
<summary xml:lang="eu">YouTube Music bezero konbergentea</summary>
|
||||
<summary xml:lang="fi">Mukautuva YouTube Music -asiakas</summary>
|
||||
<summary xml:lang="fr">Client convergent pour musique sur YouTube</summary>
|
||||
<summary xml:lang="hi">अभिसृत यूट्यूब संगीत क्लाएंट</summary>
|
||||
<summary xml:lang="it">Client YouTube Music convergente</summary>
|
||||
<summary xml:lang="ko">올인원 YouTube Music 클라이언트</summary>
|
||||
<summary xml:lang="nl">Convergente muziekclient van YouTube</summary>
|
||||
<summary xml:lang="pl">Adaptacyjny program do YouTube Music</summary>
|
||||
<summary xml:lang="pt">Cliente de música do YouTube convergente</summary>
|
||||
<summary xml:lang="pt-BR">Um cliente convergente para o YouTube Music</summary>
|
||||
<summary xml:lang="ro">Client convergent de muzică pentru YouTube</summary>
|
||||
<summary xml:lang="sl">Konvergentni odjemalec glasbe YouTube</summary>
|
||||
<summary xml:lang="sv">Konvergent YouTube-musikprogram</summary>
|
||||
<summary xml:lang="tr">Yakınsak YouTube Müzik istemcisi</summary>
|
||||
<summary xml:lang="uk">Зручний музичний клієнт YouTube</summary>
|
||||
<summary xml:lang="x-test">xxConvergent YouTube Music clientxx</summary>
|
||||
<summary xml:lang="zh-CN">桌面和移动设备通用 YouTube Music 客户端</summary>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-2.0+</project_license>
|
||||
<developer_name>KDE Community</developer_name>
|
||||
<developer_name xml:lang="ar">مجتمع كدي</developer_name>
|
||||
<developer_name xml:lang="az">KDE İcması</developer_name>
|
||||
<developer_name xml:lang="ca">La comunitat KDE</developer_name>
|
||||
<developer_name xml:lang="ca-valencia">La comunitat KDE</developer_name>
|
||||
<developer_name xml:lang="cs">Komunita KDE</developer_name>
|
||||
<developer_name xml:lang="de">KDE-Gemeinschaft</developer_name>
|
||||
<developer_name xml:lang="en-GB">KDE Community</developer_name>
|
||||
<developer_name xml:lang="es">Comunidad KDE</developer_name>
|
||||
<developer_name xml:lang="eu">KDE komunitatea</developer_name>
|
||||
<developer_name xml:lang="fi">KDE-yhteisö</developer_name>
|
||||
<developer_name xml:lang="fr">Communauté de KDE</developer_name>
|
||||
<developer_name xml:lang="hi">केडीई समुदाय</developer_name>
|
||||
<developer_name xml:lang="it">Comunità KDE</developer_name>
|
||||
<developer_name xml:lang="ko">KDE 커뮤니티</developer_name>
|
||||
<developer_name xml:lang="nl">KDE-gemeenschap</developer_name>
|
||||
<developer_name xml:lang="pa">ਕੇਡੀਈ ਕਮਿਊਨਟੀ</developer_name>
|
||||
<developer_name xml:lang="pl">Społeczność KDE</developer_name>
|
||||
<developer_name xml:lang="pt">Comunidade do KDE</developer_name>
|
||||
<developer_name xml:lang="pt-BR">A Comunidade KDE</developer_name>
|
||||
<developer_name xml:lang="ro">Comunitatea KDE</developer_name>
|
||||
<developer_name xml:lang="sk">KDE komunita</developer_name>
|
||||
<developer_name xml:lang="sl">Skupnost KDE</developer_name>
|
||||
<developer_name xml:lang="sv">KDE-gemenskapen</developer_name>
|
||||
<developer_name xml:lang="tr">KDE Topluluğu</developer_name>
|
||||
<developer_name xml:lang="uk">Спільнота KDE</developer_name>
|
||||
<developer_name xml:lang="x-test">xxKDE Communityxx</developer_name>
|
||||
<developer_name xml:lang="zh-CN">KDE 社区</developer_name>
|
||||
<content_rating type="oars-1.0"/>
|
||||
<url type="homepage">https://apps.kde.org/en/audiotube</url>
|
||||
<releases>
|
||||
<release version="22.04" date="2022-04-26">
|
||||
<url>https://www.plasma-mobile.org/2022/04/26/plasma-mobile-gear-22-04/</url>
|
||||
<description>
|
||||
<ul>
|
||||
<li>Update the version of ytmusicapi</li>
|
||||
<li>General code-refactoring and translation updates</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="22.02" date="2022-02-09">
|
||||
<url>https://www.plasma-mobile.org/2022/02/09/plasma-mobile-gear-22-02/</url>
|
||||
<description>
|
||||
<ul>
|
||||
<li>Update the version of ytmusicapi</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="21.12" date="2021-12-07">
|
||||
<url>https://www.plasma-mobile.org/2021/12/07/plasma-mobile-gear-21-12/</url>
|
||||
</release>
|
||||
<release version="21.08" date="2021-08-31">
|
||||
<url>https://www.plasma-mobile.org/2021/08/31/plasma-mobile-gear-21-08/</url>
|
||||
</release>
|
||||
</releases>
|
||||
<launchable type="desktop-id">org.kde.audiotube.desktop</launchable>
|
||||
<screenshots>
|
||||
<screenshot>
|
||||
<image>https://cdn.kde.org/screenshots/audiotube/desktop.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://cdn.kde.org/screenshots/audiotube/mobile_playlist.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<recommends>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>touch</control>
|
||||
</recommends>
|
||||
<description>
|
||||
<p>AudioTube can search YouTube Music, list albums and artists, play automatically generated playlists, albums and allows to put your own playlist together.</p>
|
||||
<p xml:lang="ar">يمكن لتيوب الصوتي البحث في موسيقى يوتيوب، وعرض الألبومات والفنانين، وتشغيل القوائم والألبومات المولدة تلقائيًا، ويسمح لك بوضع قائمة التشغيل الخاصة بك معًا.</p>
|
||||
<p xml:lang="az">AudioTube YouTube Musiqi, albomların və ifaçıların siyahısı üzrə axtarış etməyə, yaradılmış mahnı siyahısı və albomları avtomatik oxutmağa və öz mahnı siyahınızı yaratmağa imkan verir.</p>
|
||||
<p xml:lang="ca">L'AudioTube pot cercar música a YouTube, llistar àlbums i artistes, reproduir llistes de reproducció generades automàticament, àlbums i permet crear la vostra pròpia llista de reproducció.</p>
|
||||
<p xml:lang="ca-valencia">L'AudioTube pot buscar música a YouTube, llistar àlbums i artistes, reproduir llistes de reproducció generades automàticament, àlbums i permet crear la vostra pròpia llista de reproducció.</p>
|
||||
<p xml:lang="de">AudioTube kann Musik auf YouTube durchsuchen, Alben und Interpreten auflisten, automatisch generierte Wiedergabelisten und Alben abspielen und erlaubt es, eine eigene Wiedergabeliste zusammenzustellen.</p>
|
||||
<p xml:lang="en-GB">AudioTube can search YouTube Music, list albums and artists, play automatically generated playlists, albums and allows to put your own playlist together.</p>
|
||||
<p xml:lang="es">AudioTube puede buscar música de YouTube, listar álbumes y artistas, reproducir las listas de reproducción generadas, álbumes y le permite crear su propia lista de reproducción.</p>
|
||||
<p xml:lang="eu">AudioTube-k YouTube Music-en bilatu dezake, albumak eta artistak zerrendatu, automatikoki sortutako jotze-zerrendak eta albumak jo, eta zure jotze-zerrenda osatzeko aukera eskaintzen dizu.</p>
|
||||
<p xml:lang="fi">AudioTube osaa etsiä YouTube Music -haun, albumien ja artistien luettelun, luotujen soittolistojen automaattisen toiston ja omien soittolistojen kokoamisen.</p>
|
||||
<p xml:lang="fr">AudioTube peut effectuer des recherches de musiques sur YouTube Music, établir une liste d'albums et d'artistes, lire des listes de lecture générées automatiquement, des albums et permet de composer sa propre liste de lecture.</p>
|
||||
<p xml:lang="hi">ऑडियोट्यूब यूट्यूब संगीत खोज सकता है, एल्बम और कलाकारों की सूची बना सकता है, स्वचालित रूप से उत्पन्न की गई गीतसूची, एल्बम बजा सकता है और आपकी अपनी खुद की प्लेलिस्ट को एक साथ रखने में मदद करता है।</p>
|
||||
<p xml:lang="it">AudioTube può eseguire ricerche su YouTube Music, elencare album e artisti, riprodurre scalette e album generati automaticamente e ti consente di creare la tua scaletta.</p>
|
||||
<p xml:lang="ko">AudioTube는 YouTube Music을 검색하고, 앨범과 아티스트를 표시하고, 자동 생성된 재생 목록, 앨범을 재생하고, 사용자 정의 재생 목록을 만들 수 있습니다.</p>
|
||||
<p xml:lang="nl">AudioTube kan in YouTube Music zoeken, een lijst maken van albums en artiesten, automatically gegenereerde afspeellijsten, albums afspelen en biedt u het samenstellen van uw eigen afspeellijst.</p>
|
||||
<p xml:lang="pl">AudioTube może przeszukiwać serwis YouTube Music, wypisać albumy i wykonawców, odtwarzać samoczynnie utworzone listy odtwarzania, albumy oraz umożliwia tworzenie własnych list odtwarzania.</p>
|
||||
<p xml:lang="pt">O AudioTube consegue pesquisar no YouTube Music, enumerar os álbuns e artistas, reproduzir listas geradas automaticamente, álbuns e permite-lhe reproduzir as suas próprias listas de reprodução.</p>
|
||||
<p xml:lang="pt-BR">O AudioTube pode pesquisar no YouTube Music, listar álbuns e artistas, rodar listas de reprodução geradas automaticamente, álbuns inteiros, e criar a sua própria lista de reprodução.</p>
|
||||
<p xml:lang="sl">AudioTube lahko išče po YouTube Music, izdela sezname albumov in avtorjev, samodejno predvaja generirane sezname, albume in sestavlja vaše sezname predvajanja.</p>
|
||||
<p xml:lang="sv">AudioTube kan söka på YouTube Music, lista album och artister, spela upp automatiskt genererade spellistor, albums och låter dig sammanställa egna spellistor.</p>
|
||||
<p xml:lang="tr">AudioTube, YouTube Müzik'te arama yapabilir; albümleri, sanatçıları listeler; kendiliğinden oluşturulmuş çalma listelerini, albümleri çalar ve kendi çalma listenizi oluşturmanıza izin verir.</p>
|
||||
<p xml:lang="uk">AudioTube може виконувати пошук на YouTube Music, показувати списки альбомів та виконавців, відтворювати створені автоматично списки відтворення, альбоми та надає вам змогу створювати власні списки відворення.</p>
|
||||
<p xml:lang="x-test">xxAudioTube can search YouTube Music, list albums and artists, play automatically generated playlists, albums and allows to put your own playlist together.xx</p>
|
||||
<p xml:lang="zh-CN">AudioTube 可以搜索 YouTube Music 的内容,列出专辑和艺人,播放自动生成的播放列表,还可以自行制作播放列表。</p>
|
||||
</description>
|
||||
</component>
|
||||
@@ -1,6 +1,60 @@
|
||||
[Desktop Entry]
|
||||
Name=AudioTube
|
||||
Name[ar]=تيوب الصوتي
|
||||
Name[az]=AudioTube
|
||||
Name[ca]=AudioTube
|
||||
Name[ca@valencia]=AudioTube
|
||||
Name[cs]=AudioTube
|
||||
Name[de]=AudioTube
|
||||
Name[en_GB]=AudioTube
|
||||
Name[es]=AudioTube
|
||||
Name[eu]=AudioTube
|
||||
Name[fi]=AudioTube
|
||||
Name[fr]=AudioTube
|
||||
Name[hi]=ओडियो-ट्यूब
|
||||
Name[it]=AudioTube
|
||||
Name[ko]=AudioTube
|
||||
Name[nl]=AudioTube
|
||||
Name[pa]=ਆਡੀਓ-ਟਿਊਬ
|
||||
Name[pl]=AudioTube
|
||||
Name[pt]=AudioTube
|
||||
Name[pt_BR]=AudioTube
|
||||
Name[ro]=AudioTube
|
||||
Name[sk]=AudioTube
|
||||
Name[sl]=AudioTube
|
||||
Name[sv]=AudioTube
|
||||
Name[tr]=AudioTube
|
||||
Name[uk]=AudioTube
|
||||
Name[x-test]=xxAudioTubexx
|
||||
Name[zh_CN]=AudioTube
|
||||
Comment=YouTube Music client
|
||||
Comment[ar]=عميل يوتيوب ميوزيك
|
||||
Comment[az]=YouTube Musiqi müştərisi
|
||||
Comment[ca]=Client de música de YouTube
|
||||
Comment[ca@valencia]=Client de música de YouTube
|
||||
Comment[cs]=Hudební klient YouTube
|
||||
Comment[de]=YouTube-Musikprogramm
|
||||
Comment[en_GB]=YouTube Music client
|
||||
Comment[es]=Cliente de música de YouTube
|
||||
Comment[eu]=YouTube Music bezeroa
|
||||
Comment[fi]=YouTube Music -asiakas
|
||||
Comment[fr]=Client de musique sur Youtube
|
||||
Comment[hi]=यूट्यूब संगीत क्लाएंट
|
||||
Comment[it]=Client YouTube Music
|
||||
Comment[ko]=YouTube Music 클라이언트
|
||||
Comment[nl]=Muziekclient van YouTube
|
||||
Comment[pa]=ਯੂਟਿਊਬ ਸੰਗੀਤ ਕਲਾਈਂਟ
|
||||
Comment[pl]=Program do YouTube Music
|
||||
Comment[pt]=Cliente do YouTube Music
|
||||
Comment[pt_BR]=Cliente YouTube Music
|
||||
Comment[ro]=Client de muzică pentru YouTube
|
||||
Comment[sk]=Hudobný klient YouTube
|
||||
Comment[sl]=Glasbeni odjemalec Youtube
|
||||
Comment[sv]=YouTube-musikprogram
|
||||
Comment[tr]=YouTube Müzik istemcisi
|
||||
Comment[uk]=Музичний клієнт YouTube
|
||||
Comment[x-test]=xxYouTube Music clientxx
|
||||
Comment[zh_CN]=YouTube Music 客户端
|
||||
Version=1.0
|
||||
Exec=audiotube
|
||||
Icon=org.kde.audiotube
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "org.kde.audiotube",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "5.15",
|
||||
"runtime-version": "5.15-21.08",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"command": "audiotube",
|
||||
"tags": ["nightly"],
|
||||
@@ -21,14 +21,14 @@
|
||||
],
|
||||
|
||||
"modules": [
|
||||
"flatpak/python3-youtube_dl.json",
|
||||
"flatpak/python3-yt-dlp.json",
|
||||
"flatpak/python3-ytmusicapi.json",
|
||||
{
|
||||
"name": "pybind11",
|
||||
"config-opts": ["-DPYBIND11_FINDPYTHON=ON", "-DPYBIND11_TEST=OFF"],
|
||||
"buildsystem": "cmake-ninja",
|
||||
"builddir": true,
|
||||
"sources": [ { "type": "git", "url": "https://github.com/pybind/pybind11", "tag": "v2.6.2" } ]
|
||||
"sources": [ { "type": "git", "url": "https://github.com/pybind/pybind11", "tag": "v2.9.1" } ]
|
||||
},
|
||||
{
|
||||
"name": "org.kde.audiotube",
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Zayed Al-Saidi <[email protected]>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-01-21 22:52+0400\n"
|
||||
"Last-Translator: Zayed Al-Saidi <[email protected]>\n"
|
||||
"Language-Team: ar\n"
|
||||
"Language: ar\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
|
||||
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
|
||||
"X-Generator: Lokalize 21.07.70\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "زايد السعيدي"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "شغّل"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "شغل التالي"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "أضف إلى قائمة التّشغيل"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr "تشغيل الفيديو غير مدعوم حتى الآن. هل تريد تشغيل صوت فقط من \"%1\"؟"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "الألبومات"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "فردي"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "أغاني"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "الفيديوهات"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "حسنًا"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "ألغِ"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "تيوب الصوتي"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "أزل المسار"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "امسح"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "اخلط"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "ألبث"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "لا يوجد وسائط تعمل"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "وسع"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "الفنّانون"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "قوائم التّشغيل"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "مجهول"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "شغل التالي"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "راديو"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "اعثر على موسيقى على موسيقى يوتيوب"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "ابحث"
|
||||
@@ -0,0 +1,155 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Kheyyam Gojayev <[email protected]>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-04-22 18:44+0400\n"
|
||||
"Last-Translator: Kheyyam Gojayev <[email protected]>\n"
|
||||
"Language-Team: Azerbaijani <[email protected]>\n"
|
||||
"Language: az\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 21.12.3\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Xəyyam Qocayev"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Başladın"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Sonrakını oxudun"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Mahnı siyahısına əlavə edin"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Video göstərilməsi hələlik dəstəklənmir. Siz yalnız \"%1\" videosunun səsini "
|
||||
"oynatmaq istəyirsiniz?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albomlar"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Musiqilər"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Mahnılar"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videolar"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OLDU"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "İmtina"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Mahnını silin"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Təmizləyin"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Qarışıq"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Fasilə"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Media faylı oynadılmır"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Açmaq"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "İfaçılar"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Mahnı siyahıları"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Bilinməyən"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Sonrakını başladın"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Musiqini YouTube Musiqi-də tapın"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Axtarın"
|
||||
@@ -0,0 +1,160 @@
|
||||
# Translation of audiotube.po to Catalan
|
||||
# Copyright (C) 2021 This_file_is_part_of_KDE
|
||||
# This file is distributed under the license LGPL version 2.1 or
|
||||
# version 3 or later versions approved by the membership of KDE e.V.
|
||||
#
|
||||
# Antoni Bella Pérez <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-05 16:03+0100\n"
|
||||
"Last-Translator: Antoni Bella Pérez <[email protected]>\n"
|
||||
"Language-Team: Catalan <[email protected]>\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.11.90\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Antoni Bella"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Reprodueix"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Reprodueix el següent"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Afegeix a la llista de reproducció"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Encara no s'admet la reproducció de vídeo. Voleu reproduir només l'àudio de "
|
||||
"«%1»?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Àlbums"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Individuals"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Cançons"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Vídeos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "D'acord"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancel·la"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Elimina la pista"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Neteja"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Barreja"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "No s'està reproduint cap suport"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expandeix"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistes"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Llistes de reproducció"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Desconeguda"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Reprodueix el següent"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Ràdio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Cerca a la Música de Youtube"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Cerca"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Reprodueix només l'àudio"
|
||||
@@ -0,0 +1,157 @@
|
||||
# Translation of audiotube.po to Catalan (Valencian)
|
||||
# Copyright (C) 2021 This_file_is_part_of_KDE
|
||||
# This file is distributed under the license LGPL version 2.1 or
|
||||
# version 3 or later versions approved by the membership of KDE e.V.
|
||||
#
|
||||
# Antoni Bella Pérez <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-05 16:03+0100\n"
|
||||
"Last-Translator: Antoni Bella Pérez <[email protected]>\n"
|
||||
"Language-Team: Catalan <[email protected]>\n"
|
||||
"Language: ca@valencia\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.11.90\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Antoni Bella"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Reprodueix"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Reprodueix el següent"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Afig a la llista de reproducció"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Encara no s'admet la reproducció de vídeo. Voleu reproduir només l'àudio de "
|
||||
"«%1»?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Àlbums"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Individuals"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Cançons"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Vídeos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "D'acord"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancel·la"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Elimina la pista"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Neteja"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Barreja"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "No s'està reproduint cap suport"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expandeix"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistes"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Llistes de reproducció"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Desconeguda"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Reprodueix el següent"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Ràdio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Busca a la Música de Youtube"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Busca"
|
||||
@@ -0,0 +1,155 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# Vit Pelcak <[email protected]>, 2021, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-01-11 17:36+0100\n"
|
||||
"Last-Translator: Vit Pelcak <[email protected]>\n"
|
||||
"Language-Team: Czech <[email protected]>\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||
"X-Generator: Lokalize 21.12.0\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Vít Pelčák"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Přehrát"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Přehrát následující"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Přidat do seznamu skladeb"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Přehrávání videa ještě není podporováno. Chcete z \"%1\" přehrávat pouze "
|
||||
"zvuk?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Alba"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Samotné"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Písně"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videa"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Zrušit"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Odstranit skladbu"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Vyprázdnit"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Zamíchat"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pozastavit"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Nepřehrává se žádné médium"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Rozvinout"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Umělci"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Seznamy skladeb"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Neznámý"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Přehrát následující"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Rádio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Najít hudbu na Hudba YouTube"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Hledat"
|
||||
@@ -0,0 +1,159 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# Burkhard Lück <[email protected]>, 2021.
|
||||
# Frederik Schwarzer <[email protected]>, 2021, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-02-20 10:37+0100\n"
|
||||
"Last-Translator: Frederik Schwarzer <[email protected]>\n"
|
||||
"Language-Team: German <[email protected]>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.08.0\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Deutsches KDE-Übersetzerteam"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Wiedergabe"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Nächste Wiedergabe"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Zur Wiedergabeliste hinzufügen"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Die Video-Wiedergabe wird noch nicht unterstützt. Möchten Sie nur die "
|
||||
"Audiospur von „%1“ abspielen?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Alben"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singles"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Songs"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Stück entfernen"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Löschen"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Zufällig"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pause"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Es werden keine Medien wiedergegeben"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Erweitern"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Interpreten"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Wiedergabelisten"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Unbekannt"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Nächste Wiedergabe"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Musik auf YouTube suchen"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Suchen"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Nur Audio abspielen"
|
||||
@@ -0,0 +1,158 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Steve Allewell <[email protected]>, 2021, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-01-01 15:21+0000\n"
|
||||
"Last-Translator: Steve Allewell <[email protected]>\n"
|
||||
"Language-Team: British English <[email protected]>\n"
|
||||
"Language: en_GB\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.12.0\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Steve Allewell"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Play"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Play Next"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Add to Playlist"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albums"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singles"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Songs"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancel"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Remove Track"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Clear"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Shuffle"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pause"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "No media playing"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expand"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artists"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Playlists"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Unknown"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Play next"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Find music on YouTube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Search"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Play only Audio"
|
||||
@@ -0,0 +1,160 @@
|
||||
# Spanish translations for audiotube.po package.
|
||||
# Copyright (C) 2021 This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Automatically generated, 2021.
|
||||
# Eloy Cuadra <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-06 00:36+0100\n"
|
||||
"Last-Translator: Eloy Cuadra <[email protected]>\n"
|
||||
"Language-Team: Spanish <[email protected]>\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.11.90\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Eloy Cuadra"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Reproducir"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Reproducir siguiente"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Añadir a la lista de reproducción"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"La reproducción de vídeo aún no está permitida. ¿Desea reproducir solo el "
|
||||
"sonido de «%1»?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Álbumes"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Sencillos"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Canciones"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Vídeos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "Aceptar"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Eliminar pista"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Borrar todo"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Desordenar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pausar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Ningún medio en reproducción"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expandir"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistas"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Listas de reproducción"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Desconocido"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Reproducir siguiente"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Encuentre música en YouTube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Buscar"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Reproducir solo el sonido"
|
||||
@@ -0,0 +1,161 @@
|
||||
# Translation for audiotube.po to Euskara/Basque (eu).
|
||||
# Copyright (C) 2021-2022, This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# KDE euskaratzeko proiektuko arduraduna <[email protected]>.
|
||||
#
|
||||
# Translators:
|
||||
# Iñigo Salvador Azurmendi <[email protected]>, 2021, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-02-21 18:58+0100\n"
|
||||
"Last-Translator: Iñigo Salvador Azurmendi <[email protected]>\n"
|
||||
"Language-Team: Basque <[email protected]>\n"
|
||||
"Language: eu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 21.12.2\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Iñigo Salvador Azurmendi"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Jo"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Jo hurrengoa"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Gehitu jotze-zerrendara"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Oraindik ez dago bideoa atzera jotzeko euskarririk. «%1»(r)en audioa "
|
||||
"bakarrik jo nahi duzu?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albumak"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Banakoa"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Abestiak"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Bideoak"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "Ados"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Utzi"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Kendu pista"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Garbitu"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Nahastu"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Eten"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Ez da euskarririk jotzen ari"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Zabaldu"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistak"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Jotze-zerrendak"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Ezezaguna"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Jo hurrengoa"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Irratia"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Aurkitu musika «Youtube Music»en"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Bilatu"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Audio bakarrik jo"
|
||||
@@ -0,0 +1,157 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# Tommi Nieminen <[email protected]>, 2021, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-01-11 22:47+0200\n"
|
||||
"Last-Translator: Tommi Nieminen <[email protected]>\n"
|
||||
"Language-Team: Finnish <[email protected]>\n"
|
||||
"Language: fi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 20.04.2\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Tommi Nieminen"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Toista"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Toista seuraava"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Lisää soittolistaan"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Videotoistoa ei vielä tueta. Haluatko toistaa videosta ”%1” vain äänen?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albumit"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singlet"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Kappaleet"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videot"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Peru"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Poista raita"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Tyhjennä"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Sekoita"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Tauko"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Mitään ei toisteta"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Laajenna"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistit"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Soittolistat"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Tuntematon"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Toista seuraava"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Etsi musiikkia Youtube Musicista"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Etsi"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Toista vain ääni"
|
||||
@@ -0,0 +1,155 @@
|
||||
# Xavier Besnard <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-06 10:18+0100\n"
|
||||
"Last-Translator: Xavier Besnard <[email protected]>\n"
|
||||
"Language-Team: French <[email protected]>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Generator: Lokalize 21.11.90\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Xavier Besnard"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Lire"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Lire le suivant"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Ajouter à la liste de lecture"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"La lecture de vidéos n'est pas encore prise en charge. Voulez-vous vraiment "
|
||||
"lire uniquement l'audio de « %1 » ?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albums"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Titres uniques"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Chansons"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Vidéos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "Ok"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Supprimer une piste"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Effacer"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Mélanger"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pause"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Aucun média en lecture"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Développer"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistes"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Listes de lecture"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Inconnu"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Lire le suivant"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Rechercher de la musique sur « YouTube Music »"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Rechercher"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Ne lire que l'audio"
|
||||
@@ -0,0 +1,157 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Raghavendra Kamath <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-09-17 20:09+0530\n"
|
||||
"Last-Translator: Raghavendra Kamath <[email protected]>\n"
|
||||
"Language-Team: kde-hindi\n"
|
||||
"Language: hi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
"X-Generator: Lokalize 21.08.1\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "राघवेंद्र कामत"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "बजाएँ"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "अगला बजाएँ"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "गीत-सूची में जोड़ें"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"वीडियो चलाना अभी तक समर्थित नहीं है। क्या आप केवल \"%1\" का ध्वनी चलाना चाहते हैं?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "एल्बम्स"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "एक गीत"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "गीत"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "वीडियो"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "ओडियो-ट्यूब"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "गाना हटाएँ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "साफ करें"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "फेंटें"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "रोकें"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "कोई मीडिया नहीं बजा रहा है"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "विस्तृत करें"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "कलाकार"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "गीत-सूचीयाँ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "अज्ञात"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "अगला बजाएँ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "रेडियो"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "यूट्यूब संगीत पर संगीत ढूंढें"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "खोजें"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "केवल ध्वनी चलाएँ"
|
||||
@@ -0,0 +1,158 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# Vincenzo Reale <[email protected]>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-06 02:46+0100\n"
|
||||
"Last-Translator: Vincenzo Reale <[email protected]>\n"
|
||||
"Language-Team: Italian <[email protected]>\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 21.08.3\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Vincenzo Reale"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Riproduci"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Riproduci successivo"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Aggiungi alla scaletta"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"La riproduzione dei video non è ancora supportata. Vuoi riprodurre solo "
|
||||
"l'audio di «%1»?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Album"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singoli"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Brani"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Video"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Annulla"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Rimuovi traccia"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Pulisci"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Mescola"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Nessun supporto in riproduzione"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Espandi"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artisti"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Scalette"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Sconosciuto"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Riproduci successivo"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Trova musica su Youtube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Cerca"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Riproduci solo l'audio"
|
||||
@@ -0,0 +1,156 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# Shinjo Park <[email protected]>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-08 00:45+0100\n"
|
||||
"Last-Translator: Shinjo Park <[email protected]>\n"
|
||||
"Language-Team: Korean <[email protected]>\n"
|
||||
"Language: ko\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Lokalize 21.08.1\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "박신조"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "재생"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "다음 재생"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "재생 목록에 추가"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr "비디오 재생은 지원하지 않습니다. \"%1\"의 오디오만 재생하시겠습니까?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "앨범"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "싱글"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "곡"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "비디오"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "확인"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "취소"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "트랙 삭제"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "지우기"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "무순서 재생"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "일시 정지"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "재생 중인 미디어 없음"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "확장"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "아티스트"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "재생 목록"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "알 수 없음"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "다음 재생"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "라디오"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "YouTube Music에서 음악 찾기"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "검색"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "오디오만 재생"
|
||||
@@ -0,0 +1,158 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Freek de Kruijf <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-05 16:48+0100\n"
|
||||
"Last-Translator: Freek de Kruijf <[email protected]>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.08.3\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Freek de Kruijf - 2021"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Afspelen"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Volgende afspelen"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Aan afspeellijst toevoegen"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Afspelen van video wordt nog niet ondersteund. Wilt u alleen het geluid van "
|
||||
"\"%1\" afspelen?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albums"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Enkelvoudige"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Songs"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Video's"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Annuleren"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Track verwijderen"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Wissen"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Willekeurig afspelen"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pauzeren"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Er speelt geen medium"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Uitbreiden"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artiesten"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Afspeellijsten"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Onbekend"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Volgende afspelen"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Muziek zoeken op YouTube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Zoeken"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Alleen geluid afspelen"
|
||||
@@ -0,0 +1,156 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# A S Alam <[email protected]>, 2021, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-01-01 09:11-0800\n"
|
||||
"Last-Translator: A S Alam <[email protected]>\n"
|
||||
"Language-Team: Punjabi <[email protected]>\n"
|
||||
"Language: pa\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 21.04.3\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "ਅਮਨਪਰੀਤ ਸਿੰਘ ਆਲਮ ੨੦੨੧"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "alam yellow @ gmail.com"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "ਚਲਾਓ"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "ਅਗਲਾ ਚਲਾਓ"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "ਪਲੇਅਲਿਸਟ ਵਿੱਚ ਜੋੜੋ"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr "ਵਿਡੀਓ ਪਲੇਅਬੈਕ ਹਾਲੇ ਸਹਾਇਕ ਨਹੀਂ ਹੈ। ਕੀ ਤੁਸੀਂ \"%1\" ਦਾ ਆਡੀਓ ਹੀ ਚਲਾਉਣਾ ਚਾਹੋਗੇ?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "ਐਲਬਮਾਂ"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "ਇਕੱਲੇ"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "ਗੀਤ"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "ਵਿਡੀਓ"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "ਠੀਕ ਹੈ"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "ਰੱਦ ਕਰੋ"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "ਆਡੀਓ-ਟਿਊਬ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "ਟਰੈਕ ਨੂੰ ਹਟਾਓ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "ਮਿਟਾਓ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "ਰਲਵੇਂ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "ਵਿਰਾਮ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "ਕੋਈ ਮੀਡੀਆ ਨਹੀਂ ਚੱਲਦਾ"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "ਫੈਲਾਓ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "ਕਲਾਕਾਰ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "ਪਲੇਅਲਿਸਟਾਂ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "ਅਣਪਛਾਤਾ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "ਅਗਲਾ ਚਲਾਓ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "ਰੇਡੀਓ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "ਯੂਟਿਊਬ ਸੰਗੀਤ ਉੱਤੇ ਸੰਗੀਤ ਲੱਭੋ"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "ਖੋਜੋ"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "ਸਿਰਫ਼ ਆਡੀਓ ਹੀ ਚਲਾਓ"
|
||||
@@ -0,0 +1,160 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Łukasz Wojniłowicz <[email protected]>, 2021.
|
||||
# Ignacy Kajdan <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-30 12:38+0100\n"
|
||||
"Last-Translator: Łukasz Wojniłowicz <[email protected]>\n"
|
||||
"Language-Team: Polish <[email protected]>\n"
|
||||
"Language: pl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||
"|| n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Lokalize 22.03.70\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Łukasz Wojniłowicz, Ignacy Kajdan"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected], [email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Odtwórz"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Odtwórz następny"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Dodaj do listy odtwarzania"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Odtwarzanie wideo nie jest jeszcze obsługiwane. Czy odtworzyć tylko dźwięk z "
|
||||
"„%1”?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albumy"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Single"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Piosenki"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Filmy"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Anuluj"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Usuń utwór"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Wyczyść"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Wymieszaj"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Wstrzymaj"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Nic nie jest odtwarzane"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Rozwiń"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Wykonawcy"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Listy odtwarzania"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Nieznany"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Odtwórz następny"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Znajdź muzykę w serwisie YouTube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Szukaj"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Odtwórz tylko dźwięk"
|
||||
@@ -0,0 +1,160 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-09-04 18:29+0100\n"
|
||||
"Last-Translator: José Nuno Coelho Pires <[email protected]>\n"
|
||||
"Language-Team: Portuguese <[email protected]>\n"
|
||||
"Language: pt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-POFile-SpellExtra: Singles AudioTube YouTube Music\n"
|
||||
"X-POFile-IgnoreConsistency: Singles\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "José Nuno Pires"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Reproduzir"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Reproduzir o Seguinte"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Adicionar à Lista de Reprodução"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"A reprodução de vídeos ainda não é suportada. Deseja reproduzir apenas o "
|
||||
"áudio de \"%1\"?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Álbuns"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "'Singles'"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Músicas"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Vídeos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Remover a Faixa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Limpar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Baralhar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Nada em reprodução"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expandir"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistas"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Listas de Reprodução"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Desconhecido"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Reproduzir o seguinte"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Rádio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Procurar música no YouTube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Procurar"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Reproduzir só o Áudio"
|
||||
@@ -0,0 +1,159 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Luiz Fernando Ranghetti <[email protected]>, 2021.
|
||||
# Thiago Masato Costa Sueto <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-09 10:13-0300\n"
|
||||
"Last-Translator: Luiz Fernando Ranghetti <[email protected]>\n"
|
||||
"Language-Team: Portuguese <[email protected]>\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Generator: Lokalize 20.04.2\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Luiz Fernando Ranghetti"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Reproduzir"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Reproduzir próxima"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Adicionar à lista de reprodução"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"A reprodução de vídeos ainda não é suportada. Deseja reproduzir apenas o "
|
||||
"áudio de \"%1\"?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Álbuns"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singles"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Músicas"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Vídeos"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Remover faixa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Limpar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Embaralhar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pausar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Nenhuma mídia em reprodução"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expandir"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artistas"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Listas de músicas"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Desconhecido"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Reproduzir próxima"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Rádio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Encontre músicas no YouTube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Pesquisar"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Reproduzir apenas áudio"
|
||||
@@ -0,0 +1,154 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Alexander Yavorsky <[email protected]>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-05-10 21:39+0300\n"
|
||||
"Last-Translator: Alexander Yavorsky <[email protected]>\n"
|
||||
"Language-Team: Russian <[email protected]>\n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n"
|
||||
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Lokalize 21.08.3\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Александр Яворский"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Воспроизвести"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Воспроизвести следующий"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Альбомы"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Видеозаписи"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "ОК"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Отмена"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Удалить дорожку"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Очистить"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Перемешать"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Приостановить"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Радио"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Поиск"
|
||||
@@ -0,0 +1,152 @@
|
||||
# translation of audiotube.po Slovak
|
||||
# Roman Paholik <[email protected]>, 2021, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-04-07 18:01+0200\n"
|
||||
"Last-Translator: Roman Paholik <[email protected]>\n"
|
||||
"Language-Team: Slovak <[email protected]>\n"
|
||||
"Language: sk\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Lokalize 21.12.3\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Roman Paholík"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Prehrať"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, fuzzy, kde-format
|
||||
#| msgid "Play"
|
||||
msgid "Play Next"
|
||||
msgstr "Prehrať"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Pridať do zoznamu skladieb"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albumy"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Samotné"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videá"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Zrušiť"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Vyčistiť"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Zamiešať"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Pozastaviť"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Neprehráva sa žiadne médium"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Rozvinúť"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Interpreti"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Zoznamy skladieb"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Neznáme"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Rádio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr ""
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Hľadať"
|
||||
@@ -0,0 +1,157 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Matjaž Jeran <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-09 13:26+0100\n"
|
||||
"Last-Translator: Matjaž Jeran <[email protected]>\n"
|
||||
"Language-Team: Slovenian <[email protected]>\n"
|
||||
"Language: sl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Lokalize 21.04.3\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
|
||||
"%100==4 ? 3 : 0);\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Matjaž Jeran"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Predvajaj"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Predvajaj naslednjo"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Dodaj v seznam predvajanja"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr "Video playback še ni podprt. Ali želite predvajati samo zvok \"%1\"?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albumi"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singli"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Glasba"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videposnetki"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "V redu"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Prekliči"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Odstrani sled"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Očisti"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Premešaj"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Premor"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Niče se ne predvaja"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Razširi"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Avtorji"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Seznami predvajanja"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Neznano"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Predvajaj naslednjo"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Najdi glasbo na Youtube Music"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Išči"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Predvajaj samo zvok"
|
||||
@@ -0,0 +1,156 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Stefan Asserhäll <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-05 11:41+0100\n"
|
||||
"Last-Translator: Stefan Asserhäll <[email protected]>\n"
|
||||
"Language-Team: Swedish <[email protected]>\n"
|
||||
"Language: sv\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 20.08.1\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Stefan Asserhäll"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Spela"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Spela nästa"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Lägg till i spellista"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr "Videouppspelning stöds inte ännu. Vill du bara spela ljudet på \"%1\"?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Album"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Singlar"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Låtar"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videor"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "Ok"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Avbryt"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Ta bort spår"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Rensa"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Blanda"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Paus"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Inga media spelar"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Expandera"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Artister"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Spellistor"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Okänd"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Spela nästa"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radio"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Sök efter musik på YouTube musik"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Sök"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Spela bara ljud"
|
||||
@@ -0,0 +1,155 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
#
|
||||
# Emir SARI <[email protected]>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-04-15 14:41+0300\n"
|
||||
"Last-Translator: Emir SARI <[email protected]>\n"
|
||||
"Language-Team: Turkish <[email protected]>\n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Generator: Lokalize 21.12.3\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Emir SARI"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Çal"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Sonrakini Çal"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Çalma Listesine Ekle"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Video oynatımı henüz desteklenmiyor. \"%1\" videosunun yalnızca sesinin "
|
||||
"çalınmasını ister misiniz?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Albümler"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Tekliler"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Şarkılar"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Videolar"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "Tamam"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "İptal"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Parçayı Kaldır"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Temizle"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Karıştır"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Duraklat"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Ortam çalmıyor"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Genişlet"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Sanatçılar"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Çalma Listeleri"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Bilinmiyor"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Sonrakini çal"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Radyo"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "YouTube Müzik'te müzik bul"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Ara"
|
||||
@@ -0,0 +1,159 @@
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Yuri Chornoivan <[email protected]>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-05 08:42+0200\n"
|
||||
"Last-Translator: Yuri Chornoivan <[email protected]>\n"
|
||||
"Language-Team: Ukrainian <[email protected]>\n"
|
||||
"Language: uk\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n"
|
||||
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Lokalize 20.12.0\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Юрій Чорноіван"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "Відтворити"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "Відтворити наступну"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "Додати до списку відтворення"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"Підтримки відтворення відео ще не передбачено. Хочете, щоб було відтворено "
|
||||
"лише звукову частину «%1»?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "Альбоми"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "Одинарні"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "Пісні"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "Відео"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "Гаразд"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Скасувати"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "Вилучити композицію"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "Спорожнити"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "Перемішати"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "Призупинити"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "Відтворення не відбувається"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "Розгорнути"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "Виконавці"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "Списки відтворення"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "Невідомий"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "Відтворити наступну"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "Радіо"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "Шукати музику на сайті «Музика Youtube»"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "Пошук"
|
||||
|
||||
#~ msgid "Play only Audio"
|
||||
#~ msgstr "Відтворити лише звук"
|
||||
@@ -0,0 +1,155 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the audiotube package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: audiotube\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-05 01:46+0000\n"
|
||||
"Last-Translator: transxx.py program <[email protected]>\n"
|
||||
"Language-Team: KDE Test Language <[email protected]>\n"
|
||||
"Language: x-test\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "xxYour namesxx"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "xxYour emailsxx"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "xxPlayxx"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "xxPlay Nextxx"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "xxAdd to Playlistxx"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr ""
|
||||
"xxVideo playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?xx"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "xxAlbumsxx"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "xxSinglesxx"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "xxSongsxx"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "xxVideosxx"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "xxOKxx"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "xxCancelxx"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "xxAudioTubexx"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "xxRemove Trackxx"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "xxClearxx"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "xxShufflexx"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "xxPausexx"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "xxNo media playingxx"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "xxExpandxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "xxArtistsxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "xxPlaylistsxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "xxUnknownxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "xxPlay nextxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "xxRadioxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "xxFind music on YouTube Musicxx"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "xxSearchxx"
|
||||
@@ -0,0 +1,153 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: kdeorg\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2021-12-05 00:45+0000\n"
|
||||
"PO-Revision-Date: 2022-05-15 15:46\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Chinese Simplified\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: kdeorg\n"
|
||||
"X-Crowdin-Project-ID: 269464\n"
|
||||
"X-Crowdin-Language: zh-CN\n"
|
||||
"X-Crowdin-File: /kf5-trunk/messages/audiotube/audiotube.pot\n"
|
||||
"X-Crowdin-File-ID: 25474\n"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "NAME OF TRANSLATORS"
|
||||
msgid "Your names"
|
||||
msgstr "Qi Binye, Tyson Tan"
|
||||
|
||||
#, kde-format
|
||||
msgctxt "EMAIL OF TRANSLATORS"
|
||||
msgid "Your emails"
|
||||
msgstr "[email protected], [email protected]"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:19 contents/ui/PlayerFooter.qml:173
|
||||
#: contents/ui/PlaylistPage.qml:19
|
||||
#, kde-format
|
||||
msgid "Play"
|
||||
msgstr "播放"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:61 contents/ui/ArtistPage.qml:101
|
||||
#: contents/ui/PlaylistPage.qml:67
|
||||
#, kde-format
|
||||
msgid "Play Next"
|
||||
msgstr "播放下一首"
|
||||
|
||||
#: contents/ui/AlbumPage.qml:66 contents/ui/ArtistPage.qml:107
|
||||
#: contents/ui/PlaylistPage.qml:72 contents/ui/SearchPage.qml:123
|
||||
#, kde-format
|
||||
msgid "Add to Playlist"
|
||||
msgstr "添加到播放列表"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:39 contents/ui/SearchPage.qml:67
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Video playback is not supported yet. Do you want to play only the audio of "
|
||||
"\"%1\"?"
|
||||
msgstr "视频播放尚未被支持。您想要只播放“%1”中的音频吗?"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:55 contents/ui/SearchPage.qml:25
|
||||
#, kde-format
|
||||
msgid "Albums"
|
||||
msgstr "专辑"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:57
|
||||
#, kde-format
|
||||
msgid "Singles"
|
||||
msgstr "单曲"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:59 contents/ui/SearchPage.qml:31
|
||||
#, kde-format
|
||||
msgid "Songs"
|
||||
msgstr "曲目"
|
||||
|
||||
#: contents/ui/ArtistPage.qml:61 contents/ui/SearchPage.qml:33
|
||||
#, kde-format
|
||||
msgid "Videos"
|
||||
msgstr "视频"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:16
|
||||
#, kde-format
|
||||
msgid "OK"
|
||||
msgstr "确定"
|
||||
|
||||
#: contents/ui/ConfirmationMessage.qml:21
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "取消"
|
||||
|
||||
#: contents/ui/main.qml:51
|
||||
#, kde-format
|
||||
msgid "AudioTube"
|
||||
msgstr "AudioTube"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:106
|
||||
#, kde-format
|
||||
msgid "Remove Track"
|
||||
msgstr "移除曲目"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:123
|
||||
#, kde-format
|
||||
msgid "Clear"
|
||||
msgstr "清除"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:128 contents/ui/PlaylistPage.qml:26
|
||||
#, kde-format
|
||||
msgid "Shuffle"
|
||||
msgstr "随机播放"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:173
|
||||
#, kde-format
|
||||
msgid "Pause"
|
||||
msgstr "暂停"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:203
|
||||
#, kde-format
|
||||
msgid "No media playing"
|
||||
msgstr "没有正在播放的媒体"
|
||||
|
||||
#: contents/ui/PlayerFooter.qml:247
|
||||
#, kde-format
|
||||
msgid "Expand"
|
||||
msgstr "展开"
|
||||
|
||||
#: contents/ui/SearchPage.qml:27
|
||||
#, kde-format
|
||||
msgid "Artists"
|
||||
msgstr "艺人"
|
||||
|
||||
#: contents/ui/SearchPage.qml:29
|
||||
#, kde-format
|
||||
msgid "Playlists"
|
||||
msgstr "播放列表"
|
||||
|
||||
#: contents/ui/SearchPage.qml:36
|
||||
#, kde-format
|
||||
msgid "Unknown"
|
||||
msgstr "未知"
|
||||
|
||||
#: contents/ui/SearchPage.qml:117
|
||||
#, kde-format
|
||||
msgid "Play next"
|
||||
msgstr "播放下一首"
|
||||
|
||||
#: contents/ui/SearchPage.qml:129
|
||||
#, kde-format
|
||||
msgid "Radio"
|
||||
msgstr "电台"
|
||||
|
||||
#: contents/ui/SearchPage.qml:147
|
||||
#, kde-format
|
||||
msgid "Find music on YouTube Music"
|
||||
msgstr "查找 YouTube Music 中的音乐"
|
||||
|
||||
#: contents/ui/SearchPage.qml:150
|
||||
#, kde-format
|
||||
msgid "Search"
|
||||
msgstr "搜索"
|
||||
+7
-2
@@ -1,2 +1,7 @@
|
||||
ytmusicapi==0.16.0
|
||||
youtube_dl
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
# SPDX-FileCopyrightText: 2021 Kuba Prussak <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
ytmusicapi==0.21.0
|
||||
yt-dlp
|
||||
+19
-3
@@ -1,4 +1,6 @@
|
||||
add_subdirectory(mpris2)
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
add_library(ytm STATIC
|
||||
ytmusic.cpp
|
||||
@@ -8,6 +10,14 @@ target_link_libraries(ytm PUBLIC pybind11::embed)
|
||||
target_include_directories(ytm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(ytm PRIVATE -DRANDALL_WAS_HERE)
|
||||
|
||||
add_library(asyncdatabase STATIC
|
||||
asyncdatabase.cpp
|
||||
asyncdatabase_p.h
|
||||
)
|
||||
|
||||
target_include_directories(asyncdatabase PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(asyncdatabase PUBLIC Qt5::Sql)
|
||||
|
||||
add_subdirectory(example)
|
||||
|
||||
add_executable(audiotube
|
||||
@@ -21,7 +31,10 @@ add_executable(audiotube
|
||||
playlistmodel.cpp
|
||||
playlistutils.cpp
|
||||
errorhandler.cpp
|
||||
playerutils.cpp
|
||||
abstractytmusicmodel.cpp
|
||||
multiiterableview.h
|
||||
library.cpp
|
||||
resources.qrc
|
||||
)
|
||||
|
||||
@@ -33,9 +46,12 @@ target_link_libraries(audiotube
|
||||
Qt5::QuickControls2
|
||||
Qt5::Svg
|
||||
KF5::I18n
|
||||
KF5::CoreAddons
|
||||
KF5::Crash
|
||||
ytm
|
||||
mpris2
|
||||
asyncdatabase
|
||||
)
|
||||
target_compile_definitions(audiotube PRIVATE -DQT_NO_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING)
|
||||
|
||||
target_compile_definitions(audiotube PRIVATE -DQT_NO_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_QML_DEBUG)
|
||||
|
||||
install(TARGETS audiotube ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
@@ -0,0 +1,4 @@
|
||||
#! /usr/bin/env bash
|
||||
# SPDX-FileCopyrightText: 2020 Tobias Fella <[email protected]>
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
$XGETTEXT `find -name \*.cpp -o -name \*.qml -o -name \*.js` -o $podir/audiotube.pot
|
||||
@@ -0,0 +1,27 @@
|
||||
// SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#include "abstractytmusicmodel.h"
|
||||
|
||||
#include "asyncytmusic.h"
|
||||
|
||||
|
||||
AbstractYTMusicModel::AbstractYTMusicModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool AbstractYTMusicModel::loading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void AbstractYTMusicModel::setLoading(bool loading)
|
||||
{
|
||||
if (m_loading == loading)
|
||||
return;
|
||||
|
||||
m_loading = loading;
|
||||
Q_EMIT loadingChanged();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
///
|
||||
/// Base class for all models that work with data from the AsyncYTMusic class.
|
||||
/// It provides a loading property, that is automatically set to false if a query fails.
|
||||
///
|
||||
class AbstractYTMusicModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
|
||||
public:
|
||||
explicit AbstractYTMusicModel(QObject *parent = nullptr);
|
||||
|
||||
bool loading() const;
|
||||
void setLoading(bool loading);
|
||||
Q_SIGNAL void loadingChanged();
|
||||
|
||||
private:
|
||||
bool m_loading = false;
|
||||
};
|
||||
|
||||
+17
-33
@@ -7,25 +7,26 @@
|
||||
#include <QDebug>
|
||||
|
||||
AlbumModel::AlbumModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
: AbstractYTMusicModel(parent)
|
||||
{
|
||||
connect(this, &AlbumModel::browseIdChanged, this, [=] {
|
||||
connect(this, &AlbumModel::browseIdChanged, this, [this] {
|
||||
setLoading(true);
|
||||
YTMusicThread::instance()->fetchAlbum(m_browseId);
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::fetchAlbumFinished, this, [=](const album::Album &album) {
|
||||
setLoading(false);
|
||||
auto future = YTMusicThread::instance()->fetchAlbum(m_browseId);
|
||||
connectFuture(future, this, [=, this](const album::Album &album) {
|
||||
setLoading(false);
|
||||
|
||||
beginResetModel();
|
||||
m_album = album;
|
||||
endResetModel();
|
||||
std::sort(m_album.thumbnails.begin(), m_album.thumbnails.end());
|
||||
beginResetModel();
|
||||
m_album = album;
|
||||
endResetModel();
|
||||
std::sort(m_album.thumbnails.begin(), m_album.thumbnails.end());
|
||||
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT thumbnailUrlChanged();
|
||||
Q_EMIT playlistIdChanged();
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT thumbnailUrlChanged();
|
||||
Q_EMIT playlistIdChanged();
|
||||
});
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [=] {
|
||||
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [=, this] {
|
||||
setLoading(false);
|
||||
});
|
||||
}
|
||||
@@ -43,12 +44,7 @@ QVariant AlbumModel::data(const QModelIndex &index, int role) const
|
||||
case VideoId:
|
||||
return QString::fromStdString(m_album.tracks[index.row()].video_id.value_or(std::string()));
|
||||
case Artists:
|
||||
return QVariant::fromValue(std::vector<meta::Artist> {
|
||||
{
|
||||
m_album.tracks[index.row()].artists,
|
||||
std::nullopt
|
||||
}
|
||||
});
|
||||
return QVariant::fromValue(m_album.tracks[index.row()].artists);
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
@@ -81,18 +77,6 @@ QString AlbumModel::title() const
|
||||
return QString::fromStdString(m_album.title);
|
||||
}
|
||||
|
||||
bool AlbumModel::loading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void AlbumModel::setLoading(bool loading)
|
||||
{
|
||||
m_loading = loading;
|
||||
Q_EMIT loadingChanged();
|
||||
}
|
||||
|
||||
|
||||
QUrl AlbumModel::thumbnailUrl() const
|
||||
{
|
||||
if (m_album.thumbnails.empty()) {
|
||||
@@ -104,5 +88,5 @@ QUrl AlbumModel::thumbnailUrl() const
|
||||
|
||||
QString AlbumModel::playlistId() const
|
||||
{
|
||||
return QString::fromStdString(m_album.playlist_id);
|
||||
return QString::fromStdString(m_album.audio_playlist_id);
|
||||
}
|
||||
+2
-7
@@ -8,15 +8,15 @@
|
||||
#include <QUrl>
|
||||
|
||||
#include "asyncytmusic.h"
|
||||
#include "abstractytmusicmodel.h"
|
||||
|
||||
class AlbumModel : public QAbstractListModel
|
||||
class AlbumModel : public AbstractYTMusicModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString browseId READ browseId WRITE setBrowseId NOTIFY browseIdChanged REQUIRED)
|
||||
|
||||
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
|
||||
Q_PROPERTY(QUrl thumbnailUrl READ thumbnailUrl NOTIFY thumbnailUrlChanged)
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
Q_PROPERTY(QString playlistId READ playlistId NOTIFY playlistIdChanged)
|
||||
|
||||
public:
|
||||
@@ -39,10 +39,6 @@ public:
|
||||
QString title() const;
|
||||
Q_SIGNAL void titleChanged();
|
||||
|
||||
bool loading() const;
|
||||
void setLoading(bool loading);
|
||||
Q_SIGNAL void loadingChanged();
|
||||
|
||||
QUrl thumbnailUrl() const;
|
||||
Q_SIGNAL void thumbnailUrlChanged();
|
||||
|
||||
@@ -51,7 +47,6 @@ public:
|
||||
|
||||
private:
|
||||
QString m_browseId;
|
||||
bool m_loading = false;
|
||||
|
||||
album::Album m_album;
|
||||
};
|
||||
+42
-55
@@ -7,49 +7,49 @@
|
||||
#include <asyncytmusic.h>
|
||||
|
||||
ArtistModel::ArtistModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
: AbstractYTMusicModel(parent)
|
||||
, m_view(albums, singles, songs, videos)
|
||||
{
|
||||
connect(this, &ArtistModel::channelIdChanged, this, [=] {
|
||||
connect(this, &ArtistModel::channelIdChanged, this, [this] {
|
||||
if (m_channelId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
|
||||
YTMusicThread::instance()->fetchArtist(m_channelId);
|
||||
auto future = YTMusicThread::instance()->fetchArtist(m_channelId);
|
||||
connectFuture(future, this, [=, this](const artist::Artist &artist) {
|
||||
setLoading(false);
|
||||
|
||||
beginResetModel();
|
||||
m_artist = artist;
|
||||
std::sort(m_artist.thumbnails.begin(), m_artist.thumbnails.end());
|
||||
|
||||
albums = m_artist.albums ? m_artist.albums->results : std::vector<artist::Artist::Album>();
|
||||
singles = m_artist.singles ? m_artist.singles->results : std::vector<artist::Artist::Single>();
|
||||
songs = m_artist.songs ? m_artist.songs->results : std::vector<artist::Artist::Song>();
|
||||
videos = m_artist.videos ? m_artist.videos->results : std::vector<artist::Artist::Video>();
|
||||
|
||||
// std::span can't know if the data pointer underneath it was changed, so re-create
|
||||
m_view = MultiIterableView(albums, singles, songs, videos);
|
||||
endResetModel();
|
||||
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT thumbnailUrlChanged();
|
||||
});
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::fetchArtistFinished, this, [=](const artist::Artist &artist) {
|
||||
setLoading(false);
|
||||
|
||||
beginResetModel();
|
||||
m_artist = artist;
|
||||
std::sort(m_artist.thumbnails.begin(), m_artist.thumbnails.end());
|
||||
m_view = std::optional(MultiIterableView(m_artist.albums->results,
|
||||
m_artist.singles->results,
|
||||
m_artist.songs->results,
|
||||
m_artist.videos->results));
|
||||
endResetModel();
|
||||
|
||||
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT thumbnailUrlChanged();
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [=] {
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [this] {
|
||||
setLoading(false);
|
||||
});
|
||||
}
|
||||
|
||||
int ArtistModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
return parent.isValid() ? 0 : m_view ? int(m_view->size()) : 0;
|
||||
return parent.isValid() ? 0 : m_view.size();
|
||||
}
|
||||
|
||||
QVariant ArtistModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!m_view) {
|
||||
return {};
|
||||
}
|
||||
|
||||
switch (role) {
|
||||
case Title:
|
||||
return QString::fromStdString(std::visit([&](auto&& item) {
|
||||
@@ -65,7 +65,7 @@ QVariant ArtistModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
}, m_view.value()[index.row()]));
|
||||
}, m_view[index.row()]));
|
||||
case Type:
|
||||
return std::visit([&](auto&& item) {
|
||||
using T = std::decay_t<decltype(item)>;
|
||||
@@ -80,7 +80,7 @@ QVariant ArtistModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
}, m_view.value()[index.row()]);
|
||||
}, m_view[index.row()]);
|
||||
case Artists:
|
||||
return QVariant::fromValue(std::vector<meta::Artist> {
|
||||
{
|
||||
@@ -102,7 +102,7 @@ QVariant ArtistModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
}, m_view.value()[index.row()]);
|
||||
}, m_view[index.row()]);
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
@@ -145,33 +145,20 @@ QUrl ArtistModel::thumbnailUrl() const
|
||||
return QUrl(QString::fromStdString(m_artist.thumbnails.back().url));
|
||||
}
|
||||
|
||||
bool ArtistModel::loading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void ArtistModel::setLoading(bool loading)
|
||||
{
|
||||
m_loading = loading;
|
||||
Q_EMIT loadingChanged();
|
||||
}
|
||||
|
||||
void ArtistModel::triggerItem(int row)
|
||||
{
|
||||
if (m_view) {
|
||||
std::visit([&](auto&& item) {
|
||||
using T = std::decay_t<decltype(item)>;
|
||||
if constexpr(std::is_same_v<T, artist::Artist::Album>) {
|
||||
Q_EMIT openAlbum(QString::fromStdString(item.browse_id));
|
||||
} else if constexpr(std::is_same_v<T, artist::Artist::Single>) {
|
||||
Q_EMIT openAlbum(QString::fromStdString(item.browse_id));
|
||||
} else if constexpr(std::is_same_v<T, artist::Artist::Song>) {
|
||||
Q_EMIT openSong(QString::fromStdString(item.video_id));
|
||||
} else if constexpr(std::is_same_v<T, artist::Artist::Video>) {
|
||||
Q_EMIT openVideo(QString::fromStdString(item.video_id));
|
||||
} else {
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
}, m_view.value()[row]);
|
||||
}
|
||||
std::visit([&](auto&& item) {
|
||||
using T = std::decay_t<decltype(item)>;
|
||||
if constexpr(std::is_same_v<T, artist::Artist::Album>) {
|
||||
Q_EMIT openAlbum(QString::fromStdString(item.browse_id));
|
||||
} else if constexpr(std::is_same_v<T, artist::Artist::Single>) {
|
||||
Q_EMIT openAlbum(QString::fromStdString(item.browse_id));
|
||||
} else if constexpr(std::is_same_v<T, artist::Artist::Song>) {
|
||||
Q_EMIT openSong(QString::fromStdString(item.video_id));
|
||||
} else if constexpr(std::is_same_v<T, artist::Artist::Video>) {
|
||||
Q_EMIT openVideo(QString::fromStdString(item.video_id), QString::fromStdString(item.title));
|
||||
} else {
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
}, m_view[row]);
|
||||
}
|
||||
+14
-11
@@ -10,9 +10,12 @@
|
||||
#include <optional>
|
||||
|
||||
#include <ytmusic.h>
|
||||
#include "multiiterableview.h"
|
||||
|
||||
class ArtistModel : public QAbstractListModel
|
||||
#include "multiiterableview.h"
|
||||
#include "abstractytmusicmodel.h"
|
||||
|
||||
|
||||
class ArtistModel : public AbstractYTMusicModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -20,7 +23,6 @@ class ArtistModel : public QAbstractListModel
|
||||
|
||||
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
|
||||
Q_PROPERTY(QUrl thumbnailUrl READ thumbnailUrl NOTIFY thumbnailUrlChanged)
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
|
||||
public:
|
||||
enum Type {
|
||||
@@ -54,22 +56,23 @@ public:
|
||||
QUrl thumbnailUrl() const;
|
||||
Q_SIGNAL void thumbnailUrlChanged();
|
||||
|
||||
bool loading() const;
|
||||
void setLoading(bool loading);
|
||||
Q_SIGNAL void loadingChanged();
|
||||
|
||||
Q_INVOKABLE void triggerItem(int row);
|
||||
|
||||
Q_SIGNAL void openAlbum(const QString &browseId);
|
||||
Q_SIGNAL void openSong(const QString &videoId);
|
||||
Q_SIGNAL void openVideo(const QString &videoId);
|
||||
Q_SIGNAL void openVideo(const QString &videoId, const QString &title);
|
||||
|
||||
private:
|
||||
QString m_channelId;
|
||||
bool m_loading = false;
|
||||
|
||||
artist::Artist m_artist;
|
||||
std::optional<MultiIterableView<
|
||||
|
||||
std::vector<artist::Artist::Album> albums;
|
||||
std::vector<artist::Artist::Single> singles;
|
||||
std::vector<artist::Artist::Song> songs;
|
||||
std::vector<artist::Artist::Video> videos;
|
||||
|
||||
MultiIterableView<
|
||||
artist::Artist::Album, artist::Artist::Single, artist::Artist::Song, artist::Artist::Video
|
||||
>> m_view;
|
||||
> m_view;
|
||||
};
|
||||
@@ -0,0 +1,272 @@
|
||||
// SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#include "asyncdatabase.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
#include <QUrl>
|
||||
#include <QStringBuilder>
|
||||
#include <QVariant>
|
||||
#include <QSqlResult>
|
||||
#include <QSqlError>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
#define SCHAMA_MIGRATIONS_TABLE "__qt_schema_migrations"
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(asyncdatabase)
|
||||
Q_LOGGING_CATEGORY(asyncdatabase, "asyncdatabase")
|
||||
|
||||
namespace asyncdatabase_private {
|
||||
|
||||
// migrations
|
||||
void createInternalTable(QSqlDatabase &database) {
|
||||
QSqlQuery query(QStringLiteral("create table if not exists " SCHAMA_MIGRATIONS_TABLE " ("
|
||||
"version Text primary key not null, "
|
||||
"run_on timestamp not null default current_timestamp)"), database);
|
||||
if (!query.exec()) {
|
||||
printSqlError(query);
|
||||
}
|
||||
}
|
||||
|
||||
void markMigrationRun(QSqlDatabase &database, const QString &name) {
|
||||
qCDebug(asyncdatabase) << "Marking migration" << name << "as done.";
|
||||
|
||||
QSqlQuery query(database);
|
||||
if (!query.prepare(QStringLiteral("insert into " SCHAMA_MIGRATIONS_TABLE " (version) values (:name)"))) {
|
||||
printSqlError(query);
|
||||
}
|
||||
query.bindValue(QStringLiteral(":name"), QVariant(name));
|
||||
if (!query.exec()) {
|
||||
printSqlError(query);
|
||||
}
|
||||
}
|
||||
|
||||
bool checkMigrationAlreadyRun(QSqlDatabase &database, const QString &name) {
|
||||
qCDebug(asyncdatabase) << "Checking whether migration" << name << "is already applied";
|
||||
QSqlQuery query(database);
|
||||
query.prepare(QStringLiteral("select count(*) from " SCHAMA_MIGRATIONS_TABLE " where version = :name"));
|
||||
query.bindValue(QStringLiteral(":name"), QVariant(name));
|
||||
query.exec();
|
||||
|
||||
query.next();
|
||||
int count = query.value(0).toInt();
|
||||
bool isApplied = count > 0;
|
||||
if (isApplied) {
|
||||
qCDebug(asyncdatabase) << "… yes";
|
||||
} else {
|
||||
qDebug(asyncdatabase) << "… no";
|
||||
}
|
||||
return isApplied;
|
||||
}
|
||||
|
||||
void runDatabaseMigrations(QSqlDatabase &database, const QString &migrationDirectory)
|
||||
{
|
||||
createInternalTable(database);
|
||||
|
||||
QDir dir(migrationDirectory);
|
||||
auto entries = dir.entryList(QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDir::SortFlag::Name);
|
||||
|
||||
for (const auto &entry : entries) {
|
||||
QDir subdir(entry);
|
||||
if (!checkMigrationAlreadyRun(database, subdir.dirName())) {
|
||||
QFile file(migrationDirectory % QDir::separator() % entry % QDir::separator() % "up.sql");
|
||||
if (!file.open(QFile::ReadOnly)) {
|
||||
qCDebug(asyncdatabase) << "Failed to open migration file" << file.fileName();
|
||||
}
|
||||
qCDebug(asyncdatabase) << "Running migration" << subdir.dirName();
|
||||
|
||||
// Hackish
|
||||
const auto statements = file.readAll().split(';');
|
||||
|
||||
bool migrationSuccessful = true;
|
||||
for (const QByteArray &statement : statements) {
|
||||
const auto trimmedStatement = statement.trimmed();
|
||||
QSqlQuery query(database);
|
||||
|
||||
if (!trimmedStatement.isEmpty()) {
|
||||
qCDebug(asyncdatabase) << "Running" << trimmedStatement;
|
||||
if (!query.prepare(trimmedStatement)) {
|
||||
printSqlError(query);
|
||||
} else {
|
||||
bool success = query.exec();
|
||||
migrationSuccessful &= success;
|
||||
if (!success) {
|
||||
printSqlError(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (migrationSuccessful) {
|
||||
markMigrationRun(database, subdir.dirName());
|
||||
}
|
||||
}
|
||||
}
|
||||
qCDebug(asyncdatabase) << "Migrations finished";
|
||||
}
|
||||
|
||||
// Internal asynchronous database class
|
||||
QFuture<void> AsyncSqlDatabase::establishConnection(const DatabaseConfiguration &configuration)
|
||||
{
|
||||
return runAsync<void>([=, this] {
|
||||
m_database = std::make_unique<QSqlDatabase>(QSqlDatabase::addDatabase(configuration.type()));
|
||||
if (configuration.databaseName()) {
|
||||
m_database->setDatabaseName(*configuration.databaseName());
|
||||
}
|
||||
if (configuration.hostName()) {
|
||||
m_database->setHostName(*configuration.hostName());
|
||||
}
|
||||
if (configuration.userName()) {
|
||||
m_database->setUserName(*configuration.userName());
|
||||
}
|
||||
if (configuration.password()) {
|
||||
m_database->setPassword(*configuration.password());
|
||||
}
|
||||
|
||||
m_database->open();
|
||||
});
|
||||
}
|
||||
|
||||
AsyncSqlDatabase::AsyncSqlDatabase()
|
||||
: QObject()
|
||||
, m_database(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
Row AsyncSqlDatabase::retrieveRow(const QSqlQuery &query) {
|
||||
Row row;
|
||||
int i = 0;
|
||||
|
||||
while (true) {
|
||||
if (query.isValid()) {
|
||||
QVariant value = query.value(i);
|
||||
if (value.isValid()) {
|
||||
row.push_back(std::move(value));
|
||||
i++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
Rows AsyncSqlDatabase::retrieveRows(QSqlQuery &query)
|
||||
{
|
||||
Rows rows;
|
||||
while (query.next()) {
|
||||
rows.push_back(retrieveRow(query));
|
||||
}
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
std::optional<Row> AsyncSqlDatabase::retrieveOptionalRow(QSqlQuery &query)
|
||||
{
|
||||
query.next();
|
||||
|
||||
if (query.isValid()) {
|
||||
return retrieveRow(query);
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
AsyncSqlDatabase::~AsyncSqlDatabase() = default;
|
||||
|
||||
void printSqlError(const QSqlQuery &query)
|
||||
{
|
||||
qCDebug(asyncdatabase) << "SQL error:" << query.lastError().text();
|
||||
}
|
||||
|
||||
QSqlQuery prepareQuery(const QSqlDatabase &database, const QString &sqlQuery)
|
||||
{
|
||||
qCDebug(asyncdatabase) << "Running" << sqlQuery;
|
||||
QSqlQuery query(database);
|
||||
if (!query.prepare(sqlQuery)) {
|
||||
printSqlError(query);
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct DatabaseConfigurationPrivate : public QSharedData {
|
||||
QString type;
|
||||
std::optional<QString> hostName;
|
||||
std::optional<QString> databaseName;
|
||||
std::optional<QString> userName;
|
||||
std::optional<QString> password;
|
||||
};
|
||||
|
||||
DatabaseConfiguration::DatabaseConfiguration() : d(new DatabaseConfigurationPrivate)
|
||||
{}
|
||||
|
||||
DatabaseConfiguration::~DatabaseConfiguration() = default;
|
||||
DatabaseConfiguration::DatabaseConfiguration(const DatabaseConfiguration &) = default;
|
||||
|
||||
void DatabaseConfiguration::setType(const QString &type) {
|
||||
d->type = type;
|
||||
}
|
||||
|
||||
const QString &DatabaseConfiguration::type() const {
|
||||
return d->type;
|
||||
}
|
||||
|
||||
void DatabaseConfiguration::setHostName(const QString &hostName) {
|
||||
d->hostName = hostName;
|
||||
}
|
||||
|
||||
const std::optional<QString> &DatabaseConfiguration::hostName() const {
|
||||
return d->hostName;
|
||||
}
|
||||
|
||||
void DatabaseConfiguration::setDatabaseName(const QString &databaseName) {
|
||||
d->databaseName = databaseName;
|
||||
}
|
||||
|
||||
const std::optional<QString> &DatabaseConfiguration::databaseName() const {
|
||||
return d->databaseName;
|
||||
}
|
||||
|
||||
void DatabaseConfiguration::setUserName(const QString &userName) {
|
||||
d->userName = userName;
|
||||
}
|
||||
|
||||
const std::optional<QString> &DatabaseConfiguration::userName() const {
|
||||
return d->userName;
|
||||
}
|
||||
|
||||
void DatabaseConfiguration::setPassword(const QString &password) {
|
||||
d->password = password;
|
||||
}
|
||||
|
||||
const std::optional<QString> &DatabaseConfiguration::password() const {
|
||||
return d->password;
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<ThreadedDatabase> ThreadedDatabase::establishConnection(DatabaseConfiguration config) {
|
||||
auto threadedDb = std::make_unique<ThreadedDatabase>();
|
||||
threadedDb->setObjectName(QStringLiteral("database thread"));
|
||||
threadedDb->m_db->moveToThread(&*threadedDb);
|
||||
threadedDb->start();
|
||||
threadedDb->m_db->establishConnection(config);
|
||||
return threadedDb;
|
||||
}
|
||||
|
||||
ThreadedDatabase::ThreadedDatabase()
|
||||
: QThread()
|
||||
, m_db(std::make_unique<asyncdatabase_private::AsyncSqlDatabase>())
|
||||
{
|
||||
}
|
||||
|
||||
ThreadedDatabase::~ThreadedDatabase()
|
||||
{
|
||||
quit();
|
||||
wait();
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
// SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#pragma once
|
||||
|
||||
class QUrl;
|
||||
class QSqlDatabase;
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
#include <QSqlQuery>
|
||||
#include <QDebug>
|
||||
#include <QThread>
|
||||
#include <QSharedDataPointer>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "asyncdatabase_p.h"
|
||||
|
||||
using Row = std::vector<QVariant>;
|
||||
using Rows = std::vector<Row>;
|
||||
|
||||
struct DatabaseConfigurationPrivate;
|
||||
|
||||
///
|
||||
/// Options for connecting to a database
|
||||
///
|
||||
class DatabaseConfiguration {
|
||||
public:
|
||||
DatabaseConfiguration();
|
||||
DatabaseConfiguration(const DatabaseConfiguration &);
|
||||
~DatabaseConfiguration();
|
||||
|
||||
/// Set the name of the database driver, for example DATABASE_TYPE_SQLITE or a custom string.
|
||||
void setType(const QString &type);
|
||||
const QString &type() const;
|
||||
|
||||
/// Set the hostname
|
||||
void setHostName(const QString &hostName);
|
||||
const std::optional<QString> &hostName() const;
|
||||
|
||||
/// Set the name of the database (path of the file for SQLite)
|
||||
void setDatabaseName(const QString &databaseName);
|
||||
const std::optional<QString> &databaseName() const;
|
||||
|
||||
/// Set user name
|
||||
void setUserName(const QString &userName);
|
||||
const std::optional<QString> &userName() const;
|
||||
|
||||
/// Set password
|
||||
void setPassword(const QString &password);
|
||||
const std::optional<QString> &password() const;
|
||||
|
||||
private:
|
||||
QSharedDataPointer<DatabaseConfigurationPrivate> d;
|
||||
};
|
||||
|
||||
///
|
||||
/// The SQLite database driver
|
||||
///
|
||||
const QString DATABASE_TYPE_SQLITE = QStringLiteral("QSQLITE");
|
||||
|
||||
///
|
||||
/// Parse the row into a tuple of the given types.
|
||||
/// The types need to be deserializable from QVariant.
|
||||
///
|
||||
template <typename ...RowTypes>
|
||||
auto parseRow(const Row &row) -> std::tuple<RowTypes...>
|
||||
{
|
||||
auto tuple = std::tuple<RowTypes...>();
|
||||
int i = 0;
|
||||
asyncdatabase_private::iterate_tuple(tuple, [&](auto &elem) {
|
||||
elem = row.at(i).value<std::decay_t<decltype(elem)>>();
|
||||
i++;
|
||||
});
|
||||
return tuple;
|
||||
}
|
||||
|
||||
///
|
||||
/// Parse the rows into a list of tuples of the given types.
|
||||
/// The types need to be deserializable from QVariant.
|
||||
///
|
||||
template <typename ...RowTypes>
|
||||
auto parseRows(const Rows &rows) -> std::vector<std::tuple<RowTypes...>> {
|
||||
std::vector<std::tuple<RowTypes...>> parsedRows;
|
||||
parsedRows.reserve(rows.size());
|
||||
for (const auto &row : rows) {
|
||||
parsedRows.push_back(parseRow<RowTypes...>(row));
|
||||
}
|
||||
|
||||
return parsedRows;
|
||||
}
|
||||
|
||||
class ThreadedDatabase : public QThread {
|
||||
public:
|
||||
///
|
||||
/// \brief Connect to a database
|
||||
/// \param configuration of the database connection
|
||||
/// \return
|
||||
///
|
||||
static std::unique_ptr<ThreadedDatabase> establishConnection(DatabaseConfiguration config);
|
||||
|
||||
///
|
||||
/// \brief Execute an SQL query on the database, ignoring the result.
|
||||
/// \param SQL query string to execute
|
||||
/// \param Parameters to bind to the placeholders in the SQL Query
|
||||
/// \return
|
||||
///
|
||||
template <typename ...Args>
|
||||
auto execute(const QString &sqlQuery, Args... args) -> QFuture<void> {
|
||||
return m_db->execute(sqlQuery, args...);
|
||||
}
|
||||
|
||||
///
|
||||
/// Run database migrations in the given directory.
|
||||
/// The directory needs to contain a subdirectory for each migration.
|
||||
/// The subdirectories need to be named so that when sorted alphabetically the migrations will be run in the correct order.
|
||||
/// Each subdirectory needs to contain a file named up.sql.
|
||||
///
|
||||
/// \param Directory which contains the migrations.
|
||||
/// \return
|
||||
///
|
||||
auto runMigrations(const QString &migrationDirectory) -> QFuture<void> {
|
||||
return m_db->runMigrations(migrationDirectory);
|
||||
}
|
||||
|
||||
///
|
||||
/// \brief Execute an SQL query on the database, retrieving the result.
|
||||
/// \param SQL Query to execute
|
||||
/// \param parameters to bind to the placeholders in the SQL query.
|
||||
/// \return Future of a list of lists of variants.
|
||||
///
|
||||
template <typename ...Args>
|
||||
auto getResults(const QString &sqlQuery, Args... args) -> QFuture<Rows> {
|
||||
return m_db->getResults(sqlQuery, args...);
|
||||
}
|
||||
|
||||
///
|
||||
/// \brief Like getResults, but for retrieving just one row.
|
||||
///
|
||||
template <typename ...Args>
|
||||
auto getResult(const QString &sqlQuery, Args... args) -> QFuture<std::optional<Row>> {
|
||||
return m_db->getResult(sqlQuery, args...);
|
||||
}
|
||||
|
||||
ThreadedDatabase();
|
||||
~ThreadedDatabase();
|
||||
|
||||
private:
|
||||
std::unique_ptr<asyncdatabase_private::AsyncSqlDatabase> m_db;
|
||||
};
|
||||
@@ -0,0 +1,149 @@
|
||||
// SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <optional>
|
||||
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlDatabase>
|
||||
#include <QThread>
|
||||
|
||||
class DatabaseConfiguration;
|
||||
|
||||
namespace asyncdatabase_private {
|
||||
|
||||
// Helpers
|
||||
template <typename Tuple, typename Func, std::size_t i>
|
||||
inline constexpr void iterate_impl(Tuple &tup, Func fun)
|
||||
{
|
||||
if constexpr(i >= std::tuple_size_v<std::decay_t<decltype(tup)>>) {
|
||||
return;
|
||||
} else {
|
||||
fun(std::get<i>(tup));
|
||||
return asyncdatabase_private::iterate_impl<Tuple, Func, i + 1>(tup, fun);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Tuple, typename Func>
|
||||
inline constexpr void iterate_tuple(Tuple &tup, Func fun)
|
||||
{
|
||||
asyncdatabase_private::iterate_impl<Tuple, Func, 0>(tup, fun);
|
||||
}
|
||||
|
||||
template <typename T, typename QObjectDerivedType, typename Function>
|
||||
void connectFuture(const QFuture<T> &future, QObjectDerivedType *self, const Function &fun) {
|
||||
auto watcher = std::make_shared<QFutureWatcher<T>>();
|
||||
watcher->setFuture(future);
|
||||
QObject::connect(watcher.get(), &QFutureWatcherBase::finished, self, [self, watcher, fun, future] {
|
||||
if constexpr (std::is_same_v<void, T>) {
|
||||
if constexpr (std::is_member_function_pointer_v<Function>) {
|
||||
fun->*(self);
|
||||
} else {
|
||||
fun();
|
||||
}
|
||||
} else if (future.resultCount() > 0) {
|
||||
if constexpr (std::is_member_function_pointer_v<Function>) {
|
||||
(self->*fun)(watcher->result());
|
||||
} else {
|
||||
fun(watcher->result());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
using Row = std::vector<QVariant>;
|
||||
using Rows = std::vector<Row>;
|
||||
|
||||
void runDatabaseMigrations(QSqlDatabase &database, const QString &migrationDirectory);
|
||||
|
||||
void printSqlError(const QSqlQuery &query);
|
||||
|
||||
QSqlQuery prepareQuery(const QSqlDatabase &database, const QString &sqlQuery);
|
||||
|
||||
class AsyncSqlDatabase : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QFuture<void> establishConnection(const DatabaseConfiguration &configuration);
|
||||
|
||||
template <typename ...Args>
|
||||
auto getResults(const QString &sqlQuery, Args... args) -> QFuture<Rows> {
|
||||
return runAsync<Rows>([=, this] {
|
||||
auto query = executeQuery(sqlQuery, args...);
|
||||
return retrieveRows(query);
|
||||
});
|
||||
}
|
||||
|
||||
template <typename ...Args>
|
||||
auto getResult(const QString &sqlQuery, Args... args) -> QFuture<std::optional<Row>> {
|
||||
return runAsync<std::optional<Row>>([=, this] {
|
||||
auto query = executeQuery(sqlQuery, args...);
|
||||
return retrieveOptionalRow(query);
|
||||
});
|
||||
}
|
||||
|
||||
template <typename ...Args>
|
||||
auto execute(const QString &sqlQuery, Args... args) -> QFuture<void> {
|
||||
return runAsync<void>([=, this] {
|
||||
executeQuery(sqlQuery, args...);
|
||||
});
|
||||
}
|
||||
|
||||
auto runMigrations(const QString &migrationDirectory) -> QFuture<void> {
|
||||
return runAsync<void>([=, this] {
|
||||
runDatabaseMigrations(*m_database, migrationDirectory);
|
||||
});
|
||||
}
|
||||
|
||||
AsyncSqlDatabase();
|
||||
~AsyncSqlDatabase();
|
||||
|
||||
private:
|
||||
template <typename ...Args>
|
||||
QSqlQuery executeQuery(const QString &sqlQuery, Args... args) {
|
||||
auto query = prepareQuery(*m_database, sqlQuery);
|
||||
auto argsTuple = std::make_tuple<Args...>(std::move(args)...);
|
||||
int i = 0;
|
||||
asyncdatabase_private::iterate_tuple(argsTuple, [&](auto &arg) {
|
||||
query.bindValue(i, arg);
|
||||
i++;
|
||||
});
|
||||
|
||||
if (!query.exec()) {
|
||||
printSqlError(query);
|
||||
}
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
template <typename T, typename Functor>
|
||||
QFuture<T> runAsync(Functor func) {
|
||||
auto interface = std::make_shared<QFutureInterface<T>>();
|
||||
QMetaObject::invokeMethod(this, [interface, func] {
|
||||
if constexpr (!std::is_same_v<T, void>) {
|
||||
auto result = func();
|
||||
interface->reportResult(result);
|
||||
} else {
|
||||
func();
|
||||
}
|
||||
|
||||
interface->reportFinished();
|
||||
});
|
||||
|
||||
return interface->future();
|
||||
}
|
||||
|
||||
Row retrieveRow(const QSqlQuery &query);
|
||||
Rows retrieveRows(QSqlQuery &query);
|
||||
std::optional<Row> retrieveOptionalRow(QSqlQuery &query);
|
||||
|
||||
std::unique_ptr<QSqlDatabase> m_database;
|
||||
};
|
||||
|
||||
}
|
||||
+50
-101
@@ -6,6 +6,9 @@
|
||||
|
||||
#include <QThread>
|
||||
#include <QDebug>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QFutureInterface>
|
||||
|
||||
#include <pybind11/embed.h>
|
||||
|
||||
@@ -13,10 +16,21 @@
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
#include <ranges>
|
||||
#include <type_traits>
|
||||
#include <memory>
|
||||
|
||||
template <typename R, typename T, typename OP>
|
||||
std::optional<R> map_optional(const std::optional<T> &optional, OP op) {
|
||||
if (optional.has_value()) {
|
||||
return op(optional.value());
|
||||
if constexpr (std::is_member_function_pointer<OP>::value) {
|
||||
return (&optional.value()->*op)();
|
||||
} else {
|
||||
return op(optional.value());
|
||||
}
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
@@ -37,15 +51,6 @@ AsyncYTMusic::AsyncYTMusic(QObject *parent)
|
||||
qRegisterMetaType<std::vector<meta::Artist>>();
|
||||
qRegisterMetaType<meta::Artist>();
|
||||
|
||||
connect(this, &AsyncYTMusic::startSearch, this, &AsyncYTMusic::internalSearch);
|
||||
connect(this, &AsyncYTMusic::startFetchArtist, this, &AsyncYTMusic::internalFetchArtist);
|
||||
connect(this, &AsyncYTMusic::startFetchAlbum, this, &AsyncYTMusic::internalFetchAlbum);
|
||||
connect(this, &AsyncYTMusic::startFetchSong, this, &AsyncYTMusic::internalFetchSong);
|
||||
connect(this, &AsyncYTMusic::startFetchPlaylist, this, &AsyncYTMusic::internalFetchPlaylist);
|
||||
connect(this, &AsyncYTMusic::startFetchArtistAlbums, this, &AsyncYTMusic::internalFetchArtistAlbums);
|
||||
connect(this, &AsyncYTMusic::startExtractVideoInfo, this, &AsyncYTMusic::internalExtractVideoInfo);
|
||||
connect(this, &AsyncYTMusic::startFetchWatchPlaylist, this, &AsyncYTMusic::internalFetchWatchPlaylist);
|
||||
|
||||
connect(this, &AsyncYTMusic::errorOccurred, this, [](const QString &err) {
|
||||
std::cerr << qPrintable(err);
|
||||
});
|
||||
@@ -54,139 +59,83 @@ AsyncYTMusic::AsyncYTMusic(QObject *parent)
|
||||
//
|
||||
// search
|
||||
//
|
||||
void AsyncYTMusic::search(const QString &query)
|
||||
QFuture<std::vector<search::SearchResultItem>> AsyncYTMusic::search(const QString &query)
|
||||
{
|
||||
Q_EMIT startSearch(query);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalSearch(const QString &query)
|
||||
{
|
||||
try {
|
||||
Q_EMIT searchFinished(m_ytm->search(query.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<std::vector<search::SearchResultItem>>([=, this]() {
|
||||
return m_ytm->search(query.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// fetchArtist
|
||||
//
|
||||
void AsyncYTMusic::fetchArtist(const QString &channelId)
|
||||
QFuture<artist::Artist> AsyncYTMusic::fetchArtist(const QString &channelId)
|
||||
{
|
||||
Q_EMIT startFetchArtist(channelId);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalFetchArtist(const QString &channelId)
|
||||
{
|
||||
try {
|
||||
Q_EMIT fetchArtistFinished(m_ytm->get_artist(channelId.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<artist::Artist>([=, this]() {
|
||||
return m_ytm->get_artist(channelId.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// fetchAlbum
|
||||
//
|
||||
void AsyncYTMusic::fetchAlbum(const QString &browseId)
|
||||
QFuture<album::Album> AsyncYTMusic::fetchAlbum(const QString &browseId)
|
||||
{
|
||||
Q_EMIT startFetchAlbum(browseId);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalFetchAlbum(const QString &browseId)
|
||||
{
|
||||
try {
|
||||
Q_EMIT fetchAlbumFinished(m_ytm->get_album(browseId.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<album::Album>([=, this]() {
|
||||
return m_ytm->get_album(browseId.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// fetchSong
|
||||
//
|
||||
void AsyncYTMusic::fetchSong(const QString &videoId)
|
||||
QFuture<std::optional<song::Song>> AsyncYTMusic::fetchSong(const QString &videoId)
|
||||
{
|
||||
Q_EMIT startFetchSong(videoId);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalFetchSong(const QString &videoId)
|
||||
{
|
||||
try {
|
||||
Q_EMIT fetchSongFinished(m_ytm->get_song(videoId.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<std::optional<song::Song>>([=, this]() {
|
||||
return m_ytm->get_song(videoId.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// fetchPlaylist
|
||||
//
|
||||
void AsyncYTMusic::fetchPlaylist(const QString &playlistId) {
|
||||
Q_EMIT startFetchPlaylist(playlistId);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalFetchPlaylist(const QString &playlistId)
|
||||
{
|
||||
try {
|
||||
Q_EMIT fetchPlaylistFinished(m_ytm->get_playlist(playlistId.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
QFuture<playlist::Playlist> AsyncYTMusic::fetchPlaylist(const QString &playlistId) {
|
||||
return invokeAndCatchOnThread<playlist::Playlist>([=, this]() {
|
||||
return m_ytm->get_playlist(playlistId.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// fetchArtistAlbum
|
||||
//
|
||||
void AsyncYTMusic::fetchArtistAlbums(const QString &channelId, const QString ¶ms)
|
||||
QFuture<std::vector<artist::Artist::Album>> AsyncYTMusic::fetchArtistAlbums(const QString &channelId, const QString ¶ms)
|
||||
{
|
||||
Q_EMIT startFetchArtistAlbums(channelId, params);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalFetchArtistAlbums(const QString &channelid, const QString ¶ms)
|
||||
{
|
||||
try {
|
||||
Q_EMIT fetchArtistAlbumsFinished(m_ytm->get_artist_albums(channelid.toStdString(), params.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<std::vector<artist::Artist::Album>>([=, this]() {
|
||||
return m_ytm->get_artist_albums(channelId.toStdString(), params.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// extractVideoInfo
|
||||
//
|
||||
void AsyncYTMusic::extractVideoInfo(const QString &videoId)
|
||||
QFuture<video_info::VideoInfo> AsyncYTMusic::extractVideoInfo(const QString &videoId)
|
||||
{
|
||||
Q_EMIT startExtractVideoInfo(videoId);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalExtractVideoInfo(const QString &videoId)
|
||||
{
|
||||
try {
|
||||
Q_EMIT extractVideoInfoFinished(m_ytm->extract_video_info(videoId.toStdString()));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<video_info::VideoInfo>([=, this]() {
|
||||
return m_ytm->extract_video_info(videoId.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// fetchWatchPlaylist
|
||||
//
|
||||
void AsyncYTMusic::fetchWatchPlaylist(const std::optional<QString> &videoId, const std::optional<QString> &playlistId)
|
||||
QFuture<watch::Playlist> AsyncYTMusic::fetchWatchPlaylist(const std::optional<QString> &videoId, const std::optional<QString> &playlistId)
|
||||
{
|
||||
Q_EMIT startFetchWatchPlaylist(videoId, playlistId);
|
||||
}
|
||||
|
||||
void AsyncYTMusic::internalFetchWatchPlaylist(const std::optional<QString> &videoId, const std::optional<QString> &playlistId)
|
||||
{
|
||||
try {
|
||||
Q_EMIT fetchWatchPlaylistFinished(m_ytm->get_watch_playlist(
|
||||
map_optional<std::string>(videoId, [](const QString &value) { return value.toStdString(); }),
|
||||
map_optional<std::string>(playlistId, [](const QString &value) { return value.toStdString(); })
|
||||
));
|
||||
} catch (const py::error_already_set &err) {
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
return invokeAndCatchOnThread<watch::Playlist>([=, this]() {
|
||||
return m_ytm->get_watch_playlist(
|
||||
map_optional<std::string>(videoId, &QString::toStdString),
|
||||
map_optional<std::string>(playlistId, &QString::toStdString)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
YTMusicThread &YTMusicThread::instance()
|
||||
|
||||
+73
-41
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -37,6 +39,7 @@ public:
|
||||
if (!m_item) {
|
||||
m_item = std::make_unique<T>();
|
||||
}
|
||||
Q_ASSERT(m_item);
|
||||
return m_item;
|
||||
}
|
||||
|
||||
@@ -44,6 +47,50 @@ private:
|
||||
std::unique_ptr<T> m_item = nullptr;
|
||||
};
|
||||
|
||||
///
|
||||
/// Similar to QObject::connect, except that the first two arguments are replaced with a QFuture.
|
||||
///
|
||||
template <typename T, typename QObjectDerivedType, typename Function>
|
||||
void connectFuture(const QFuture<T> &future, QObjectDerivedType *self, const Function &fun) {
|
||||
auto watcher = std::make_shared<QFutureWatcher<T>>();
|
||||
watcher->setFuture(future);
|
||||
QObject::connect(watcher.get(), &QFutureWatcherBase::finished, self, [self, watcher, fun, future] {
|
||||
if constexpr (std::is_same_v<void, T>) {
|
||||
if constexpr (std::is_member_function_pointer_v<Function>) {
|
||||
(self->*fun)();
|
||||
} else {
|
||||
fun();
|
||||
}
|
||||
} else if (future.resultCount() > 0) {
|
||||
if constexpr (std::is_member_function_pointer_v<Function>) {
|
||||
(self->*fun)(watcher->result());
|
||||
} else {
|
||||
fun(watcher->result());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
///
|
||||
/// Applies a function to a the contained value of a QFuture once it finishes.
|
||||
/// @returns a QFuture that finishes once the future given as first argument finished
|
||||
///
|
||||
template <typename T, typename U, typename Func>
|
||||
QFuture<U> mapFuture(const QFuture<T> &future, Func mapFunction) {
|
||||
auto watcher = std::make_shared<QFutureWatcher<T>>();
|
||||
watcher->setFuture(future);
|
||||
|
||||
auto interface = std::make_shared<QFutureInterface<U>>();
|
||||
QObject::connect(watcher.get(), &QFutureWatcherBase::finished, watcher.get(), [interface, watcher, mapFunction] {
|
||||
auto result = watcher->result();
|
||||
auto mapped = mapFunction(std::move(result));
|
||||
interface->reportResult(mapped);
|
||||
interface->reportFinished();
|
||||
});
|
||||
|
||||
return interface->future();
|
||||
}
|
||||
|
||||
class AsyncYTMusic : public QObject
|
||||
{
|
||||
friend class YTMusicThread;
|
||||
@@ -52,30 +99,22 @@ class AsyncYTMusic : public QObject
|
||||
|
||||
public:
|
||||
// public functions need to be thread safe
|
||||
void search(const QString &query);
|
||||
Q_SIGNAL void searchFinished(std::vector<search::SearchResultItem>);
|
||||
QFuture<std::vector<search::SearchResultItem>> search(const QString &query);
|
||||
|
||||
void fetchArtist(const QString &channelId);
|
||||
Q_SIGNAL void fetchArtistFinished(artist::Artist);
|
||||
QFuture<artist::Artist> fetchArtist(const QString &channelId);
|
||||
|
||||
void fetchAlbum(const QString &browseId);
|
||||
Q_SIGNAL void fetchAlbumFinished(album::Album);
|
||||
QFuture<album::Album> fetchAlbum(const QString &browseId);
|
||||
|
||||
void fetchSong(const QString &videoId);
|
||||
Q_SIGNAL void fetchSongFinished(song::Song);
|
||||
QFuture<std::optional<song::Song> > fetchSong(const QString &videoId);
|
||||
|
||||
void fetchPlaylist(const QString &playlistId);
|
||||
Q_SIGNAL void fetchPlaylistFinished(playlist::Playlist);
|
||||
QFuture<playlist::Playlist> fetchPlaylist(const QString &playlistId);
|
||||
|
||||
void fetchArtistAlbums(const QString &channelId, const QString ¶ms);
|
||||
Q_SIGNAL void fetchArtistAlbumsFinished(std::vector<artist::Artist::Album>);
|
||||
QFuture<std::vector<artist::Artist::Album>> fetchArtistAlbums(const QString &channelId, const QString ¶ms);
|
||||
|
||||
void extractVideoInfo(const QString &videoId);
|
||||
Q_SIGNAL void extractVideoInfoFinished(video_info::VideoInfo);
|
||||
QFuture<video_info::VideoInfo> extractVideoInfo(const QString &videoId);
|
||||
|
||||
void fetchWatchPlaylist(const std::optional<QString> &videoId = std::nullopt ,
|
||||
QFuture<watch::Playlist> fetchWatchPlaylist(const std::optional<QString> &videoId = std::nullopt ,
|
||||
const std::optional<QString> &playlistId = std::nullopt);
|
||||
Q_SIGNAL void fetchWatchPlaylistFinished(watch::Playlist);
|
||||
|
||||
Q_SIGNAL void errorOccurred(const QString &error);
|
||||
|
||||
@@ -83,38 +122,31 @@ protected:
|
||||
explicit AsyncYTMusic(QObject *parent = nullptr);
|
||||
|
||||
private:
|
||||
Q_SIGNAL void startSearch(const QString &query);
|
||||
Q_SLOT void internalSearch(const QString &query);
|
||||
/// Invokes the given function on the thread of the YTMusic object, and handles exceptions that occur while invoking it.
|
||||
template <typename ReturnType>
|
||||
QFuture<ReturnType> invokeAndCatchOnThread(const std::function<ReturnType()> &fun) {
|
||||
auto interface = std::make_shared<QFutureInterface<ReturnType>>();
|
||||
QMetaObject::invokeMethod(this, [=, this]() {
|
||||
try {
|
||||
ReturnType val = fun();
|
||||
interface->reportResult(val);
|
||||
interface->reportFinished();
|
||||
} catch (const std::exception &err) {
|
||||
interface->reportFinished();
|
||||
Q_EMIT errorOccurred(QString::fromLocal8Bit(err.what()));
|
||||
}
|
||||
});
|
||||
return interface->future();
|
||||
}
|
||||
|
||||
Q_SIGNAL void startFetchArtist(const QString &channelId);
|
||||
Q_SLOT void internalFetchArtist(const QString &channelId);
|
||||
|
||||
Q_SIGNAL void startFetchAlbum(const QString &browseId);
|
||||
Q_SLOT void internalFetchAlbum(const QString &browseId);
|
||||
|
||||
Q_SIGNAL void startFetchSong(const QString &videoId);
|
||||
Q_SLOT void internalFetchSong(const QString &videoId);
|
||||
|
||||
Q_SIGNAL void startFetchPlaylist(const QString &playlistId);
|
||||
Q_SLOT void internalFetchPlaylist(const QString &playlistId);
|
||||
|
||||
Q_SIGNAL void startFetchArtistAlbums(const QString &channelid, const QString ¶ms);
|
||||
Q_SLOT void internalFetchArtistAlbums(const QString &channelid, const QString ¶ms);
|
||||
|
||||
Q_SIGNAL void startExtractVideoInfo(const QString &videoId);
|
||||
Q_SLOT void internalExtractVideoInfo(const QString &videoId);
|
||||
|
||||
Q_SIGNAL void startFetchWatchPlaylist(const std::optional<QString> &videoId, const std::optional<QString> &playlistId);
|
||||
Q_SLOT void internalFetchWatchPlaylist(const std::optional<QString> &videoId, const std::optional<QString> &playlistId);
|
||||
|
||||
// Python interpreter will be ininitalized from the thread calling the methods
|
||||
// Python interpreter will be initialized from the thread calling the methods
|
||||
Lazy<YTMusic> m_ytm;
|
||||
};
|
||||
|
||||
class YTMusicThread : private QThread {
|
||||
public:
|
||||
static YTMusicThread &instance();
|
||||
~YTMusicThread();
|
||||
~YTMusicThread() override;
|
||||
|
||||
AsyncYTMusic *operator->();
|
||||
AsyncYTMusic &get();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick 2.15
|
||||
import org.kde.kirigami 2.14 as Kirigami
|
||||
import QtQuick.Controls 2.14 as Controls
|
||||
import QtQuick.Layouts 1.3
|
||||
@@ -29,6 +29,8 @@ Kirigami.ScrollablePage {
|
||||
title: albumModel.title
|
||||
}
|
||||
|
||||
reuseItems: true
|
||||
|
||||
model: AlbumModel {
|
||||
id: albumModel
|
||||
}
|
||||
@@ -56,12 +58,12 @@ Kirigami.ScrollablePage {
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
icon.name: "go-next"
|
||||
text: i18n("Play next")
|
||||
text: i18n("Play Next")
|
||||
onTriggered: UserPlaylistModel.playNext(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
},
|
||||
Kirigami.Action {
|
||||
icon.name: "media-playlist-append"
|
||||
text: i18n("Add to playlist")
|
||||
text: i18n("Add to Playlist")
|
||||
onTriggered: UserPlaylistModel.append(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick 2.15
|
||||
import org.kde.kirigami 2.14 as Kirigami
|
||||
import QtQuick.Controls 2.14 as Controls
|
||||
import QtQuick.Layouts 1.3
|
||||
@@ -19,6 +19,9 @@ Kirigami.ScrollablePage {
|
||||
backgroundImage.source: artistModel.thumbnailUrl
|
||||
title: artistModel.title
|
||||
}
|
||||
|
||||
reuseItems: true
|
||||
|
||||
model: ArtistModel {
|
||||
id: artistModel
|
||||
|
||||
@@ -32,8 +35,16 @@ Kirigami.ScrollablePage {
|
||||
play(videoId)
|
||||
}
|
||||
|
||||
onOpenVideo: (videoId) => {
|
||||
askPlayVideoAudio(videoId)
|
||||
onOpenVideo: (videoId, title) => {
|
||||
videoPlayMessage.text = i18n("Video playback is not supported yet. Do you want to play only the audio of \"%1\"?", title)
|
||||
videoPlayMessage.visible = true
|
||||
videoPlayMessage.okAction = function() {
|
||||
play(videoId)
|
||||
videoPlayMessage.visible = false
|
||||
}
|
||||
videoPlayMessage.cancelAction = function() {
|
||||
videoPlayMessage.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
section.property: "type"
|
||||
@@ -87,13 +98,13 @@ Kirigami.ScrollablePage {
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
icon.name: "go-next"
|
||||
text: i18n("Play next")
|
||||
text: i18n("Play Next")
|
||||
visible: type === ArtistModel.Song
|
||||
onTriggered: UserPlaylistModel.playNext(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
},
|
||||
Kirigami.Action {
|
||||
icon.name: "media-playlist-append"
|
||||
text: i18n("Add to playlist")
|
||||
text: i18n("Add to Playlist")
|
||||
visible: type === ArtistModel.Song
|
||||
onTriggered: UserPlaylistModel.append(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
}
|
||||
@@ -107,4 +118,8 @@ Kirigami.ScrollablePage {
|
||||
visible: artistModel.loading
|
||||
}
|
||||
}
|
||||
|
||||
footer: ConfirmationMessage {
|
||||
id: videoPlayMessage
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// SPDX-FileCopyrightText: 2021 Dimitris Kardarakos <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.15
|
||||
import org.kde.kirigami 2.14 as Kirigami
|
||||
|
||||
Kirigami.InlineMessage {
|
||||
|
||||
property var okAction
|
||||
property var cancelAction
|
||||
|
||||
visible: false
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("OK")
|
||||
|
||||
onTriggered: okAction()
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Cancel")
|
||||
|
||||
onTriggered: cancelAction()
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 2.12 as Controls
|
||||
import QtQuick.Layouts 1.3
|
||||
import org.kde.kirigami 2.14 as Kirigami
|
||||
|
||||
import org.kde.ytmusic 1.0
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
ColumnLayout {
|
||||
Kirigami.Heading {
|
||||
text: i18n("Favourites")
|
||||
}
|
||||
Controls.ScrollView {
|
||||
Layout.fillWidth: true
|
||||
RowLayout {
|
||||
Repeater {
|
||||
Layout.fillWidth: true
|
||||
model: Library.favourites
|
||||
delegate: ColumnLayout {
|
||||
id: delegateItem
|
||||
required property string title
|
||||
required property string artist
|
||||
required property string videoId
|
||||
|
||||
Layout.fillWidth: false
|
||||
Layout.maximumWidth: 200
|
||||
Kirigami.Card {
|
||||
id: card
|
||||
Layout.preferredHeight: 200
|
||||
|
||||
onClicked: play(delegateItem.videoId)
|
||||
|
||||
ThumbnailSource {
|
||||
id: thumbnailSource
|
||||
videoId: delegateItem.videoId
|
||||
}
|
||||
|
||||
header: Image {
|
||||
sourceSize: "200x200"
|
||||
source: thumbnailSource.cachedPath
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
}
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
icon.name: "delete"
|
||||
onTriggered: Library.removeFavourite(delegateItem.videoId)
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
Controls.Label {
|
||||
Layout.maximumWidth: 200
|
||||
text: delegateItem.title
|
||||
elide: Qt.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Kirigami.Heading {
|
||||
text: i18n("Most played")
|
||||
}
|
||||
Controls.ScrollView {
|
||||
Layout.fillWidth: true
|
||||
RowLayout {
|
||||
Repeater {
|
||||
Layout.fillWidth: true
|
||||
model: Library.mostPlayed
|
||||
delegate: ColumnLayout {
|
||||
id: mpdelegateItem
|
||||
required property string title
|
||||
required property string artist
|
||||
required property string videoId
|
||||
|
||||
Layout.fillWidth: false
|
||||
Layout.maximumWidth: 200
|
||||
Kirigami.Card {
|
||||
id: mpcard
|
||||
Layout.preferredHeight: 200
|
||||
|
||||
onClicked: play(mpdelegateItem.videoId)
|
||||
|
||||
ThumbnailSource {
|
||||
id: mpthumbnailSource
|
||||
videoId: mpdelegateItem.videoId
|
||||
}
|
||||
|
||||
header: Image {
|
||||
sourceSize: "200x200"
|
||||
source: mpthumbnailSource.cachedPath
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
}
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
icon.name: "delete"
|
||||
onTriggered: Library.removeFavourite(mpdelegateItem.videoId)
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
Controls.Label {
|
||||
Layout.maximumWidth: 200
|
||||
text: mpdelegateItem.title
|
||||
elide: Qt.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+213
-166
@@ -9,225 +9,272 @@ import org.kde.kirigami 2.12 as Kirigami
|
||||
import org.kde.ytmusic 1.0
|
||||
import QtMultimedia 5.12
|
||||
|
||||
ColumnLayout {
|
||||
id: footerLayout
|
||||
|
||||
Item {
|
||||
id: footerItem
|
||||
property bool maximized: false
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: maximized ? applicationWindow().height : player.preferredHeight
|
||||
height: maximized ? applicationWindow().height : 75
|
||||
|
||||
GridLayout {
|
||||
id: playerLayout
|
||||
Rectangle {
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
||||
anchors.fill: footerLayout
|
||||
}
|
||||
|
||||
readonly property bool mobile: width > height
|
||||
|
||||
Layout.fillHeight: footerLayout.maximized
|
||||
Layout.fillWidth: true
|
||||
flow: width > height ? GridLayout.LeftToRight : GridLayout.TopToBottom
|
||||
visible: footerLayout.maximized
|
||||
ColumnLayout {
|
||||
id: footerLayout
|
||||
height: parent.height
|
||||
anchors.fill: parent
|
||||
|
||||
Item {
|
||||
GridLayout {
|
||||
id: playerLayout
|
||||
|
||||
readonly property bool mobile: width > height
|
||||
|
||||
Layout.fillHeight: footerItem.maximized
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
flow: width > height ? GridLayout.LeftToRight : GridLayout.TopToBottom
|
||||
visible: footerItem.maximized
|
||||
|
||||
source: info.thumbnail
|
||||
fillMode: Image.PreserveAspectFit
|
||||
ColumnLayout {
|
||||
Layout.preferredWidth: footerLayout.width * (playerLayout.mobile ? 1 : 0.5)
|
||||
Layout.preferredHeight: footerLayout.height * (playerLayout.mobile ? 0.5 : 1)
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: info.thumbnail
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
}
|
||||
Controls.RoundButton {
|
||||
readonly property QtObject favouriteWatcher: Library.favouriteWatcher(info.videoId)
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
icon.name: favouriteWatcher ? (favouriteWatcher.isFavourite ? "starred-symbolic" : "non-starred-symbolic") : ""
|
||||
onClicked: if (favouriteWatcher)
|
||||
favouriteWatcher.isFavourite
|
||||
? Library.removeFavourite(info.videoId)
|
||||
: Library.addFavourite(info.videoId, info.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: footerLayout.width * (playerLayout.mobile ? 1 : 0.5)
|
||||
Layout.preferredHeight: footerLayout.height * (playerLayout.mobile ? 0.5 : 1)
|
||||
|
||||
Controls.ScrollView {
|
||||
anchors.fill: parent
|
||||
|
||||
ListView {
|
||||
Controls.ScrollView {
|
||||
anchors.fill: parent
|
||||
id: playlistView
|
||||
|
||||
clip: true
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
id: playlistView
|
||||
|
||||
Controls.BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
visible: UserPlaylistModel.loading || UserPlaylistModel.loading
|
||||
}
|
||||
clip: true
|
||||
|
||||
onCountChanged: {
|
||||
if (count < 1) {
|
||||
footerLayout.maximized = false
|
||||
Controls.BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
visible: UserPlaylistModel.loading || UserPlaylistModel.loading
|
||||
}
|
||||
}
|
||||
|
||||
model: UserPlaylistModel
|
||||
|
||||
delegate: Kirigami.SwipeListItem {
|
||||
id: delegateItem
|
||||
required property string title
|
||||
required property string videoId
|
||||
required property string artists
|
||||
required property bool isCurrent
|
||||
|
||||
highlighted: isCurrent
|
||||
onClicked: UserPlaylistModel.skipTo(videoId)
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Kirigami.Heading {
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
level: 2
|
||||
text: title
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
text: artists
|
||||
onCountChanged: {
|
||||
if (count < 1) {
|
||||
footerItem.maximized = false
|
||||
}
|
||||
}
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Remove track")
|
||||
icon.name: "list-remove"
|
||||
onTriggered: UserPlaylistModel.remove(delegateItem.videoId)
|
||||
}
|
||||
]
|
||||
}
|
||||
model: UserPlaylistModel
|
||||
|
||||
header: Controls.ToolBar {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
Item {
|
||||
delegate: Kirigami.SwipeListItem {
|
||||
id: delegateItem
|
||||
required property string title
|
||||
required property string videoId
|
||||
required property string artists
|
||||
required property bool isCurrent
|
||||
|
||||
highlighted: isCurrent
|
||||
onClicked: UserPlaylistModel.skipTo(videoId)
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Kirigami.Heading {
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
level: 2
|
||||
text: title
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
text: artists
|
||||
}
|
||||
}
|
||||
|
||||
Controls.ToolButton {
|
||||
icon.name: "edit-clear-all"
|
||||
onClicked: UserPlaylistModel.clear()
|
||||
}
|
||||
Controls.ToolButton {
|
||||
icon.name: "media-playlist-shuffle"
|
||||
onClicked: UserPlaylistModel.shufflePlaylist()
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Remove Track")
|
||||
icon.name: "list-remove"
|
||||
onTriggered: UserPlaylistModel.remove(delegateItem.videoId)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
header: Controls.ToolBar {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Controls.ToolButton {
|
||||
text: i18n("Clear")
|
||||
icon.name: "edit-clear-all"
|
||||
onClicked: UserPlaylistModel.clear()
|
||||
}
|
||||
Controls.ToolButton {
|
||||
text: i18n("Shuffle")
|
||||
icon.name: "media-playlist-shuffle"
|
||||
onClicked: UserPlaylistModel.shufflePlaylist()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: player
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: !footer.maximized
|
||||
|
||||
VideoInfoExtractor {
|
||||
id: info
|
||||
|
||||
onSongChanged: audio.play()
|
||||
videoId: UserPlaylistModel.currentVideoId
|
||||
Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Audio {
|
||||
id: audio
|
||||
RowLayout {
|
||||
id: player
|
||||
|
||||
source: info.audioUrl
|
||||
onStatusChanged: {
|
||||
if (status === Audio.EndOfMedia) {
|
||||
console.log("Song ended");
|
||||
UserPlaylistModel.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: !footer.maximized
|
||||
|
||||
Controls.ToolButton {
|
||||
display: Controls.AbstractButton.IconOnly
|
||||
Layout.preferredWidth: parent.height
|
||||
Layout.fillHeight: true
|
||||
enabled: info.audioUrl != ""
|
||||
text: audio.playbackState === Audio.PlayingState ? i18n("Pause") : i18n("Play")
|
||||
visible: !info.loading
|
||||
icon.name: audio.playbackState === Audio.PlayingState ? "media-playback-pause" : "media-playback-start"
|
||||
onClicked: audio.playbackState === Audio.PlayingState ? audio.pause() : audio.play()
|
||||
}
|
||||
VideoInfoExtractor {
|
||||
id: info
|
||||
|
||||
Controls.ToolButton {
|
||||
display: Controls.AbstractButton.IconOnly
|
||||
Layout.preferredWidth: parent.height
|
||||
Layout.fillHeight: true
|
||||
enabled: UserPlaylistModel.canSkip
|
||||
visible: !info.loading
|
||||
icon.name: "media-skip-forward"
|
||||
onClicked: UserPlaylistModel.next()
|
||||
}
|
||||
|
||||
Controls.BusyIndicator {
|
||||
Layout.fillHeight: true
|
||||
visible: info.loading
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.topMargin: Kirigami.Units.smallSpacing
|
||||
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
||||
|
||||
Kirigami.Heading {
|
||||
level: 3
|
||||
Layout.fillWidth: true
|
||||
elide: Qt.ElideRight
|
||||
text: info.title ? info.title : i18n("No media playing")
|
||||
onSongChanged: audio.play()
|
||||
videoId: UserPlaylistModel.currentVideoId
|
||||
onTitleChanged: Library.addPlaybackHistoryItem(info.videoId, info.title)
|
||||
}
|
||||
|
||||
Controls.Slider {
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: audio.duration
|
||||
value: audio.position
|
||||
enabled: audio.seekable
|
||||
onMoved: {
|
||||
console.log("Value:", value);
|
||||
audio.seek(Math.floor(value));
|
||||
Audio {
|
||||
id: audio
|
||||
|
||||
source: info.audioUrl
|
||||
onStatusChanged: {
|
||||
if (status === Audio.EndOfMedia) {
|
||||
console.log("Song ended");
|
||||
UserPlaylistModel.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Controls.ToolButton {
|
||||
display: Controls.AbstractButton.IconOnly
|
||||
Layout.preferredWidth: parent.height
|
||||
Layout.fillHeight: true
|
||||
enabled: info.audioUrl != ""
|
||||
text: audio.playbackState === Audio.PlayingState ? i18n("Pause") : i18n("Play")
|
||||
visible: !info.loading
|
||||
icon.name: audio.playbackState === Audio.PlayingState ? "media-playback-pause" : "media-playback-start"
|
||||
onClicked: audio.playbackState === Audio.PlayingState ? audio.pause() : audio.play()
|
||||
}
|
||||
|
||||
Controls.ToolButton {
|
||||
display: Controls.AbstractButton.IconOnly
|
||||
Layout.preferredWidth: parent.height
|
||||
Layout.fillHeight: true
|
||||
enabled: UserPlaylistModel.canSkip
|
||||
visible: !info.loading
|
||||
icon.name: "media-skip-forward"
|
||||
onClicked: UserPlaylistModel.next()
|
||||
}
|
||||
|
||||
Controls.BusyIndicator {
|
||||
Layout.fillHeight: true
|
||||
visible: info.loading
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.topMargin: Kirigami.Units.smallSpacing
|
||||
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
||||
|
||||
Kirigami.Heading {
|
||||
level: 3
|
||||
Layout.fillWidth: true
|
||||
elide: Qt.ElideRight
|
||||
text: info.title ? info.title : i18n("No media playing")
|
||||
}
|
||||
|
||||
Behavior on value {
|
||||
NumberAnimation {
|
||||
RowLayout{
|
||||
|
||||
Controls.Label{
|
||||
visible: info.title
|
||||
text: PlayerUtils.formatTimestamp(audio.position)
|
||||
}
|
||||
|
||||
Controls.Slider {
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: audio.duration
|
||||
value: audio.position
|
||||
enabled: audio.seekable
|
||||
onMoved: {
|
||||
console.log("Value:", value);
|
||||
audio.seek(Math.floor(value));
|
||||
}
|
||||
|
||||
Behavior on value {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Controls.Label{
|
||||
visible: info.title
|
||||
text: PlayerUtils.formatTimestamp(audio.duration)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Controls.ToolButton {
|
||||
display: Controls.AbstractButton.IconOnly
|
||||
Layout.preferredWidth: parent.height
|
||||
text: i18n("Expand")
|
||||
enabled: playlistView.count > 0
|
||||
Layout.fillHeight: true
|
||||
icon.name: footerItem.maximized ? "arrow-down" : "arrow-up"
|
||||
onClicked: footerItem.maximized = !footerItem.maximized
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Controls.ToolButton {
|
||||
display: Controls.AbstractButton.IconOnly
|
||||
Layout.preferredWidth: parent.height
|
||||
text: i18n("Expand")
|
||||
enabled: playlistView.count > 0
|
||||
Layout.fillHeight: true
|
||||
icon.name: footerLayout.maximized ? "arrow-down" : "arrow-up"
|
||||
onClicked: footerLayout.maximized = !footerLayout.maximized
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12 as Controls
|
||||
import org.kde.kirigami 2.12 as Kirigami
|
||||
@@ -38,11 +38,14 @@ Kirigami.ScrollablePage {
|
||||
model: PlaylistModel {
|
||||
id: playlistModel
|
||||
}
|
||||
|
||||
reuseItems: true
|
||||
|
||||
delegate: Kirigami.SwipeListItem {
|
||||
id: delegateItem
|
||||
required property string title
|
||||
required property string videoId
|
||||
required property string artists
|
||||
required property var artists
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -61,15 +64,17 @@ Kirigami.ScrollablePage {
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
icon.name: "go-next"
|
||||
text: i18n("Play next")
|
||||
text: i18n("Play Next")
|
||||
onTriggered: UserPlaylistModel.playNext(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
},
|
||||
Kirigami.Action {
|
||||
icon.name: "media-playlist-append"
|
||||
text: i18n("Add to playlist")
|
||||
text: i18n("Add to Playlist")
|
||||
onTriggered: UserPlaylistModel.append(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
}
|
||||
]
|
||||
|
||||
onClicked: play(videoId)
|
||||
}
|
||||
|
||||
Controls.BusyIndicator {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls 2.14 as Controls
|
||||
import org.kde.kirigami 2.14 as Kirigami
|
||||
@@ -10,20 +10,34 @@ import org.kde.kirigami 2.14 as Kirigami
|
||||
import org.kde.ytmusic 1.0
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
title: i18n("Youtube Music")
|
||||
property alias searchQuery: searchModel.searchQuery
|
||||
|
||||
header: Controls.Control {
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
contentItem: Kirigami.SearchField {
|
||||
delaySearch: true
|
||||
selectByMouse: true
|
||||
onAccepted: {
|
||||
searchModel.searchQuery = text
|
||||
}
|
||||
}
|
||||
}
|
||||
title: searchQuery
|
||||
|
||||
ListView {
|
||||
reuseItems: true
|
||||
|
||||
section.delegate: Kirigami.ListSectionHeader {
|
||||
required property string section
|
||||
text: {
|
||||
switch (parseInt(section)) {
|
||||
case SearchModel.Album:
|
||||
return i18n("Albums")
|
||||
case SearchModel.Artist:
|
||||
return i18n("Artists")
|
||||
case SearchModel.Playlist:
|
||||
return i18n("Playlists")
|
||||
case SearchModel.Song:
|
||||
return i18n("Songs")
|
||||
case SearchModel.Video:
|
||||
return i18n("Videos")
|
||||
}
|
||||
|
||||
return i18n("Unknown")
|
||||
}
|
||||
}
|
||||
section.property: "type"
|
||||
|
||||
model: SearchModel {
|
||||
id: searchModel
|
||||
|
||||
@@ -49,8 +63,16 @@ Kirigami.ScrollablePage {
|
||||
play(videoId)
|
||||
}
|
||||
|
||||
onOpenVideo: (videoId) => {
|
||||
askPlayVideoAudio(videoId)
|
||||
onOpenVideo: (videoId, title) => {
|
||||
videoPlayMessage.text = i18n("Video playback is not supported yet. Do you want to play only the audio of \"%1\"?", title)
|
||||
videoPlayMessage.visible = true
|
||||
videoPlayMessage.okAction = function() {
|
||||
play(videoId)
|
||||
videoPlayMessage.visible = false
|
||||
}
|
||||
videoPlayMessage.cancelAction = function() {
|
||||
videoPlayMessage.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
delegate: Kirigami.SwipeListItem {
|
||||
@@ -60,6 +82,7 @@ Kirigami.ScrollablePage {
|
||||
required property int type
|
||||
required property string videoId
|
||||
required property var artists
|
||||
required property string radioPlaylistId
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -92,14 +115,20 @@ Kirigami.ScrollablePage {
|
||||
Kirigami.Action {
|
||||
icon.name: "go-next"
|
||||
text: i18n("Play next")
|
||||
visible: delegateItem.type === SearchModel.Song
|
||||
visible: delegateItem.type === SearchModel.Song || delegateItem.type == SearchModel.Video
|
||||
onTriggered: UserPlaylistModel.playNext(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
},
|
||||
Kirigami.Action {
|
||||
icon.name: "media-playlist-append"
|
||||
text: i18n("Add to playlist")
|
||||
visible: delegateItem.type === SearchModel.Song
|
||||
text: i18n("Add to Playlist")
|
||||
visible: delegateItem.type === SearchModel.Song || delegateItem.type == SearchModel.Video
|
||||
onTriggered: UserPlaylistModel.append(delegateItem.videoId, delegateItem.title, delegateItem.artists)
|
||||
},
|
||||
Kirigami.Action {
|
||||
icon.name: "radio"
|
||||
text: i18n("Radio")
|
||||
visible: delegateItem.type === SearchModel.Artist && delegateItem.radioPlaylistId
|
||||
onTriggered: playPlaylist(delegateItem.radioPlaylistId)
|
||||
}
|
||||
]
|
||||
|
||||
@@ -109,5 +138,22 @@ Kirigami.ScrollablePage {
|
||||
anchors.centerIn: parent
|
||||
visible: searchModel.loading
|
||||
}
|
||||
Kirigami.PlaceholderMessage {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - (Kirigami.Units.largeSpacing * 4)
|
||||
|
||||
visible: parent.count === 0 && !searchModel.loading
|
||||
|
||||
text: i18n("Find music on YouTube Music")
|
||||
helpfulAction: Kirigami.Action {
|
||||
onTriggered: searchField.forceActiveFocus()
|
||||
text: i18n("Search")
|
||||
icon.name: "search"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer: ConfirmationMessage {
|
||||
id: videoPlayMessage
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 2.12 as Controls
|
||||
import QtQuick.Layouts 1.3
|
||||
import org.kde.kirigami 2.14 as Kirigami
|
||||
|
||||
import org.kde.ytmusic 1.0
|
||||
@@ -10,6 +12,83 @@ import org.kde.ytmusic 1.0
|
||||
Kirigami.ApplicationWindow {
|
||||
id: root
|
||||
|
||||
property alias searchField: searchField
|
||||
|
||||
header: Controls.Control {
|
||||
visible: !footer.maximized
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
|
||||
background: Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
anchors.fill: parent
|
||||
Kirigami.Theme.inherit: false
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Header
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
}
|
||||
contentItem: RowLayout{
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Kirigami.SearchField {
|
||||
id: searchField
|
||||
delaySearch: true
|
||||
selectByMouse: true
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: 400
|
||||
onPressed: {
|
||||
popup.open()
|
||||
}
|
||||
|
||||
Controls.Popup {
|
||||
id: popup
|
||||
x: searchField.y
|
||||
y: searchField.y + searchField.height
|
||||
visible: true
|
||||
width: searchField.width
|
||||
height: completionList
|
||||
? Math.min(completionList.count * Kirigami.Units.gridUnit * 2 + Kirigami.Units.gridUnit * 2, Kirigami.Units.gridUnit * 20)
|
||||
: Kirigami.Units.gridUnit * 20
|
||||
|
||||
contentItem: Controls.ScrollView {
|
||||
Controls.ScrollBar.horizontal.policy: Controls.ScrollBar.AlwaysOff
|
||||
ListView {
|
||||
id: completionList
|
||||
model: Library.searches
|
||||
delegate: Controls.ItemDelegate {
|
||||
id: completionDelegate
|
||||
width: parent.width
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
text: model.display
|
||||
onClicked: {
|
||||
searchField.text = model.display
|
||||
searchField.accepted()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
pageStack.clear()
|
||||
|
||||
if (text) {
|
||||
Library.addSearch(text)
|
||||
pageStack.push("qrc:/SearchPage.qml", {
|
||||
"searchQuery": text})
|
||||
} else {
|
||||
pageStack.replace("qrc:/LibraryPage.qml")
|
||||
}
|
||||
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
title: i18n("AudioTube")
|
||||
|
||||
controlsVisible: !footer.maximized
|
||||
@@ -18,7 +97,7 @@ Kirigami.ApplicationWindow {
|
||||
id: contextDrawer
|
||||
}
|
||||
|
||||
pageStack.initialPage: "qrc:/SearchPage.qml"
|
||||
pageStack.initialPage: "qrc:/LibraryPage.qml"
|
||||
|
||||
function play(videoId) {
|
||||
UserPlaylistModel.initialVideoId = videoId
|
||||
@@ -33,14 +112,6 @@ Kirigami.ApplicationWindow {
|
||||
UserPlaylistModel.playlistId = playlistId
|
||||
}
|
||||
|
||||
function askPlayVideoAudio(videoId) {
|
||||
showPassiveNotification(i18n("Video playback is not supported yet."),
|
||||
"long",
|
||||
i18n("Play only audio"),
|
||||
function() {
|
||||
play(videoId)
|
||||
})
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ErrorHandler
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
add_executable(ytm_example main.cpp)
|
||||
target_link_libraries(ytm_example PRIVATE ytm)
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
int main() {
|
||||
const auto ytm = YTMusic();
|
||||
const auto results = ytm.search("arte concert");
|
||||
const auto results = ytm.search("Another one bites the dust");
|
||||
|
||||
std::cout << "Found " << results.size() << " results." << std::endl;
|
||||
|
||||
@@ -42,7 +42,7 @@ int main() {
|
||||
} else if constexpr (std::is_same_v<T, search::Video>) {
|
||||
std::cout << arg.title << std::endl;
|
||||
} else {
|
||||
std::cout << "non excaustive visitor";
|
||||
std::cout << "non exaustive visitor";
|
||||
}
|
||||
}, result);
|
||||
}
|
||||
|
||||
+283
@@ -0,0 +1,283 @@
|
||||
// SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#include "library.h"
|
||||
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QStringBuilder>
|
||||
|
||||
#include "asyncdatabase.h"
|
||||
|
||||
namespace ranges = std::ranges;
|
||||
|
||||
Library::Library(QObject *parent)
|
||||
: QObject{parent}
|
||||
, m_database(ThreadedDatabase::establishConnection([]() -> DatabaseConfiguration {
|
||||
DatabaseConfiguration config;
|
||||
config.setDatabaseName(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) % QDir::separator() % "library.sqlite");
|
||||
config.setType(DATABASE_TYPE_SQLITE);
|
||||
return config;
|
||||
}()))
|
||||
{
|
||||
m_database->runMigrations(":/migrations/");
|
||||
}
|
||||
|
||||
Library::~Library() = default;
|
||||
|
||||
Library &Library::instance()
|
||||
{
|
||||
static Library inst;
|
||||
return inst;
|
||||
}
|
||||
|
||||
FavouritesModel *Library::favourites()
|
||||
{
|
||||
auto future = mapFuture<Rows, std::vector<Song>>(
|
||||
m_database->getResults("select * from favourites natural join songs"),
|
||||
[](auto rows)
|
||||
{
|
||||
std::vector<Song> songs;
|
||||
ranges::transform(parseRows<QString, QString, QString, QString>(rows),
|
||||
std::back_inserter(songs),
|
||||
Song::fromSql);
|
||||
return songs;
|
||||
});
|
||||
return new FavouritesModel(std::move(future), this);
|
||||
}
|
||||
|
||||
void Library::addFavourite(const QString &videoId, const QString &title)
|
||||
{
|
||||
connectFuture(addSong(videoId, title), this, [=, this] {
|
||||
connectFuture(m_database->execute("insert or ignore into favourites (video_id) values (?)", videoId), this, &Library::favouritesChanged);
|
||||
});
|
||||
}
|
||||
|
||||
void Library::removeFavourite(const QString &videoId)
|
||||
{
|
||||
connectFuture(m_database->execute("delete from favourites where video_id = ?", videoId), this, &Library::favouritesChanged);
|
||||
}
|
||||
|
||||
FavouriteWatcher *Library::favouriteWatcher(const QString &videoId)
|
||||
{
|
||||
if (videoId.isEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
return new FavouriteWatcher(this, videoId);
|
||||
}
|
||||
|
||||
SearchHistoryModel *Library::searches()
|
||||
{
|
||||
return new SearchHistoryModel(mapFuture<Rows, std::vector<QString>>(
|
||||
m_database->getResults("select (search_query) from searches order by search_id desc"),
|
||||
[](const auto &rows)
|
||||
{
|
||||
std::vector<QString> out;
|
||||
ranges::transform(rows, std::back_inserter(out), [](auto row) {
|
||||
return row[0].toString();
|
||||
});
|
||||
return out;
|
||||
}), this);
|
||||
}
|
||||
|
||||
void Library::addSearch(const QString &text)
|
||||
{
|
||||
connectFuture(m_database->execute("insert into searches (search_query) values (?)", text), this, &Library::searchesChanged);
|
||||
}
|
||||
|
||||
PlaybackHistoryModel *Library::playbackHistory()
|
||||
{
|
||||
auto future = mapFuture<Rows, std::vector<PlayedSong>>(
|
||||
m_database->getResults("select * from played_songs natural join songs"),
|
||||
[](auto rows)
|
||||
{
|
||||
std::vector<PlayedSong> playedSongs;
|
||||
ranges::transform(parseRows<QString, int, QString, QString, QString>(rows),
|
||||
std::back_inserter(playedSongs),
|
||||
PlayedSong::fromSql);
|
||||
return playedSongs;
|
||||
});
|
||||
return new PlaybackHistoryModel(std::move(future), this);
|
||||
}
|
||||
|
||||
void Library::addPlaybackHistoryItem(const QString &videoId, const QString &title)
|
||||
{
|
||||
connectFuture(addSong(videoId, title), this, [=, this] {
|
||||
connectFuture(m_database->execute("insert or ignore into played_songs (video_id, plays) values (?, ?)", videoId, 0), this, [=, this] {
|
||||
connectFuture(m_database->execute("update played_songs set plays = plays + 1 where video_id = ? ", videoId), this, &Library::playbackHistoryChanged);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
PlaybackHistoryModel *Library::mostPlayed()
|
||||
{
|
||||
auto future = mapFuture<Rows, std::vector<PlayedSong>>(
|
||||
m_database->getResults("select * from played_songs natural join songs order by plays desc limit 10"),
|
||||
[](auto rows)
|
||||
{
|
||||
std::vector<PlayedSong> playedSongs;
|
||||
ranges::transform(parseRows<QString, int, QString, QString, QString>(rows),
|
||||
std::back_inserter(playedSongs),
|
||||
PlayedSong::fromSql);
|
||||
return playedSongs;
|
||||
});
|
||||
return new PlaybackHistoryModel(std::move(future), this);
|
||||
}
|
||||
|
||||
QNetworkAccessManager &Library::nam()
|
||||
{
|
||||
return m_networkImageCacher;
|
||||
}
|
||||
|
||||
QFuture<void> Library::addSong(const QString &videoId, const QString &title)
|
||||
{
|
||||
return m_database->execute("insert or ignore into songs (video_id, title, artist, album) values (?, ?, null, null)", videoId, title);
|
||||
}
|
||||
|
||||
void ThumbnailSource::setVideoId(const QString &id) {
|
||||
if (m_videoId == id) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_videoId = id;
|
||||
Q_EMIT videoIdChanged();
|
||||
|
||||
const QString cacheDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) % QDir::separator() % "thumbnails";
|
||||
QDir(cacheDir).mkpath(QStringLiteral("."));
|
||||
const QString cacheLocation = cacheDir % QDir::separator() % id % ".webp";
|
||||
|
||||
if (QFile::exists(cacheLocation)) {
|
||||
setCachedPath(QUrl::fromLocalFile(cacheLocation));
|
||||
return;
|
||||
}
|
||||
|
||||
auto future = YTMusicThread::instance()->extractVideoInfo(id);
|
||||
connectFuture(future, this, [this, id, cacheLocation](video_info::VideoInfo &&info) {
|
||||
auto *reply = Library::instance().nam().get(QNetworkRequest(QUrl(QString::fromStdString(info.thumbnail))));
|
||||
connect(reply, &QNetworkReply::finished, this, [id, reply, this, cacheLocation]() {
|
||||
QFile file(cacheLocation);
|
||||
file.open(QFile::WriteOnly);
|
||||
file.write(reply->readAll());
|
||||
setCachedPath(QUrl::fromLocalFile(cacheLocation));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
PlaybackHistoryModel::PlaybackHistoryModel(QFuture<std::vector<PlayedSong> > &&songs, QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
{
|
||||
connectFuture(songs, this, [this](const auto songs) {
|
||||
beginResetModel();
|
||||
m_playedSongs = songs;
|
||||
endResetModel();
|
||||
});
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> PlaybackHistoryModel::roleNames() const {
|
||||
return {
|
||||
{Roles::VideoId, "videoId"},
|
||||
{Roles::Title, "title"},
|
||||
{Roles::Artist, "artist"},
|
||||
{Roles::Plays, "plays"}
|
||||
};
|
||||
}
|
||||
|
||||
int PlaybackHistoryModel::rowCount(const QModelIndex &parent) const {
|
||||
return parent.isValid() ? 0 : m_playedSongs.size();
|
||||
}
|
||||
|
||||
QVariant PlaybackHistoryModel::data(const QModelIndex &index, int role) const {
|
||||
switch (role) {
|
||||
case Roles::VideoId:
|
||||
return m_playedSongs.at(index.row()).videoId;
|
||||
case Roles::Title:
|
||||
return m_playedSongs.at(index.row()).title;
|
||||
case Roles::Artist:
|
||||
return m_playedSongs.at(index.row()).artist;
|
||||
case Roles::Plays:
|
||||
return m_playedSongs.at(index.row()).plays;
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
FavouritesModel::FavouritesModel(QFuture<std::vector<Song>> &&songs, QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
{
|
||||
connectFuture(songs, this, [this](const auto songs) {
|
||||
beginResetModel();
|
||||
m_favouriteSongs = songs;
|
||||
endResetModel();
|
||||
});
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> FavouritesModel::roleNames() const {
|
||||
return {
|
||||
{Roles::VideoId, "videoId"},
|
||||
{Roles::Title, "title"},
|
||||
{Roles::Artist, "artist"}
|
||||
};
|
||||
}
|
||||
|
||||
int FavouritesModel::rowCount(const QModelIndex &parent) const {
|
||||
return parent.isValid() ? 0 : m_favouriteSongs.size();
|
||||
}
|
||||
|
||||
QVariant FavouritesModel::data(const QModelIndex &index, int role) const {
|
||||
switch (role) {
|
||||
case Roles::VideoId:
|
||||
return m_favouriteSongs.at(index.row()).videoId;
|
||||
case Roles::Title:
|
||||
return m_favouriteSongs.at(index.row()).title;
|
||||
case Roles::Artist:
|
||||
return m_favouriteSongs.at(index.row()).artist;
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
FavouriteWatcher::FavouriteWatcher(Library *library, const QString &videoId)
|
||||
: QObject(library), m_videoId(videoId), m_library(library)
|
||||
{
|
||||
auto update = [this] {
|
||||
connectFuture(m_library->database().getResult("select count(*) from favourites where video_id = ?", m_videoId), this, [this](auto row) {
|
||||
if (row) {
|
||||
auto [favCount] = parseRow<int>(*row);
|
||||
m_isFavourite = favCount > 0;
|
||||
Q_EMIT isFavouriteChanged();
|
||||
}
|
||||
});
|
||||
};
|
||||
update();
|
||||
connect(library, &Library::favouritesChanged, this, update);
|
||||
}
|
||||
|
||||
bool FavouriteWatcher::isFavourite() const {
|
||||
return m_isFavourite;
|
||||
}
|
||||
|
||||
SearchHistoryModel::SearchHistoryModel(QFuture<std::vector<QString>> &&historyFuture, QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
{
|
||||
connectFuture(historyFuture, this, [this](const auto history) {
|
||||
beginResetModel();
|
||||
m_history = history;
|
||||
endResetModel();
|
||||
});
|
||||
}
|
||||
|
||||
int SearchHistoryModel::rowCount(const QModelIndex &parent) const {
|
||||
return parent.isValid() ? 0 : m_history.size();
|
||||
}
|
||||
|
||||
QVariant SearchHistoryModel::data(const QModelIndex &index, int role) const {
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
return m_history[index.row()];
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
// SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QQuickAsyncImageProvider>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QAbstractListModel>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "asyncytmusic.h"
|
||||
#include "asyncdatabase.h"
|
||||
|
||||
class FavouriteWatcher;
|
||||
|
||||
struct Song {
|
||||
static Song fromSql(std::tuple<QString, QString, QString, QString> tuple) {
|
||||
auto [videoId, title, artist, album] = tuple;
|
||||
return Song {videoId, title, artist, album};
|
||||
}
|
||||
|
||||
QString videoId;
|
||||
QString title;
|
||||
QString artist;
|
||||
QString album;
|
||||
};
|
||||
|
||||
class FavouritesModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
|
||||
enum Roles {
|
||||
VideoId = Qt::UserRole + 1,
|
||||
Title,
|
||||
Artist,
|
||||
};
|
||||
|
||||
public:
|
||||
FavouritesModel(QFuture<std::vector<Song>> &&songs, QObject *parent = nullptr);
|
||||
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
private:
|
||||
std::vector<Song> m_favouriteSongs;
|
||||
};
|
||||
|
||||
struct PlayedSong {
|
||||
static PlayedSong fromSql(std::tuple<QString, int, QString, QString, QString> tuple) {
|
||||
auto [videoId, plays, title, artist, album] = tuple;
|
||||
return PlayedSong {videoId, title, artist, album, plays};
|
||||
}
|
||||
|
||||
QString videoId;
|
||||
QString title;
|
||||
QString artist;
|
||||
QString album;
|
||||
int plays;
|
||||
};
|
||||
|
||||
class PlaybackHistoryModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
|
||||
enum Roles {
|
||||
VideoId = Qt::UserRole + 1,
|
||||
Title,
|
||||
Artist,
|
||||
Plays
|
||||
};
|
||||
|
||||
public:
|
||||
PlaybackHistoryModel(QFuture<std::vector<PlayedSong>> &&songs, QObject *parent = nullptr);
|
||||
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
private:
|
||||
std::vector<PlayedSong> m_playedSongs;
|
||||
};
|
||||
|
||||
class SearchHistoryModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SearchHistoryModel(QFuture<std::vector<QString> > &&historyFuture, QObject *parent = nullptr);
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
private:
|
||||
std::vector<QString> m_history;
|
||||
};
|
||||
|
||||
class Library : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QAbstractListModel *favourites READ favourites NOTIFY favouritesChanged)
|
||||
Q_PROPERTY(QAbstractListModel *searches READ searches NOTIFY searchesChanged)
|
||||
Q_PROPERTY(QAbstractListModel *playbackHistory READ playbackHistory NOTIFY playbackHistoryChanged)
|
||||
Q_PROPERTY(QAbstractListModel *mostPlayed READ mostPlayed NOTIFY playbackHistoryChanged)
|
||||
|
||||
public:
|
||||
explicit Library(QObject *parent = nullptr);
|
||||
~Library();
|
||||
|
||||
static Library &instance();
|
||||
|
||||
FavouritesModel *favourites();
|
||||
Q_SIGNAL void favouritesChanged();
|
||||
Q_INVOKABLE void addFavourite(const QString &videoId, const QString &title);
|
||||
Q_INVOKABLE void removeFavourite(const QString &videoId);
|
||||
Q_INVOKABLE FavouriteWatcher *favouriteWatcher(const QString &videoId);
|
||||
|
||||
SearchHistoryModel *searches();
|
||||
Q_SIGNAL void searchesChanged();
|
||||
Q_INVOKABLE void addSearch(const QString &text);
|
||||
|
||||
PlaybackHistoryModel *playbackHistory();
|
||||
Q_SIGNAL void playbackHistoryChanged();
|
||||
Q_INVOKABLE void addPlaybackHistoryItem(const QString &videoId, const QString &title);
|
||||
|
||||
PlaybackHistoryModel *mostPlayed();
|
||||
|
||||
QNetworkAccessManager &nam();
|
||||
ThreadedDatabase &database() {
|
||||
return *m_database;
|
||||
}
|
||||
|
||||
private:
|
||||
QFuture<void> addSong(const QString &videoId, const QString &title);
|
||||
|
||||
QNetworkAccessManager m_networkImageCacher;
|
||||
std::unique_ptr<ThreadedDatabase> m_database;
|
||||
};
|
||||
|
||||
|
||||
class ThumbnailSource : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString videoId READ videoId WRITE setVideoId NOTIFY videoIdChanged)
|
||||
Q_PROPERTY(QUrl cachedPath READ cachedPath NOTIFY cachedPathChanged)
|
||||
|
||||
QString videoId() const {
|
||||
return m_videoId;
|
||||
}
|
||||
void setVideoId(const QString &id);
|
||||
Q_SIGNAL void videoIdChanged();
|
||||
|
||||
QUrl cachedPath() const {
|
||||
return m_cachedPath;
|
||||
}
|
||||
void setCachedPath(const QUrl &path) {
|
||||
m_cachedPath = path;
|
||||
cachedPathChanged();
|
||||
}
|
||||
Q_SIGNAL void cachedPathChanged();
|
||||
|
||||
private:
|
||||
QString m_videoId;
|
||||
QUrl m_cachedPath;
|
||||
};
|
||||
|
||||
class FavouriteWatcher : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(bool isFavourite READ isFavourite NOTIFY isFavouriteChanged)
|
||||
|
||||
public:
|
||||
FavouriteWatcher(Library *library, const QString &videoId);
|
||||
|
||||
bool isFavourite() const;
|
||||
Q_SIGNAL void isFavouriteChanged();
|
||||
|
||||
Q_SIGNAL void videoIdChanged();
|
||||
|
||||
private:
|
||||
QString m_videoId;
|
||||
Library *m_library;
|
||||
bool m_isFavourite = false;
|
||||
};
|
||||
@@ -7,6 +7,9 @@
|
||||
#include <QtQml>
|
||||
#include <QUrl>
|
||||
#include <KLocalizedContext>
|
||||
#include <KLocalizedString>
|
||||
#include <KCrash>
|
||||
#include <KAboutData>
|
||||
|
||||
#include "searchmodel.h"
|
||||
#include "albummodel.h"
|
||||
@@ -15,6 +18,10 @@
|
||||
#include "userplaylistmodel.h"
|
||||
#include "errorhandler.h"
|
||||
#include "playlistmodel.h"
|
||||
#include "playerutils.h"
|
||||
#include "library.h"
|
||||
|
||||
#include "asyncdatabase.h"
|
||||
|
||||
constexpr auto URI = "org.kde.ytmusic";
|
||||
|
||||
@@ -26,6 +33,11 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("audiotube"));
|
||||
|
||||
KLocalizedString::setApplicationDomain("audiotube");
|
||||
|
||||
KAboutData::setApplicationData(KAboutData(QStringLiteral("audiotube"), QStringLiteral("AudioTube")));
|
||||
KCrash::initialize();
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
qmlRegisterType<SearchModel>(URI, 1, 0, "SearchModel");
|
||||
@@ -39,6 +51,12 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
qmlRegisterSingletonType<ErrorHandler>(URI, 1, 0, "ErrorHandler", [](QQmlEngine *, QJSEngine *) {
|
||||
return new ErrorHandler();
|
||||
});
|
||||
qmlRegisterSingletonType<PlayerUtils>(URI, 1, 0, "PlayerUtils", [](QQmlEngine *, QJSEngine *) {
|
||||
return new PlayerUtils();
|
||||
});
|
||||
qmlRegisterSingletonInstance<Library>(URI, 1, 0, "Library", &Library::instance());
|
||||
qmlRegisterType<ThumbnailSource>(URI, 1, 0, "ThumbnailSource");
|
||||
qmlRegisterAnonymousType<FavouriteWatcher>(URI, 1);
|
||||
|
||||
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
|
||||
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
|
||||
|
||||
Whitespace-only changes.
@@ -0,0 +1,8 @@
|
||||
-- SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
--
|
||||
-- SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
drop table songs;
|
||||
drop table played_songs;
|
||||
drop table favourites;
|
||||
drop table searches;
|
||||
@@ -0,0 +1,26 @@
|
||||
-- SPDX-FileCopyrightText: 2022 Jonah Brüchert <[email protected]>
|
||||
--
|
||||
-- SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
create table songs (
|
||||
video_id Text primary key not null,
|
||||
title Text not null,
|
||||
artist Text,
|
||||
album Text
|
||||
);
|
||||
|
||||
create table played_songs (
|
||||
video_id Text primary key not null,
|
||||
plays Int not null,
|
||||
foreign key (video_id) references songs(video_id)
|
||||
);
|
||||
|
||||
create table favourites (
|
||||
video_id Text primary key not null,
|
||||
foreign key (video_id) references songs(video_id)
|
||||
);
|
||||
|
||||
create table searches (
|
||||
search_id integer primary key autoincrement not null,
|
||||
search_query Text not null
|
||||
);
|
||||
@@ -1,10 +0,0 @@
|
||||
qt5_add_dbus_adaptor(DBUS_SRCS
|
||||
dbus/org.mpris.MediaPlayer2.xml
|
||||
mprisapplication.h MprisApplication)
|
||||
|
||||
qt5_add_dbus_adaptor(DBUS_SRCS
|
||||
dbus/org.mpris.MediaPlayer2.Player.xml
|
||||
mprisplayer.h MprisPlayer)
|
||||
|
||||
add_library(mpris2 STATIC mprisapplication.cpp mprisplayer.cpp ${DBUS_SRCS})
|
||||
target_link_libraries(mpris2 PUBLIC Qt5::Core Qt5::DBus)
|
||||
@@ -1,672 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<node name="/Player_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2.Player">
|
||||
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This interface implements the methods for querying and providing basic
|
||||
control over what is currently playing.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
|
||||
<tp:enum name="Playback_Status" tp:name-for-bindings="Playback_Status" type="s">
|
||||
<tp:enumvalue suffix="Playing" value="Playing">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A track is currently playing.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Paused" value="Paused">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A track is currently paused.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Stopped" value="Stopped">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>There is no track currently playing.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A playback state.</p>
|
||||
</tp:docstring>
|
||||
</tp:enum>
|
||||
|
||||
<tp:enum name="Loop_Status" tp:name-for-bindings="Loop_Status" type="s">
|
||||
<tp:enumvalue suffix="None" value="None">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The playback will stop when there are no more tracks to play</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Track" value="Track">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current track will start again from the begining once it has finished playing</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Playlist" value="Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The playback loops through a list of tracks</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A repeat / loop status</p>
|
||||
</tp:docstring>
|
||||
</tp:enum>
|
||||
|
||||
<tp:simple-type name="Track_Id" type="o" array-name="Track_Id_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Unique track identifier.</p>
|
||||
<p>
|
||||
If the media player implements the TrackList interface and allows
|
||||
the same track to appear multiple times in the tracklist,
|
||||
this must be unique within the scope of the tracklist.
|
||||
</p>
|
||||
<p>
|
||||
Note that this should be a valid D-Bus object id, although clients
|
||||
should not assume that any object is actually exported with any
|
||||
interfaces at that path.
|
||||
</p>
|
||||
<p>
|
||||
Media players may not use any paths starting with
|
||||
<literal>/org/mpris</literal> unless explicitly allowed by this specification.
|
||||
Such paths are intended to have special meaning, such as
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
to indicate "no track".
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This is a D-Bus object id as that is the definitive way to have
|
||||
unique identifiers on D-Bus. It also allows for future optional
|
||||
expansions to the specification where tracks are exported to D-Bus
|
||||
with an interface similar to org.gnome.UPnP.MediaItem2.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Playback_Rate" type="d">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A playback rate</p>
|
||||
<p>
|
||||
This is a multiplier, so a value of 0.5 indicates that playback is
|
||||
happening at half speed, while 1.5 means that 1.5 seconds of "track time"
|
||||
is consumed every second.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Volume" type="d">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Audio volume level</p>
|
||||
<ul>
|
||||
<li>0.0 means mute.</li>
|
||||
<li>1.0 is a sensible maximum volume level (ex: 0dB).</li>
|
||||
</ul>
|
||||
<p>
|
||||
Note that the volume may be higher than 1.0, although generally
|
||||
clients should not attempt to set it above 1.0.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Time_In_Us" type="x">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Time in microseconds.</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<method name="Next" tp:name-for-bindings="Next">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Skips to the next track in the tracklist.</p>
|
||||
<p>
|
||||
If there is no next track (and endless playback and track
|
||||
repeat are both off), stop playback.
|
||||
</p>
|
||||
<p>If playback is paused or stopped, it remains that way.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanGoNext</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Previous" tp:name-for-bindings="Previous">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Skips to the previous track in the tracklist.</p>
|
||||
<p>
|
||||
If there is no previous track (and endless playback and track
|
||||
repeat are both off), stop playback.
|
||||
</p>
|
||||
<p>If playback is paused or stopped, it remains that way.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanGoPrevious</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Pause" tp:name-for-bindings="Pause">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Pauses playback.</p>
|
||||
<p>If playback is already paused, this has no effect.</p>
|
||||
<p>
|
||||
Calling Play after this should cause playback to start again
|
||||
from the same position.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanPause</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="PlayPause" tp:name-for-bindings="PlayPause">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Pauses playback.</p>
|
||||
<p>If playback is already paused, resumes playback.</p>
|
||||
<p>If playback is stopped, starts playback.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanPause</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Stop" tp:name-for-bindings="Stop">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Stops playback.</p>
|
||||
<p>If playback is already stopped, this has no effect.</p>
|
||||
<p>
|
||||
Calling Play after this should cause playback to
|
||||
start again from the beginning of the track.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Play" tp:name-for-bindings="Play">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Starts or resumes playback.</p>
|
||||
<p>If already playing, this has no effect.</p>
|
||||
<p>If paused, playback resumes from the current position.</p>
|
||||
<p>If there is no track to play, this has no effect.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanPlay</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Seek" tp:name-for-bindings="Seek">
|
||||
<arg direction="in" type="x" name="Offset" tp:type="Time_In_Us">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The number of microseconds to seek forward.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Seeks forward in the current track by the specified number
|
||||
of microseconds.
|
||||
</p>
|
||||
<p>
|
||||
A negative value seeks back. If this would mean seeking
|
||||
back further than the start of the track, the position
|
||||
is set to 0.
|
||||
</p>
|
||||
<p>
|
||||
If the value passed in would mean seeking beyond the end
|
||||
of the track, acts like a call to Next.
|
||||
</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanSeek</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="SetPosition" tp:name-for-bindings="Set_Position">
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The currently playing track's identifier.</p>
|
||||
<p>
|
||||
If this does not match the id of the currently-playing track,
|
||||
the call is ignored as "stale".
|
||||
</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" type="x" tp:type="Time_In_Us" name="Position">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Track position in microseconds.</p>
|
||||
<p>This must be between 0 and <track_length>.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Sets the current track position in microseconds.</p>
|
||||
<p>If the Position argument is less than 0, do nothing.</p>
|
||||
<p>
|
||||
If the Position argument is greater than the track length,
|
||||
do nothing.
|
||||
</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanSeek</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
The reason for having this method, rather than making
|
||||
<tp:member-ref>Position</tp:member-ref> writable, is to include
|
||||
the TrackId argument to avoid race conditions where a client tries
|
||||
to seek to a position when the track has already changed.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="OpenUri" tp:name-for-bindings="Open_Uri">
|
||||
<arg direction="in" type="s" tp:type="Uri" name="Uri">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
Uri of the track to load. Its uri scheme should be an element of the
|
||||
<literal>org.mpris.MediaPlayer2.SupportedUriSchemes</literal>
|
||||
property and the mime-type should match one of the elements of the
|
||||
<literal>org.mpris.MediaPlayer2.SupportedMimeTypes</literal>.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Opens the Uri given as an argument</p>
|
||||
<p>If the playback is stopped, starts playing</p>
|
||||
<p>
|
||||
If the uri scheme or the mime-type of the uri to open is not supported,
|
||||
this method does nothing and may raise an error. In particular, if the
|
||||
list of available uri schemes is empty, this method may not be
|
||||
implemented.
|
||||
</p>
|
||||
<p>Clients should not assume that the Uri has been opened as soon as this
|
||||
method returns. They should wait until the mpris:trackid field in the
|
||||
<tp:member-ref>Metadata</tp:member-ref> property changes.
|
||||
</p>
|
||||
<p>
|
||||
If the media player implements the TrackList interface, then the
|
||||
opened track should be made part of the tracklist, the
|
||||
<literal>org.mpris.MediaPlayer2.TrackList.TrackAdded</literal> or
|
||||
<literal>org.mpris.MediaPlayer2.TrackList.TrackListReplaced</literal>
|
||||
signal should be fired, as well as the
|
||||
<literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
|
||||
signal on the tracklist interface.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<property name="PlaybackStatus" tp:name-for-bindings="Playback_Status" type="s" tp:type="Playback_Status" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current playback status.</p>
|
||||
<p>
|
||||
May be "Playing", "Paused" or "Stopped".
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="LoopStatus" type="s" access="readwrite"
|
||||
tp:name-for-bindings="Loop_Status" tp:type="Loop_Status">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current loop / repeat status</p>
|
||||
<p>May be:
|
||||
<ul>
|
||||
<li>"None" if the playback will stop when there are no more tracks to play</li>
|
||||
<li>"Track" if the current track will start again from the begining once it has finished playing</li>
|
||||
<li>"Playlist" if the playback loops through a list of tracks</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to set this property should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Rate" tp:name-for-bindings="Rate" type="d" tp:type="Playback_Rate" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current playback rate.</p>
|
||||
<p>
|
||||
The value must fall in the range described by
|
||||
<tp:member-ref>MinimumRate</tp:member-ref> and
|
||||
<tp:member-ref>MaximumRate</tp:member-ref>, and must not be 0.0. If
|
||||
playback is paused, the <tp:member-ref>PlaybackStatus</tp:member-ref>
|
||||
property should be used to indicate this. A value of 0.0 should not
|
||||
be set by the client. If it is, the media player should act as
|
||||
though <tp:member-ref>Pause</tp:member-ref> was called.
|
||||
</p>
|
||||
<p>
|
||||
If the media player has no ability to play at speeds other than the
|
||||
normal playback rate, this must still be implemented, and must
|
||||
return 1.0. The <tp:member-ref>MinimumRate</tp:member-ref> and
|
||||
<tp:member-ref>MaximumRate</tp:member-ref> properties must also be
|
||||
set to 1.0.
|
||||
</p>
|
||||
<p>
|
||||
Not all values may be accepted by the media player. It is left to
|
||||
media player implementations to decide how to deal with values they
|
||||
cannot use; they may either ignore them or pick a "best fit" value.
|
||||
Clients are recommended to only use sensible fractions or multiples
|
||||
of 1 (eg: 0.5, 0.25, 1.5, 2.0, etc).
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows clients to display (reasonably) accurate progress bars
|
||||
without having to regularly query the media player for the current
|
||||
position.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Shuffle" tp:name-for-bindings="Shuffle" type="b" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A value of <strong>false</strong> indicates that playback is
|
||||
progressing linearly through a playlist, while <strong>true</strong>
|
||||
means playback is progressing through a playlist in some other order.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to set this property should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Metadata" tp:name-for-bindings="Metadata" type="a{sv}" tp:type="Metadata_Map" access="read">
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QMap<QString, QString>"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The metadata of the current element.</p>
|
||||
<p>
|
||||
If there is a current track, this must have a "mpris:trackid" entry
|
||||
(of D-Bus type "o") at the very least, which contains a D-Bus path that
|
||||
uniquely identifies this track.
|
||||
</p>
|
||||
<p>
|
||||
See the type documentation for more details.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Volume" type="d" tp:type="Volume" tp:name-for-bindings="Volume" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true" />
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The volume level.</p>
|
||||
<p>
|
||||
When setting, if a negative value is passed, the volume
|
||||
should be set to 0.0.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to set this property should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Position" type="x" tp:type="Time_In_Us" tp:name-for-bindings="Position" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The current track position in microseconds, between 0 and
|
||||
the 'mpris:length' metadata entry (see Metadata).
|
||||
</p>
|
||||
<p>
|
||||
Note: If the media player allows it, the current playback position
|
||||
can be changed either the SetPosition method or the Seek method on
|
||||
this interface. If this is not the case, the
|
||||
<tp:member-ref>CanSeek</tp:member-ref> property is false, and
|
||||
setting this property has no effect and can raise an error.
|
||||
</p>
|
||||
<p>
|
||||
If the playback progresses in a way that is inconstistant with the
|
||||
<tp:member-ref>Rate</tp:member-ref> property, the
|
||||
<tp:member-ref>Seeked</tp:member-ref> signal is emited.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="MinimumRate" tp:name-for-bindings="Minimum_Rate" type="d" tp:type="Playback_Rate" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The minimum value which the <tp:member-ref>Rate</tp:member-ref>
|
||||
property can take.
|
||||
Clients should not attempt to set the
|
||||
<tp:member-ref>Rate</tp:member-ref> property below this value.
|
||||
</p>
|
||||
<p>
|
||||
Note that even if this value is 0.0 or negative, clients should
|
||||
not attempt to set the <tp:member-ref>Rate</tp:member-ref> property
|
||||
to 0.0.
|
||||
</p>
|
||||
<p>This value should always be 1.0 or less.</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="MaximumRate" tp:name-for-bindings="Maximum_Rate" type="d" tp:type="Playback_Rate" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The maximum value which the <tp:member-ref>Rate</tp:member-ref>
|
||||
property can take.
|
||||
Clients should not attempt to set the
|
||||
<tp:member-ref>Rate</tp:member-ref> property above this value.
|
||||
</p>
|
||||
<p>
|
||||
This value should always be 1.0 or greater.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanGoNext" tp:name-for-bindings="Can_Go_Next" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Whether the client can call the <tp:member-ref>Next</tp:member-ref>
|
||||
method on this interface and expect the current track to change.
|
||||
</p>
|
||||
<p>
|
||||
If it is unknown whether a call to <tp:member-ref>Next</tp:member-ref> will
|
||||
be successful (for example, when streaming tracks), this property should
|
||||
be set to <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Even when playback can generally be controlled, there may not
|
||||
always be a next track to move to.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanGoPrevious" tp:name-for-bindings="Can_Go_Previous" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Whether the client can call the
|
||||
<tp:member-ref>Previous</tp:member-ref> method on this interface and
|
||||
expect the current track to change.
|
||||
</p>
|
||||
<p>
|
||||
If it is unknown whether a call to <tp:member-ref>Previous</tp:member-ref>
|
||||
will be successful (for example, when streaming tracks), this property
|
||||
should be set to <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Even when playback can generally be controlled, there may not
|
||||
always be a next previous to move to.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanPlay" tp:name-for-bindings="Can_Play" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether playback can be started using
|
||||
<tp:member-ref>Play</tp:member-ref> or
|
||||
<tp:member-ref>PlayPause</tp:member-ref>.
|
||||
</p>
|
||||
<p>
|
||||
Note that this is related to whether there is a "current track": the
|
||||
value should not depend on whether the track is currently paused or
|
||||
playing. In fact, if a track is currently playing (and
|
||||
<tp:member-ref>CanControl</tp:member-ref> is <strong>true</strong>),
|
||||
this should be <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Even when playback can generally be controlled, it may not be
|
||||
possible to enter a "playing" state, for example if there is no
|
||||
"current track".
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanPause" tp:name-for-bindings="Can_Pause" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether playback can be paused using
|
||||
<tp:member-ref>Pause</tp:member-ref> or
|
||||
<tp:member-ref>PlayPause</tp:member-ref>.
|
||||
</p>
|
||||
<p>
|
||||
Note that this is an intrinsic property of the current track: its
|
||||
value should not depend on whether the track is currently paused or
|
||||
playing. In fact, if playback is currently paused (and
|
||||
<tp:member-ref>CanControl</tp:member-ref> is <strong>true</strong>),
|
||||
this should be <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Not all media is pausable: it may not be possible to pause some
|
||||
streamed media, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanSeek" tp:name-for-bindings="Can_Seek" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Whether the client can control the playback position using
|
||||
<tp:member-ref>Seek</tp:member-ref> and
|
||||
<tp:member-ref>SetPosition</tp:member-ref>. This may be different for
|
||||
different tracks.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Not all media is seekable: it may not be possible to seek when
|
||||
playing some streamed media, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanControl" tp:name-for-bindings="Can_Control" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether the media player may be controlled over this interface.</p>
|
||||
<p>
|
||||
This property is not expected to change, as it describes an intrinsic
|
||||
capability of the implementation.
|
||||
</p>
|
||||
<p>
|
||||
If this is <strong>false</strong>, clients should assume that all
|
||||
properties on this interface are read-only (and will raise errors
|
||||
if writing to them is attempted), no methods are implemented
|
||||
and all other properties starting with "Can" are also
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows clients to determine whether to present and enable
|
||||
controls to the user in advance of attempting to call methods
|
||||
and write to properties.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<signal name="Seeked" tp:name-for-bindings="Seeked">
|
||||
<arg name="Position" type="x" tp:type="Time_In_Us">
|
||||
<tp:docstring>
|
||||
<p>The new position, in microseconds.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Indicates that the track position has changed in a way that is
|
||||
inconsistant with the current playing state.
|
||||
</p>
|
||||
<p>When this signal is not received, clients should assume that:</p>
|
||||
<ul>
|
||||
<li>
|
||||
When playing, the position progresses according to the rate property.
|
||||
</li>
|
||||
<li>When paused, it remains constant.</li>
|
||||
</ul>
|
||||
<p>
|
||||
This signal does not need to be emitted when playback starts
|
||||
or when the track changes, unless the track is starting at an
|
||||
unexpected position. An expected position would be the last
|
||||
known one when going from Paused to Playing, and 0 when going from
|
||||
Stopped to Playing.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
||||
@@ -1,253 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<node name="/Playlists_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2.Playlists">
|
||||
<tp:added version="2.1" />
|
||||
<tp:docstring>
|
||||
<p>Provides access to the media player's playlists.</p>
|
||||
<p>
|
||||
Since D-Bus does not provide an easy way to check for what interfaces
|
||||
are exported on an object, clients should attempt to get one of the
|
||||
properties on this interface to see if it is implemented.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
|
||||
<tp:simple-type name="Playlist_Id" type="o" array-name="Playlist_Id_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Unique playlist identifier.</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Multiple playlists may have the same name.
|
||||
</p>
|
||||
<p>
|
||||
This is a D-Bus object id as that is the definitive way to have
|
||||
unique identifiers on D-Bus. It also allows for future optional
|
||||
expansions to the specification where tracks are exported to D-Bus
|
||||
with an interface similar to org.gnome.UPnP.MediaItem2.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Uri" type="s" array-name="Uri_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A URI.</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:struct name="Playlist" array-name="Playlist_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A data structure describing a playlist.</p>
|
||||
</tp:docstring>
|
||||
<tp:member type="o" tp:type="Playlist_Id" name="Id">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A unique identifier for the playlist.</p>
|
||||
<p>This should remain the same if the playlist is renamed.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="s" name="Name">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The name of the playlist, typically given by the user.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="s" tp:type="Uri" name="Icon">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The URI of an (optional) icon.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
</tp:struct>
|
||||
|
||||
<tp:struct name="Maybe_Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A data structure describing a playlist, or nothing.</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
D-Bus does not (at the time of writing) support a MAYBE type,
|
||||
so we are forced to invent our own.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
<tp:member type="b" name="Valid">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether this structure refers to a valid playlist.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="(oss)" tp:type="Playlist" name="Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The playlist, providing Valid is true, otherwise undefined.</p>
|
||||
<p>
|
||||
When constructing this type, it should be noted that the playlist
|
||||
ID must be a valid object path, or D-Bus implementations may reject
|
||||
it. This is true even when Valid is false. It is suggested that
|
||||
"/" is used as the playlist ID in this case.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
</tp:struct>
|
||||
|
||||
<tp:enum name="Playlist_Ordering" array-name="Playlist_Ordering_List" type="s">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Specifies the ordering of returned playlists.</p>
|
||||
</tp:docstring>
|
||||
<tp:enumvalue suffix="Alphabetical" value="Alphabetical">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Alphabetical ordering by name, ascending.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="CreationDate" value="Created">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Ordering by creation date, oldest first.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="ModifiedDate" value="Modified">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Ordering by last modified date, oldest first.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="LastPlayDate" value="Played">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Ordering by date of last playback, oldest first.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="UserDefined" value="User">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A user-defined ordering.</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Some media players may allow users to order playlists as they
|
||||
wish. This ordering allows playlists to be retreived in that
|
||||
order.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
</tp:enum>
|
||||
|
||||
<method name="ActivatePlaylist" tp:name-for-bindings="Activate_Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Starts playing the given playlist.
|
||||
</p>
|
||||
<p>
|
||||
Note that this must be implemented. If the media player does not
|
||||
allow clients to change the playlist, it should not implement this
|
||||
interface at all.
|
||||
</p>
|
||||
<p>
|
||||
It is up to the media player whether this completely replaces the
|
||||
current tracklist, or whether it is merely inserted into the
|
||||
tracklist and the first track starts. For example, if the media
|
||||
player is operating in a "jukebox" mode, it may just append the
|
||||
playlist to the list of upcoming tracks, and skip to the first
|
||||
track in the playlist.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
<arg direction="in" name="PlaylistId" type="o">
|
||||
<tp:docstring>
|
||||
<p>The id of the playlist to activate.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="GetPlaylists" tp:name-for-bindings="Get_Playlists">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Gets a set of playlists.</p>
|
||||
</tp:docstring>
|
||||
<arg direction="in" name="Index" type="u">
|
||||
<tp:docstring>
|
||||
<p>The index of the first playlist to be fetched (according to the ordering).</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" name="MaxCount" type="u">
|
||||
<tp:docstring>
|
||||
<p>The maximum number of playlists to fetch.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" name="Order" type="s" tp:type="Playlist_Ordering">
|
||||
<tp:docstring>
|
||||
<p>The ordering that should be used.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" name="ReverseOrder" type="b">
|
||||
<tp:docstring>
|
||||
<p>Whether the order should be reversed.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="PlaylistList"/>
|
||||
<arg direction="out" name="Playlists" type="a(oss)" tp:type="Playlist[]">
|
||||
<tp:docstring>
|
||||
<p>A list of (at most MaxCount) playlists.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<property name="PlaylistCount" type="u" tp:name-for-bindings="Playlist_Count" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The number of playlists available.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Orderings" tp:name-for-bindings="Orderings" type="as" tp:type="Playlist_Ordering[]" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The available orderings. At least one must be offered.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Media players may not have access to all the data required for some
|
||||
orderings. For example, creation times are not available on UNIX
|
||||
filesystems (don't let the ctime fool you!). On the other hand,
|
||||
clients should have some way to get the "most recent" playlists.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="ActivePlaylist" type="(b(oss))" tp:name-for-bindings="Active_Playlist" tp:type="Maybe_Playlist" access="read">
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="PlaylistType"/>
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The currently-active playlist.
|
||||
</p>
|
||||
<p>
|
||||
If there is no currently-active playlist, the structure's Valid field
|
||||
will be false, and the Playlist details are undefined.
|
||||
</p>
|
||||
<p>
|
||||
Note that this may not have a value even after ActivatePlaylist is
|
||||
called with a valid playlist id as ActivatePlaylist implementations
|
||||
have the option of simply inserting the contents of the playlist into
|
||||
the current tracklist.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<signal name="PlaylistChanged" tp:name-for-bindings="Playlist_Changed">
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="Playlist"/>
|
||||
<arg name="Playlist" type="(oss)" tp:type="Playlist">
|
||||
<tp:docstring>
|
||||
The playlist which details have changed.
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that either the Name or Icon attribute of a
|
||||
playlist has changed.
|
||||
</p>
|
||||
<p>Client implementations should be aware that this signal
|
||||
may not be implemented.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
Without this signal, media players have no way to notify clients
|
||||
of a change in the attributes of a playlist other than the active one
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
||||
|
||||
@@ -1,352 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<node name="/Track_List_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2.TrackList">
|
||||
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Provides access to a short list of tracks which were recently played or
|
||||
will be played shortly. This is intended to provide context to the
|
||||
currently-playing track, rather than giving complete access to the
|
||||
media player's playlist.
|
||||
</p>
|
||||
<p>
|
||||
Example use cases are the list of tracks from the same album as the
|
||||
currently playing song or the
|
||||
<a href="http://projects.gnome.org/rhythmbox/">Rhythmbox</a> play queue.
|
||||
</p>
|
||||
<p>
|
||||
Each track in the tracklist has a unique identifier.
|
||||
The intention is that this uniquely identifies the track within
|
||||
the scope of the tracklist. In particular, if a media item
|
||||
(a particular music file, say) occurs twice in the track list, each
|
||||
occurrence should have a different identifier. If a track is removed
|
||||
from the middle of the playlist, it should not affect the track ids
|
||||
of any other tracks in the tracklist.
|
||||
</p>
|
||||
<p>
|
||||
As a result, the traditional track identifiers of URLs and position
|
||||
in the playlist cannot be used. Any scheme which satisfies the
|
||||
uniqueness requirements is valid, as clients should not make any
|
||||
assumptions about the value of the track id beyond the fact
|
||||
that it is a unique identifier.
|
||||
</p>
|
||||
<p>
|
||||
Note that the (memory and processing) burden of implementing the
|
||||
TrackList interface and maintaining unique track ids for the
|
||||
playlist can be mitigated by only exposing a subset of the playlist when
|
||||
it is very long (the 20 or so tracks around the currently playing
|
||||
track, for example). This is a recommended practice as the tracklist
|
||||
interface is not designed to enable browsing through a large list of tracks,
|
||||
but rather to provide clients with context about the currently playing track.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
|
||||
<tp:mapping name="Metadata_Map" array-name="Metadata_Map_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A mapping from metadata attribute names to values.</p>
|
||||
<p>
|
||||
The <b>mpris:trackid</b> attribute must always be present, and must be
|
||||
of D-Bus type "o". This contains a D-Bus path that uniquely identifies
|
||||
the track within the scope of the playlist. There may or may not be
|
||||
an actual D-Bus object at that path; this specification says nothing
|
||||
about what interfaces such an object may implement.
|
||||
</p>
|
||||
<p>
|
||||
If the length of the track is known, it should be provided in the
|
||||
metadata property with the "mpris:length" key. The length must be
|
||||
given in microseconds, and be represented as a signed 64-bit integer.
|
||||
</p>
|
||||
<p>
|
||||
If there is an image associated with the track, a URL for it may be
|
||||
provided using the "mpris:artUrl" key. For other metadata, fields
|
||||
defined by the
|
||||
<a href="http://xesam.org/main/XesamOntology">Xesam ontology</a>
|
||||
should be used, prefixed by "xesam:". See the
|
||||
<a href="http://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata">metadata page on the freedesktop.org wiki</a>
|
||||
for a list of common fields.
|
||||
</p>
|
||||
<p>
|
||||
Lists of strings should be passed using the array-of-string ("as")
|
||||
D-Bus type. Dates should be passed as strings using the ISO 8601
|
||||
extended format (eg: 2007-04-29T14:35:51). If the timezone is
|
||||
known, RFC 3339's internet profile should be used (eg:
|
||||
2007-04-29T14:35:51+02:00).
|
||||
</p>
|
||||
</tp:docstring>
|
||||
<tp:member type="s" name="Attribute">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The name of the attribute; see the
|
||||
<a href="http://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata">metadata page</a>
|
||||
for guidelines on names to use.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="v" name="Value">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The value of the attribute, in the most appropriate format.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
</tp:mapping>
|
||||
|
||||
<tp:simple-type name="Uri" type="s">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A unique resource identifier.</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<method name="GetTracksMetadata" tp:name-for-bindings="Get_Tracks_Metadata">
|
||||
<arg direction="in" name="TrackIds" type="ao" tp:type="Track_Id[]">
|
||||
<tp:docstring>
|
||||
<p>The list of track ids for which metadata is requested.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="MetadataMap"/>
|
||||
<arg direction="out" type="aa{sv}" tp:type="Metadata_Map[]" name="Metadata">
|
||||
<tp:docstring>
|
||||
<p>Metadata of the set of tracks given as input.</p>
|
||||
<p>See the type documentation for more details.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Gets all the metadata available for a set of tracks.</p>
|
||||
<p>
|
||||
Each set of metadata must have a "mpris:trackid" entry at the very least,
|
||||
which contains a string that uniquely identifies this track within
|
||||
the scope of the tracklist.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="AddTrack" tp:name-for-bindings="Add_Track">
|
||||
<arg direction="in" type="s" tp:type="Uri" name="Uri">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
The uri of the item to add. Its uri scheme should be an element of the
|
||||
<strong>org.mpris.MediaPlayer2.SupportedUriSchemes</strong>
|
||||
property and the mime-type should match one of the elements of the
|
||||
<strong>org.mpris.MediaPlayer2.SupportedMimeTypes</strong>
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="AfterTrack">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
The identifier of the track after which
|
||||
the new item should be inserted. The path
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
indicates that the track should be inserted at the
|
||||
start of the track list.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" type="b" name="SetAsCurrent">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
Whether the newly inserted track should be considered as
|
||||
the current track. Setting this to true has the same effect as
|
||||
calling GoTo afterwards.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Adds a URI in the TrackList.</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanEditTracks</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
<p>
|
||||
Note: Clients should not assume that the track has been added at the
|
||||
time when this method returns. They should wait for a TrackAdded (or
|
||||
TrackListReplaced) signal.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="RemoveTrack" tp:name-for-bindings="Remove__Track">
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>Identifier of the track to be removed.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Removes an item from the TrackList.</p>
|
||||
<p>If the track is not part of this tracklist, this has no effect.</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanEditTracks</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
<p>
|
||||
Note: Clients should not assume that the track has been removed at the
|
||||
time when this method returns. They should wait for a TrackRemoved (or
|
||||
TrackListReplaced) signal.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="GoTo" tp:name-for-bindings="Go_To">
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>Identifier of the track to skip to.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Skip to the specified TrackId.</p>
|
||||
<p>If the track is not part of this tracklist, this has no effect.</p>
|
||||
<p>
|
||||
If this object is not <strong>/org/mpris/MediaPlayer2</strong>,
|
||||
the current TrackList's tracks should be replaced with the contents of
|
||||
this TrackList, and the TrackListReplaced signal should be fired from
|
||||
<strong>/org/mpris/MediaPlayer2</strong>.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<property name="Tracks" type="ao" tp:type="Track_Id[]" tp:name-for-bindings="Tracks" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="invalidates"/>
|
||||
<tp:docstring>
|
||||
<p>
|
||||
An array which contains the identifier of each track
|
||||
in the tracklist, in order.
|
||||
</p>
|
||||
<p>
|
||||
The <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
|
||||
signal is emited every time this property changes, but the signal
|
||||
message does not contain the new value.
|
||||
|
||||
Client implementations should rather rely on the
|
||||
<tp:member-ref>TrackAdded</tp:member-ref>,
|
||||
<tp:member-ref>TrackRemoved</tp:member-ref> and
|
||||
<tp:member-ref>TrackListReplaced</tp:member-ref> signals to keep their
|
||||
representation of the tracklist up to date.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanEditTracks" type="b" tp:name-for-bindings="Can_Edit_Tracks" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, calling
|
||||
<tp:member-ref>AddTrack</tp:member-ref> or
|
||||
<tp:member-ref>RemoveTrack</tp:member-ref> will have no effect,
|
||||
and may raise a NotSupported error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<signal name="TrackListReplaced" tp:name-for-bindings="Track_List_Replaced">
|
||||
<arg name="Tracks" type="ao" tp:type="Track_Id[]">
|
||||
<tp:docstring>
|
||||
<p>The new content of the tracklist.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg name="CurrentTrack" type="o" tp:type="Track_Id">
|
||||
<tp:docstring>
|
||||
<p>The identifier of the track to be considered as current.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
indicates that there is no current track.
|
||||
</p>
|
||||
<p>
|
||||
This should correspond to the <literal>mpris:trackid</literal> field of the
|
||||
Metadata property of the <literal>org.mpris.MediaPlayer2.Player</literal>
|
||||
interface.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that the entire tracklist has been replaced.</p>
|
||||
<p>
|
||||
It is left up to the implementation to decide when
|
||||
a change to the track list is invasive enough that
|
||||
this signal should be emitted instead of a series of
|
||||
TrackAdded and TrackRemoved signals.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
<signal name="TrackAdded" tp:name-for-bindings="Track_Added">
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="MetadataMap"/>
|
||||
<arg type="a{sv}" tp:type="Metadata_Map" name="Metadata">
|
||||
<tp:docstring>
|
||||
<p>The metadata of the newly added item.</p>
|
||||
<p>This must include a mpris:trackid entry.</p>
|
||||
<p>See the type documentation for more details.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg type="o" tp:type="Track_Id" name="AfterTrack">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
The identifier of the track after which the new track
|
||||
was inserted. The path
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
indicates that the track was inserted at the
|
||||
start of the track list.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that a track has been added to the track list.</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
<signal name="TrackRemoved" tp:name-for-bindings="Track_Removed">
|
||||
<arg type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>The identifier of the track being removed.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that a track has been removed from the track list.</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
<signal name="TrackMetadataChanged" tp:name-for-bindings="Track_Metadata_Changed">
|
||||
<arg type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>The id of the track which metadata has changed.</p>
|
||||
<p>If the track id has changed, this will be the old value.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="MetadataMap"/>
|
||||
<arg type="a{sv}" tp:type="Metadata_Map" name="Metadata">
|
||||
<tp:docstring>
|
||||
<p>The new track metadata.</p>
|
||||
<p>
|
||||
This must include a mpris:trackid entry. If the track id has
|
||||
changed, this will be the new value.
|
||||
</p>
|
||||
<p>See the type documentation for more details.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Indicates that the metadata of a track in the tracklist has changed.
|
||||
</p>
|
||||
<p>
|
||||
This may indicate that a track has been replaced, in which case the
|
||||
mpris:trackid metadata entry is different from the TrackId argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
||||
@@ -1,198 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<node name="/Media_Player" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
|
||||
<method name="Raise" tp:name-for-bindings="Raise">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Brings the media player's user interface to the front using any
|
||||
appropriate mechanism available.
|
||||
</p>
|
||||
<p>
|
||||
The media player may be unable to control how its user interface
|
||||
is displayed, or it may not have a graphical user interface at all.
|
||||
In this case, the <tp:member-ref>CanRaise</tp:member-ref> property is
|
||||
<strong>false</strong> and this method does nothing.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Quit" tp:name-for-bindings="Quit">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Causes the media player to stop running.</p>
|
||||
<p>
|
||||
The media player may refuse to allow clients to shut it down.
|
||||
In this case, the <tp:member-ref>CanQuit</tp:member-ref> property is
|
||||
<strong>false</strong> and this method does nothing.
|
||||
</p>
|
||||
<p>
|
||||
Note: Media players which can be D-Bus activated, or for which there is
|
||||
no sensibly easy way to terminate a running instance (via the main
|
||||
interface or a notification area icon for example) should allow clients
|
||||
to use this method. Otherwise, it should not be needed.
|
||||
</p>
|
||||
<p>If the media player does not have a UI, this should be implemented.</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<property name="CanQuit" type="b" tp:name-for-bindings="Can_Quit" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, calling
|
||||
<tp:member-ref>Quit</tp:member-ref> will have no effect, and may
|
||||
raise a NotSupported error. If <strong>true</strong>, calling
|
||||
<tp:member-ref>Quit</tp:member-ref> will cause the media application
|
||||
to attempt to quit (although it may still be prevented from quitting
|
||||
by the user, for example).
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Fullscreen" type="b" tp:name-for-bindings="Fullscreen" access="readwrite">
|
||||
<tp:added version="2.2" />
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether the media player is occupying the fullscreen.</p>
|
||||
<p>
|
||||
This is typically used for videos. A value of <strong>true</strong>
|
||||
indicates that the media player is taking up the full screen.
|
||||
</p>
|
||||
<p>
|
||||
Media centre software may well have this value fixed to <strong>true</strong>
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanSetFullscreen</tp:member-ref> is <strong>true</strong>,
|
||||
clients may set this property to <strong>true</strong> to tell the media player
|
||||
to enter fullscreen mode, or to <strong>false</strong> to return to windowed
|
||||
mode.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanSetFullscreen</tp:member-ref> is <strong>false</strong>,
|
||||
then attempting to set this property should have no effect, and may raise
|
||||
an error. However, even if it is <strong>true</strong>, the media player
|
||||
may still be unable to fulfil the request, in which case attempting to set
|
||||
this property will have no effect (but should not raise an error).
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows remote control interfaces, such as LIRC or mobile devices like
|
||||
phones, to control whether a video is shown in fullscreen.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanSetFullscreen" type="b" tp:name-for-bindings="Can_Set_Fullscreen" access="read">
|
||||
<tp:added version="2.2" />
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, attempting to set
|
||||
<tp:member-ref>Fullscreen</tp:member-ref> will have no effect, and may
|
||||
raise an error. If <strong>true</strong>, attempting to set
|
||||
<tp:member-ref>Fullscreen</tp:member-ref> will not raise an error, and (if it
|
||||
is different from the current value) will cause the media player to attempt to
|
||||
enter or exit fullscreen mode.
|
||||
</p>
|
||||
<p>
|
||||
Note that the media player may be unable to fulfil the request.
|
||||
In this case, the value will not change. If the media player knows in
|
||||
advance that it will not be able to fulfil the request, however, this
|
||||
property should be <strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows clients to choose whether to display controls for entering
|
||||
or exiting fullscreen mode.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanRaise" type="b" tp:name-for-bindings="Can_Raise" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, calling
|
||||
<tp:member-ref>Raise</tp:member-ref> will have no effect, and may
|
||||
raise a NotSupported error. If <strong>true</strong>, calling
|
||||
<tp:member-ref>Raise</tp:member-ref> will cause the media application
|
||||
to attempt to bring its user interface to the front, although it may
|
||||
be prevented from doing so (by the window manager, for example).
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="HasTrackList" type="b" tp:name-for-bindings="Has_TrackList" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Indicates whether the <strong>/org/mpris/MediaPlayer2</strong>
|
||||
object implements the <strong>org.mpris.MediaPlayer2.TrackList</strong>
|
||||
interface.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Identity" type="s" tp:name-for-bindings="Identity" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A friendly name to identify the media player to users.</p>
|
||||
<p>This should usually match the name found in .desktop files</p>
|
||||
<p>(eg: "VLC media player").</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="DesktopEntry" type="s" tp:name-for-bindings="Desktop_Entry" access="read">
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The basename of an installed .desktop file which complies with the <a href="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop entry specification</a>,
|
||||
with the ".desktop" extension stripped.</p>
|
||||
<p>
|
||||
Example: The desktop entry file is "/usr/share/applications/vlc.desktop",
|
||||
and this property contains "vlc"
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="SupportedUriSchemes" type="as" tp:name-for-bindings="Supported_Uri_Schemes" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The URI schemes supported by the media player.
|
||||
</p>
|
||||
<p>
|
||||
This can be viewed as protocols supported by the player in almost
|
||||
all cases. Almost every media player will include support for the
|
||||
"file" scheme. Other common schemes are "http" and "rtsp".
|
||||
</p>
|
||||
<p>
|
||||
Note that URI schemes should be lower-case.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This is important for clients to know when using the editing
|
||||
capabilities of the Playlist interface, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="SupportedMimeTypes" type="as" tp:name-for-bindings="Supported_Mime_Types" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The mime-types supported by the media player.
|
||||
</p>
|
||||
<p>
|
||||
Mime-types should be in the standard format (eg: audio/mpeg or
|
||||
application/ogg).
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This is important for clients to know when using the editing
|
||||
capabilities of the Playlist interface, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
||||
@@ -1,176 +0,0 @@
|
||||
#include "mprisapplication.h"
|
||||
|
||||
#include <QDBusConnection>
|
||||
|
||||
#include "mediaplayer2adaptor.h"
|
||||
#include "playeradaptor.h"
|
||||
|
||||
struct MprisApplicationPrivate {
|
||||
std::unique_ptr<MediaPlayer2Adaptor> adaptor;
|
||||
bool canQuit = false;
|
||||
bool canRaise = false;
|
||||
bool canSetFullscreen = false;
|
||||
QString desktopEntry;
|
||||
bool fullscreen = false;
|
||||
bool hasTrackList = false;
|
||||
QString identity;
|
||||
QStringList supportedMimeTypes;
|
||||
QStringList supportedUriSchemes;
|
||||
};
|
||||
|
||||
MprisApplication::MprisApplication(const QString &appId, QObject *parent)
|
||||
: QObject(parent)
|
||||
, d(std::make_unique<MprisApplicationPrivate>())
|
||||
{
|
||||
d->adaptor = std::make_unique<MediaPlayer2Adaptor>(this);
|
||||
QDBusConnection::sessionBus().registerService(QStringLiteral("org.mpris.MediaPlayer2.") + appId);
|
||||
if (!QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/mpris/MediaPlayer2"), this)) {
|
||||
qWarning() << "Failed to register MPRIS interface";
|
||||
}
|
||||
}
|
||||
|
||||
MprisApplication::~MprisApplication() = default;
|
||||
|
||||
bool MprisApplication::canQuit() const
|
||||
{
|
||||
return d->canQuit;
|
||||
}
|
||||
|
||||
void MprisApplication::setCanQuit(bool canQuit)
|
||||
{
|
||||
if (d->canQuit == canQuit) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->canQuit = canQuit;
|
||||
Q_EMIT canQuitChanged();
|
||||
}
|
||||
|
||||
bool MprisApplication::canRaise() const
|
||||
{
|
||||
return d->canRaise;
|
||||
}
|
||||
|
||||
void MprisApplication::setCanRaise(bool canRaise)
|
||||
{
|
||||
if (d->canRaise == canRaise) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->canRaise = canRaise;
|
||||
Q_EMIT canRaiseChanged();
|
||||
}
|
||||
|
||||
bool MprisApplication::canSetFullscreen() const
|
||||
{
|
||||
return d->canSetFullscreen;
|
||||
}
|
||||
|
||||
void MprisApplication::setCanSetFullscreen(bool can)
|
||||
{
|
||||
if (d->canSetFullscreen == can) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->canSetFullscreen = can;
|
||||
Q_EMIT canSetFullscreenChanged();
|
||||
}
|
||||
|
||||
QString MprisApplication::desktopEntry() const
|
||||
{
|
||||
return d->desktopEntry;
|
||||
}
|
||||
|
||||
void MprisApplication::setDesktopEntry(const QString &entry)
|
||||
{
|
||||
if (d->desktopEntry == entry) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->desktopEntry = entry;
|
||||
Q_EMIT desktopEntryChanged();
|
||||
}
|
||||
|
||||
bool MprisApplication::fullscreen() const
|
||||
{
|
||||
return d->fullscreen;
|
||||
}
|
||||
|
||||
void MprisApplication::setFullscreen(bool value)
|
||||
{
|
||||
if (d->fullscreen == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->fullscreen = value;
|
||||
Q_EMIT fullscreenChanged();
|
||||
}
|
||||
|
||||
bool MprisApplication::hasTrackList() const
|
||||
{
|
||||
return d->hasTrackList;
|
||||
}
|
||||
|
||||
void MprisApplication::setHasTrackList(bool has)
|
||||
{
|
||||
if (d->hasTrackList == has) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->hasTrackList = has;
|
||||
Q_EMIT hasTrackListChanged();
|
||||
}
|
||||
|
||||
QString MprisApplication::identity() const
|
||||
{
|
||||
return d->identity;
|
||||
}
|
||||
|
||||
void MprisApplication::setIdentity(const QString &appName)
|
||||
{
|
||||
if (d->identity == appName) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->identity = appName;
|
||||
Q_EMIT identityChanged();
|
||||
}
|
||||
|
||||
QStringList MprisApplication::supportedMimeTypes() const
|
||||
{
|
||||
return d->supportedMimeTypes;
|
||||
}
|
||||
|
||||
void MprisApplication::setSupportedMimeTypes(const QStringList &types) {
|
||||
if (d->supportedMimeTypes == types) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->supportedMimeTypes = types;
|
||||
Q_EMIT supportedMimeTypesChanged();
|
||||
}
|
||||
|
||||
QStringList MprisApplication::supportedUriSchemes() const
|
||||
{
|
||||
return d->supportedUriSchemes;
|
||||
}
|
||||
|
||||
void MprisApplication::setSupportedUriSchemes(const QStringList &schemes)
|
||||
{
|
||||
if (d->supportedUriSchemes == schemes) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->supportedMimeTypes = schemes;
|
||||
Q_EMIT supportedUriSchemesChanged();
|
||||
}
|
||||
|
||||
void MprisApplication::Quit()
|
||||
{
|
||||
Q_EMIT quitRequested();
|
||||
}
|
||||
|
||||
void MprisApplication::Raise()
|
||||
{
|
||||
Q_EMIT raiseRequested();
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
#ifndef MPRISAPPLICATION_H
|
||||
#define MPRISAPPLICATION_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <memory>
|
||||
|
||||
struct MprisApplicationPrivate;
|
||||
|
||||
class MprisApplication : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
// DBus property names
|
||||
Q_PROPERTY(bool CanQuit READ canQuit NOTIFY canQuitChanged)
|
||||
Q_PROPERTY(bool CanRaise READ canRaise NOTIFY canRaiseChanged)
|
||||
Q_PROPERTY(bool CanSetFullscreen READ canSetFullscreen NOTIFY canSetFullscreenChanged)
|
||||
Q_PROPERTY(QString DesktopEntry READ desktopEntry NOTIFY desktopEntryChanged)
|
||||
Q_PROPERTY(bool Fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged)
|
||||
Q_PROPERTY(bool HasTrackList READ hasTrackList NOTIFY hasTrackListChanged)
|
||||
Q_PROPERTY(QString Identity READ identity NOTIFY identityChanged)
|
||||
Q_PROPERTY(QStringList SupportedMimeTypes READ supportedMimeTypes NOTIFY supportedMimeTypesChanged)
|
||||
Q_PROPERTY(QStringList SupportedUriSchemes READ supportedUriSchemes NOTIFY supportedUriSchemes)
|
||||
|
||||
// QML property names
|
||||
Q_PROPERTY(bool canQuit READ canQuit WRITE setCanQuit NOTIFY canQuitChanged)
|
||||
Q_PROPERTY(bool canRaise READ canRaise WRITE setCanRaise NOTIFY canRaiseChanged)
|
||||
Q_PROPERTY(bool canSetFullscreen READ canSetFullscreen NOTIFY canSetFullscreenChanged)
|
||||
Q_PROPERTY(QString desktopEntry READ desktopEntry NOTIFY desktopEntryChanged)
|
||||
Q_PROPERTY(bool fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged)
|
||||
Q_PROPERTY(bool hasTrackList READ hasTrackList NOTIFY hasTrackListChanged)
|
||||
Q_PROPERTY(QString identity READ identity NOTIFY identityChanged)
|
||||
Q_PROPERTY(QStringList supportedMimeTypes READ supportedMimeTypes NOTIFY supportedMimeTypesChanged)
|
||||
Q_PROPERTY(QStringList supportedUriSchemes READ supportedUriSchemes NOTIFY supportedUriSchemes)
|
||||
|
||||
friend class MediaPlayer2Adaptor;
|
||||
|
||||
public:
|
||||
explicit MprisApplication(const QString &appId, QObject *parent = nullptr);
|
||||
~MprisApplication();
|
||||
|
||||
bool canQuit() const;
|
||||
void setCanQuit(bool canQuit);
|
||||
Q_SIGNAL void canQuitChanged();
|
||||
|
||||
bool canRaise() const;
|
||||
void setCanRaise(bool canRaise);
|
||||
Q_SIGNAL void canRaiseChanged();
|
||||
|
||||
bool canSetFullscreen() const;
|
||||
void setCanSetFullscreen(bool can);
|
||||
Q_SIGNAL void canSetFullscreenChanged();
|
||||
|
||||
QString desktopEntry() const;
|
||||
void setDesktopEntry(const QString &entry);
|
||||
Q_SIGNAL void desktopEntryChanged();
|
||||
|
||||
bool fullscreen() const;
|
||||
void setFullscreen(bool value);
|
||||
Q_SIGNAL void fullscreenChanged();
|
||||
|
||||
bool hasTrackList() const;
|
||||
void setHasTrackList(bool has);
|
||||
Q_SIGNAL void hasTrackListChanged();
|
||||
|
||||
QString identity() const;
|
||||
void setIdentity(const QString &appName);
|
||||
Q_SIGNAL void identityChanged();
|
||||
|
||||
QStringList supportedMimeTypes() const;
|
||||
void setSupportedMimeTypes(const QStringList &types);
|
||||
Q_SIGNAL void supportedMimeTypesChanged();
|
||||
|
||||
QStringList supportedUriSchemes() const;
|
||||
void setSupportedUriSchemes(const QStringList &schemes);
|
||||
Q_SIGNAL void supportedUriSchemesChanged();
|
||||
|
||||
protected:
|
||||
void Quit();
|
||||
void Raise();
|
||||
|
||||
Q_SIGNALS:
|
||||
void quitRequested();
|
||||
void raiseRequested();
|
||||
|
||||
private:
|
||||
std::unique_ptr<MprisApplicationPrivate> d;
|
||||
};
|
||||
|
||||
#endif // MPRISAPPLICATION_H
|
||||
@@ -1,60 +0,0 @@
|
||||
#include "mprisplayer.h"
|
||||
|
||||
#include <playeradaptor.h>
|
||||
|
||||
MprisPlayer::MprisPlayer(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_adaptor(std::make_unique<PlayerAdaptor>(this))
|
||||
{
|
||||
QDBusConnection::sessionBus().registerService(QStringLiteral("org.mpris.MediaPlayer2.") + "audiotube");
|
||||
if (!QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/mpris/MediaPlayer2"), this)) {
|
||||
qWarning() << "Failed to register MPRIS interface";
|
||||
}
|
||||
}
|
||||
|
||||
void MprisPlayer::Next()
|
||||
{
|
||||
Q_EMIT nextRequested();
|
||||
}
|
||||
|
||||
void MprisPlayer::OpenUri(const QString &uri)
|
||||
{
|
||||
Q_EMIT openUriRequested(uri);
|
||||
}
|
||||
|
||||
void MprisPlayer::Pause()
|
||||
{
|
||||
Q_EMIT pauseRequested();
|
||||
}
|
||||
|
||||
void MprisPlayer::Play()
|
||||
{
|
||||
Q_EMIT playRequested();
|
||||
}
|
||||
|
||||
void MprisPlayer::PlayPause()
|
||||
{
|
||||
Q_EMIT playPauseRequested();
|
||||
}
|
||||
|
||||
void MprisPlayer::Previous()
|
||||
{
|
||||
Q_EMIT previousRequested();
|
||||
}
|
||||
|
||||
void MprisPlayer::Seek(qlonglong offset)
|
||||
{
|
||||
Q_EMIT seekRequested(offset);
|
||||
}
|
||||
|
||||
void MprisPlayer::SetPosition(const QDBusObjectPath &trackId, qlonglong position)
|
||||
{
|
||||
Q_EMIT setPositionRequested(MprisTrack {}, position); // TODO write MprisTrack class
|
||||
}
|
||||
|
||||
void MprisPlayer::Stop()
|
||||
{
|
||||
Q_EMIT stopRequested();
|
||||
}
|
||||
|
||||
MprisPlayer::~MprisPlayer() = default;
|
||||
@@ -1,59 +0,0 @@
|
||||
#ifndef MPRISPLAYER_H
|
||||
#define MPRISPLAYER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class PlayerAdaptor;
|
||||
class QDBusObjectPath;
|
||||
class MprisTrack {};
|
||||
|
||||
class MprisPlayer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class PlayerAdaptor;
|
||||
|
||||
public:
|
||||
explicit MprisPlayer(QObject *parent = nullptr);
|
||||
~MprisPlayer();
|
||||
|
||||
void setCanQuit(bool canQuit);
|
||||
void setCanRaise(bool canRaise);
|
||||
void setCanSetFullscreen(bool canSetFullscreen);
|
||||
void setDesktopEntry(const QString &entry);
|
||||
void setFullscreen(bool fullscreen);
|
||||
void setHasTrackList(bool hasTrackList);
|
||||
void setIdentity(const QString &playerName);
|
||||
void setSupportedMimeTypes(const QStringList &mimeTypes);
|
||||
void setSupportedUriSchemes(const QStringList &uriSchemes);
|
||||
|
||||
protected:
|
||||
void Next();
|
||||
void OpenUri(const QString &uri);
|
||||
void Pause();
|
||||
void Play();
|
||||
void PlayPause();
|
||||
void Previous();
|
||||
void Seek(qlonglong offset);
|
||||
void SetPosition(const QDBusObjectPath &trackId, qlonglong position);
|
||||
void Stop();
|
||||
|
||||
Q_SIGNALS:
|
||||
void nextRequested();
|
||||
void openUriRequested(const QString &uri);
|
||||
void pauseRequested();
|
||||
void playRequested();
|
||||
void playPauseRequested();
|
||||
void previousRequested();
|
||||
void seekRequested(qlonglong offset);
|
||||
void setPositionRequested(const MprisTrack &track, qlonglong position);
|
||||
void stopRequested();
|
||||
|
||||
private:
|
||||
std::unique_ptr<PlayerAdaptor> m_adaptor;
|
||||
};
|
||||
|
||||
#endif // MPRISPLAYER_H
|
||||
+49
-52
@@ -6,71 +6,68 @@
|
||||
|
||||
#include <variant>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
#include <span>
|
||||
#include <QtGlobal>
|
||||
|
||||
// MultiIterableView is usually used on a small number of vectors.
|
||||
// The number is already known, so we can convert this into an if else if else etc tree
|
||||
// instead of recursively calling the function
|
||||
#ifdef __GNUC__
|
||||
#define REMOVE_RECURSION __attribute__((always_inline))
|
||||
#else
|
||||
#define REMOVE_RECURSION
|
||||
#endif
|
||||
template <typename Tuple, typename Func, std::size_t i>
|
||||
inline constexpr void iterate_impl(Tuple &tup, Func fun)
|
||||
{
|
||||
if constexpr(i >= std::tuple_size_v<std::decay_t<decltype(tup)>>) {
|
||||
return;
|
||||
} else {
|
||||
fun(std::get<i>(tup));
|
||||
return iterate_impl<Tuple, Func, i + 1>(tup, fun);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Tuple, typename Func>
|
||||
inline constexpr void iterate_tuple(Tuple &tup, Func fun)
|
||||
{
|
||||
iterate_impl<Tuple, Func, 0>(tup, fun);
|
||||
}
|
||||
|
||||
/// MultiIterableView is a view over multiple contigous memory arrays, like std::vector or std::array.
|
||||
/// The elements of the arrays do not need to be of the same type.
|
||||
template <typename... Arguments>
|
||||
class MultiIterableView {
|
||||
private:
|
||||
template<typename T, size_t i, size_t len>
|
||||
REMOVE_RECURSION inline size_t count(const T &tuple, int initial_size = 0) const {
|
||||
if constexpr(i < len) {
|
||||
return count<T, i + 1, len>(tuple, initial_size + std::get<i>(tuple).size());
|
||||
} else {
|
||||
return initial_size;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, size_t tuple_i, size_t tuple_len>
|
||||
REMOVE_RECURSION inline std::variant<Arguments...> get_item(const T &tuple, size_t i) const {
|
||||
if constexpr(tuple_i < tuple_len) {
|
||||
if (i < std::get<tuple_i>(tuple).size()) {
|
||||
return std::get<tuple_i>(tuple)[i];
|
||||
} else {
|
||||
return get_item<T, tuple_i + 1, tuple_len>(tuple, i - std::get<tuple_i>(tuple).size());
|
||||
}
|
||||
} else {
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, size_t i, size_t len>
|
||||
REMOVE_RECURSION inline bool everything_empty(const T &tuple, bool initial_state = true) const {
|
||||
if constexpr(i < len) {
|
||||
return everything_empty<T, i + 1, len>(tuple, initial_state && std::get<i>(tuple).empty());
|
||||
} else {
|
||||
return initial_state;
|
||||
}
|
||||
}
|
||||
public:
|
||||
explicit MultiIterableView(const std::vector<Arguments> &...lists)
|
||||
: m_vectors(std::make_tuple(lists...))
|
||||
explicit MultiIterableView(std::span<Arguments>... lists)
|
||||
: m_vectors(std::forward_as_tuple(lists...))
|
||||
{
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
constexpr size_t nvecs = std::tuple_size_v<decltype(m_vectors)>;
|
||||
return count<decltype(m_vectors), 0, nvecs>(m_vectors);
|
||||
explicit MultiIterableView(std::vector<Arguments> &...lists)
|
||||
: MultiIterableView(std::span{lists}...)
|
||||
{
|
||||
}
|
||||
|
||||
std::variant<Arguments...> operator[](size_t i) const {
|
||||
constexpr size_t nvecs = std::tuple_size_v<decltype(m_vectors)>;
|
||||
return get_item<decltype(m_vectors), 0, nvecs>(m_vectors, i);
|
||||
[[nodiscard]] constexpr size_t size() const {
|
||||
size_t s = 0;
|
||||
iterate_tuple(m_vectors, [&](auto &vec) {
|
||||
s += vec.size();
|
||||
});
|
||||
return s;
|
||||
}
|
||||
|
||||
bool empty() const {
|
||||
constexpr size_t nvecs = std::tuple_size_v<decltype(m_vectors)>;
|
||||
return everything_empty<decltype(m_vectors), 0, nvecs>(m_vectors);
|
||||
[[nodiscard]] constexpr std::variant<Arguments...> operator[](size_t i) const {
|
||||
size_t s = 0;
|
||||
std::variant<Arguments...> out;
|
||||
iterate_tuple(m_vectors, [&](auto &vec) {
|
||||
if (i >= s && i < s + vec.size()) {
|
||||
out = vec[i - s];
|
||||
}
|
||||
s += vec.size();
|
||||
});
|
||||
return out;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr bool empty() const {
|
||||
bool empty = true;
|
||||
iterate_tuple(m_vectors, [&](auto &elem) {
|
||||
empty &= elem.empty();
|
||||
});
|
||||
return empty;
|
||||
}
|
||||
private:
|
||||
std::tuple<std::vector<Arguments>...> m_vectors;
|
||||
std::tuple<std::span<Arguments>...> m_vectors;
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
// SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#include "playerutils.h"
|
||||
|
||||
PlayerUtils::PlayerUtils(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString PlayerUtils::formatTimestamp(quint64 stamp)
|
||||
{
|
||||
return m_format.formatDuration(stamp, KFormat::FoldHours);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <KFormat>
|
||||
|
||||
class PlayerUtils : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PlayerUtils(QObject *parent = nullptr);
|
||||
|
||||
Q_INVOKABLE QString formatTimestamp(quint64 stamp);
|
||||
|
||||
private:
|
||||
KFormat m_format;
|
||||
};
|
||||
|
||||
+13
-24
@@ -11,21 +11,21 @@
|
||||
#include "playlistutils.h"
|
||||
|
||||
PlaylistModel::PlaylistModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
: AbstractYTMusicModel(parent)
|
||||
{
|
||||
connect(this, &PlaylistModel::playlistIdChanged, this, [=] {
|
||||
connect(this, &PlaylistModel::playlistIdChanged, this, [=, this] {
|
||||
setLoading(true);
|
||||
YTMusicThread::instance()->fetchPlaylist(m_playlistId);
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::fetchPlaylistFinished, this, [=](const playlist::Playlist &playlist) {
|
||||
setLoading(false);
|
||||
beginResetModel();
|
||||
m_playlist = playlist;
|
||||
std::sort(m_playlist.thumbnails.begin(), m_playlist.thumbnails.end());
|
||||
endResetModel();
|
||||
auto future = YTMusicThread::instance()->fetchPlaylist(m_playlistId);
|
||||
connectFuture(future, this, [=, this](const playlist::Playlist &playlist) {
|
||||
setLoading(false);
|
||||
beginResetModel();
|
||||
m_playlist = playlist;
|
||||
std::sort(m_playlist.thumbnails.begin(), m_playlist.thumbnails.end());
|
||||
endResetModel();
|
||||
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT thumbnailUrlChanged();
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT thumbnailUrlChanged();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
||||
case Title:
|
||||
return QString::fromStdString(m_playlist.tracks[index.row()].title);
|
||||
case Artists:
|
||||
return PlaylistUtils::artistsToString(m_playlist.tracks[index.row()].artists);
|
||||
return QVariant::fromValue(m_playlist.tracks[index.row()].artists);
|
||||
case VideoId:
|
||||
if (m_playlist.tracks[index.row()].video_id) {
|
||||
return QString::fromStdString(*m_playlist.tracks[index.row()].video_id);
|
||||
@@ -76,17 +76,6 @@ void PlaylistModel::setPlaylistId(const QString &playlistId)
|
||||
Q_EMIT playlistIdChanged();
|
||||
}
|
||||
|
||||
bool PlaylistModel::loading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void PlaylistModel::setLoading(bool loading)
|
||||
{
|
||||
m_loading = loading;
|
||||
Q_EMIT loadingChanged();
|
||||
}
|
||||
|
||||
QUrl PlaylistModel::thumbnailUrl() const
|
||||
{
|
||||
if (m_playlist.thumbnails.empty()) {
|
||||
|
||||
+3
-7
@@ -7,7 +7,9 @@
|
||||
#include <QAbstractListModel>
|
||||
#include <ytmusic.h>
|
||||
|
||||
class PlaylistModel : public QAbstractListModel
|
||||
#include "abstractytmusicmodel.h"
|
||||
|
||||
class PlaylistModel : public AbstractYTMusicModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -15,7 +17,6 @@ class PlaylistModel : public QAbstractListModel
|
||||
Q_PROPERTY(QString playlistId READ playlistId WRITE setPlaylistId NOTIFY playlistIdChanged REQUIRED)
|
||||
|
||||
// output
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
Q_PROPERTY(QUrl thumbnailUrl READ thumbnailUrl NOTIFY thumbnailUrlChanged)
|
||||
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
|
||||
|
||||
@@ -36,10 +37,6 @@ public:
|
||||
void setPlaylistId(const QString &playlistId);
|
||||
Q_SIGNAL void playlistIdChanged();
|
||||
|
||||
bool loading() const;
|
||||
void setLoading(bool loading);
|
||||
Q_SIGNAL void loadingChanged();
|
||||
|
||||
QUrl thumbnailUrl() const;
|
||||
Q_SIGNAL void thumbnailUrlChanged();
|
||||
|
||||
@@ -48,7 +45,6 @@ public:
|
||||
|
||||
private:
|
||||
QString m_playlistId;
|
||||
bool m_loading = false;
|
||||
|
||||
playlist::Playlist m_playlist {};
|
||||
};
|
||||
+10
-5
@@ -10,15 +10,20 @@
|
||||
|
||||
#include <ytmusic.h>
|
||||
|
||||
QString PlaylistUtils::artistsToString(const std::vector<meta::Artist> &artists)
|
||||
namespace PlaylistUtils {
|
||||
|
||||
QString artistsToString(const std::vector<meta::Artist> &artists)
|
||||
{
|
||||
if (!artists.empty()) {
|
||||
return std::accumulate(artists.begin() + 1, artists.end(),
|
||||
QString::fromStdString(artists.front().name),
|
||||
[](QString &string, const meta::Artist &artist) {
|
||||
return string.append(QStringLiteral(", %1").arg(QString::fromStdString(artist.name)));
|
||||
QString string = QString::fromStdString(artists.front().name);
|
||||
std::for_each(artists.begin() + 1, artists.end(),
|
||||
[&string](const meta::Artist &artist) {
|
||||
string.append(QStringLiteral(", %1").arg(QString::fromStdString(artist.name)));
|
||||
});
|
||||
return string;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
+2
-6
@@ -11,10 +11,6 @@ namespace meta {
|
||||
struct Artist;
|
||||
}
|
||||
|
||||
class PlaylistUtils
|
||||
{
|
||||
public:
|
||||
PlaylistUtils() = delete;
|
||||
|
||||
static QString artistsToString(const std::vector<meta::Artist> &artists);
|
||||
namespace PlaylistUtils {
|
||||
QString artistsToString(const std::vector<meta::Artist> &artists);
|
||||
};
|
||||
@@ -1,3 +1,9 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Jonah Brüchert <[email protected]>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
-->
|
||||
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="main.qml">contents/ui/main.qml</file>
|
||||
@@ -6,5 +12,9 @@
|
||||
<file alias="PlayerFooter.qml">contents/ui/PlayerFooter.qml</file>
|
||||
<file alias="SearchPage.qml">contents/ui/SearchPage.qml</file>
|
||||
<file alias="PlaylistPage.qml">contents/ui/PlaylistPage.qml</file>
|
||||
<file alias="ConfirmationMessage.qml">contents/ui/ConfirmationMessage.qml</file>
|
||||
<file alias="LibraryPage.qml">contents/ui/LibraryPage.qml</file>
|
||||
<file>migrations/2022-05-20-194850_init/down.sql</file>
|
||||
<file>migrations/2022-05-20-194850_init/up.sql</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
+46
-23
@@ -5,9 +5,9 @@
|
||||
#include "searchmodel.h"
|
||||
|
||||
SearchModel::SearchModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
: AbstractYTMusicModel(parent)
|
||||
{
|
||||
connect(this, &SearchModel::searchQueryChanged, this, [=] {
|
||||
connect(this, &SearchModel::searchQueryChanged, this, [this] {
|
||||
if (m_searchQuery.isEmpty()) {
|
||||
beginResetModel();
|
||||
m_searchResults.clear();
|
||||
@@ -16,15 +16,15 @@ SearchModel::SearchModel(QObject *parent)
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
YTMusicThread::instance()->search(m_searchQuery);
|
||||
auto future = YTMusicThread::instance()->search(m_searchQuery);
|
||||
connectFuture(future, this, [=, this](const std::vector<search::SearchResultItem> &results) {
|
||||
beginResetModel();
|
||||
setLoading(false);
|
||||
m_searchResults = results;
|
||||
endResetModel();
|
||||
});
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::searchFinished, this, [=](const std::vector<search::SearchResultItem> &results) {
|
||||
beginResetModel();
|
||||
setLoading(false);
|
||||
m_searchResults = results;
|
||||
endResetModel();
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [=] {
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [this] {
|
||||
setLoading(false);
|
||||
});
|
||||
}
|
||||
@@ -105,6 +105,18 @@ QVariant SearchModel::data(const QModelIndex &index, int role) const
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
}, m_searchResults.at(index.row())));
|
||||
case RadioPlaylistId:
|
||||
return std::visit([&](auto &&arg) {
|
||||
using T = std::decay_t<decltype(arg)>;
|
||||
|
||||
if constexpr (std::is_same_v<T, search::Artist>) {
|
||||
if (arg.radio_id) {
|
||||
return QString::fromStdString(*arg.radio_id);
|
||||
}
|
||||
}
|
||||
|
||||
return QString();
|
||||
}, m_searchResults.at(index.row()));
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
@@ -118,7 +130,8 @@ QHash<int, QByteArray> SearchModel::roleNames() const
|
||||
{Title, "title"},
|
||||
{Type, "type"},
|
||||
{VideoId, "videoId"},
|
||||
{Artists, "artists"}
|
||||
{Artists, "artists"},
|
||||
{RadioPlaylistId, "radioPlaylistId"},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -133,17 +146,6 @@ void SearchModel::setSearchQuery(const QString &searchQuery)
|
||||
Q_EMIT searchQueryChanged();
|
||||
}
|
||||
|
||||
bool SearchModel::loading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void SearchModel::setLoading(bool loading)
|
||||
{
|
||||
m_loading = loading;
|
||||
Q_EMIT loadingChanged();
|
||||
}
|
||||
|
||||
void SearchModel::triggerItem(int row)
|
||||
{
|
||||
std::visit([&](auto&& arg) {
|
||||
@@ -157,9 +159,30 @@ void SearchModel::triggerItem(int row)
|
||||
} else if constexpr (std::is_same_v<T, search::Song>) {
|
||||
Q_EMIT openSong(QString::fromStdString(arg.video_id));
|
||||
} else if constexpr (std::is_same_v<T, search::Video>) {
|
||||
Q_EMIT openVideo(QString::fromStdString(arg.video_id));
|
||||
Q_EMIT openVideo(QString::fromStdString(arg.video_id), QString::fromStdString(arg.title));
|
||||
} else {
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
}, m_searchResults.at(row));
|
||||
}
|
||||
|
||||
|
||||
int SearchModel::itemType(search::SearchResultItem const &item)
|
||||
{
|
||||
return std::visit([&](auto &&arg) {
|
||||
using T = std::decay_t<decltype(arg)>;
|
||||
if constexpr(std::is_same_v<T, search::Album>) {
|
||||
return SearchModel::Type::Album;
|
||||
} else if constexpr(std::is_same_v<T, search::Artist>) {
|
||||
return SearchModel::Type::Artist;
|
||||
} else if constexpr(std::is_same_v<T, search::Playlist>) {
|
||||
return SearchModel::Type::Playlist;
|
||||
} else if constexpr(std::is_same_v<T, search::Song>) {
|
||||
return SearchModel::Type::Song;
|
||||
} else if constexpr(std::is_same_v<T, search::Video>) {
|
||||
return SearchModel::Type::Video;
|
||||
} else {
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
}, item);
|
||||
}
|
||||
+6
-9
@@ -8,13 +8,13 @@
|
||||
#include <QThread>
|
||||
|
||||
#include "asyncytmusic.h"
|
||||
#include "abstractytmusicmodel.h"
|
||||
|
||||
class SearchModel : public QAbstractListModel
|
||||
class SearchModel : public AbstractYTMusicModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
|
||||
public:
|
||||
enum Type {
|
||||
@@ -30,7 +30,8 @@ public:
|
||||
Title = Qt::UserRole + 1,
|
||||
Type,
|
||||
VideoId,
|
||||
Artists
|
||||
Artists,
|
||||
RadioPlaylistId
|
||||
};
|
||||
|
||||
explicit SearchModel(QObject *parent = nullptr);
|
||||
@@ -43,20 +44,16 @@ public:
|
||||
void setSearchQuery(const QString &searchQuery);
|
||||
Q_SIGNAL void searchQueryChanged();
|
||||
|
||||
bool loading() const;
|
||||
void setLoading(bool loading);
|
||||
Q_SIGNAL void loadingChanged();
|
||||
|
||||
Q_INVOKABLE void triggerItem(int row);
|
||||
|
||||
Q_SIGNAL void openAlbum(const QString &browseId);
|
||||
Q_SIGNAL void openArtist(const QString &browseId);
|
||||
Q_SIGNAL void openPlaylist(const QString &browseId);
|
||||
Q_SIGNAL void openSong(const QString &videoId);
|
||||
Q_SIGNAL void openVideo(const QString &videoId);
|
||||
Q_SIGNAL void openVideo(const QString &videoId, const QString &title);
|
||||
|
||||
private:
|
||||
QString m_searchQuery;
|
||||
std::vector<search::SearchResultItem> m_searchResults;
|
||||
bool m_loading = false;
|
||||
static int itemType(search::SearchResultItem const &item);
|
||||
};
|
||||
+27
-41
@@ -9,31 +9,14 @@
|
||||
#include <random>
|
||||
|
||||
#include <QRandomGenerator>
|
||||
#include <QFutureWatcher>
|
||||
|
||||
#include "playlistutils.h"
|
||||
|
||||
UserPlaylistModel::UserPlaylistModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
, m_mprisApp(QStringLiteral("audiotube"))
|
||||
, m_mprisPlayer()
|
||||
: AbstractYTMusicModel(parent)
|
||||
{
|
||||
connect(this, &UserPlaylistModel::initialVideoIdChanged, this, [=] {
|
||||
if (m_initialVideoId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
YTMusicThread::instance()->fetchWatchPlaylist(m_initialVideoId);
|
||||
});
|
||||
connect(this, &UserPlaylistModel::playlistIdChanged, this, [=] {
|
||||
if (m_playlistId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
YTMusicThread::instance()->fetchWatchPlaylist(std::nullopt, m_playlistId);
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::fetchWatchPlaylistFinished, this, [=](const watch::Playlist &playlist) {
|
||||
auto handleResult = [=, this](const watch::Playlist &playlist) {
|
||||
setLoading(false);
|
||||
|
||||
beginResetModel();
|
||||
@@ -50,14 +33,28 @@ UserPlaylistModel::UserPlaylistModel(QObject *parent)
|
||||
} else {
|
||||
setCurrentVideoId({});
|
||||
}
|
||||
};
|
||||
connect(this, &UserPlaylistModel::initialVideoIdChanged, this, [=, this] {
|
||||
if (m_initialVideoId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
auto future = YTMusicThread::instance()->fetchWatchPlaylist(m_initialVideoId);
|
||||
connectFuture(future, this, handleResult);
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [=] {
|
||||
connect(this, &UserPlaylistModel::playlistIdChanged, this, [=, this] {
|
||||
if (m_playlistId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
auto future = YTMusicThread::instance()->fetchWatchPlaylist(std::nullopt, m_playlistId);
|
||||
connectFuture(future, this, handleResult);;
|
||||
});
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::errorOccurred, this, [this] {
|
||||
setLoading(false);
|
||||
});
|
||||
|
||||
m_mprisApp.setCanQuit(true);
|
||||
m_mprisApp.setDesktopEntry("org.kde.audiotube.desktop");
|
||||
m_mprisApp.setIdentity(QStringLiteral("AudioTube"));
|
||||
}
|
||||
|
||||
int UserPlaylistModel::rowCount(const QModelIndex &parent) const
|
||||
@@ -104,21 +101,10 @@ void UserPlaylistModel::setInitialVideoId(const QString &videoId)
|
||||
Q_EMIT initialVideoIdChanged();
|
||||
}
|
||||
|
||||
bool UserPlaylistModel::loading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void UserPlaylistModel::setLoading(bool loading)
|
||||
{
|
||||
m_loading = loading;
|
||||
Q_EMIT loadingChanged();
|
||||
}
|
||||
|
||||
QString UserPlaylistModel::nextVideoId() const
|
||||
{
|
||||
auto currentTrack = std::find_if(m_playlist.tracks.begin(), m_playlist.tracks.end(),
|
||||
[=](const watch::Playlist::Track &track) {
|
||||
[this](const watch::Playlist::Track &track) {
|
||||
return track.video_id == m_currentVideoId.toStdString();
|
||||
});
|
||||
|
||||
@@ -146,7 +132,7 @@ void UserPlaylistModel::setCurrentVideoId(const QString &videoId)
|
||||
bool UserPlaylistModel::canSkip() const
|
||||
{
|
||||
const auto currentTrackIt = std::find_if(m_playlist.tracks.begin(), m_playlist.tracks.end(),
|
||||
[=](const watch::Playlist::Track &track) {
|
||||
[this](const watch::Playlist::Track &track) {
|
||||
return track.video_id == m_currentVideoId.toStdString();
|
||||
});
|
||||
|
||||
@@ -174,7 +160,7 @@ void UserPlaylistModel::skipTo(const QString &videoId)
|
||||
void UserPlaylistModel::playNext(const QString &videoId, const QString &title, const std::vector<meta::Artist> &artists)
|
||||
{
|
||||
const auto currentIt = std::find_if(m_playlist.tracks.begin(), m_playlist.tracks.end(),
|
||||
[=](const watch::Playlist::Track &track) {
|
||||
[this](const watch::Playlist::Track &track) {
|
||||
return track.video_id == m_currentVideoId.toStdString();
|
||||
});
|
||||
|
||||
@@ -256,7 +242,7 @@ void UserPlaylistModel::shufflePlaylist()
|
||||
// Only shuffle playlist after current track
|
||||
if (!m_currentVideoId.isEmpty()) {
|
||||
const auto currentIt = std::find_if(m_playlist.tracks.begin(), m_playlist.tracks.end(),
|
||||
[=](const watch::Playlist::Track &track) {
|
||||
[this](const watch::Playlist::Track &track) {
|
||||
return track.video_id == m_currentVideoId.toStdString();
|
||||
});
|
||||
|
||||
@@ -274,7 +260,7 @@ void UserPlaylistModel::emitCurrentVideoChanged(const QString &oldVideoId)
|
||||
return track.video_id == oldVideoId.toStdString();
|
||||
});
|
||||
const auto currentVideoIt = std::find_if(m_playlist.tracks.begin(), m_playlist.tracks.end(),
|
||||
[=](const watch::Playlist::Track &track) {
|
||||
[this](const watch::Playlist::Track &track) {
|
||||
return track.video_id == m_currentVideoId.toStdString();
|
||||
});
|
||||
|
||||
|
||||
+2
-12
@@ -7,10 +7,9 @@
|
||||
|
||||
#include <ytmusic.h>
|
||||
|
||||
#include "mprisapplication.h"
|
||||
#include "mprisplayer.h"
|
||||
#include "abstractytmusicmodel.h"
|
||||
|
||||
class UserPlaylistModel : public QAbstractListModel
|
||||
class UserPlaylistModel : public AbstractYTMusicModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -20,7 +19,6 @@ class UserPlaylistModel : public QAbstractListModel
|
||||
Q_PROPERTY(bool shuffle READ shuffle WRITE setShuffle NOTIFY shuffleChanged)
|
||||
|
||||
// output
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
Q_PROPERTY(QString currentVideoId READ currentVideoId NOTIFY currentVideoIdChanged)
|
||||
Q_PROPERTY(bool canSkip READ canSkip NOTIFY canSkipChanged)
|
||||
|
||||
@@ -42,10 +40,6 @@ public:
|
||||
void setInitialVideoId(const QString &videoId);
|
||||
Q_SIGNAL void initialVideoIdChanged();
|
||||
|
||||
bool loading() const;
|
||||
void setLoading(bool loading);
|
||||
Q_SIGNAL void loadingChanged();
|
||||
|
||||
QString nextVideoId() const;
|
||||
|
||||
QString currentVideoId() const;
|
||||
@@ -77,11 +71,7 @@ private:
|
||||
QString m_initialVideoId;
|
||||
QString m_playlistId;
|
||||
QString m_currentVideoId;
|
||||
bool m_loading = false;
|
||||
bool m_shuffle = false;
|
||||
|
||||
watch::Playlist m_playlist;
|
||||
|
||||
MprisApplication m_mprisApp;
|
||||
MprisPlayer m_mprisPlayer;
|
||||
};
|
||||
+24
-23
@@ -4,12 +4,15 @@
|
||||
|
||||
#include "videoinfoextractor.h"
|
||||
|
||||
#include <asyncytmusic.h>
|
||||
#include <QFutureWatcher>
|
||||
|
||||
#include "asyncytmusic.h"
|
||||
#include "library.h"
|
||||
|
||||
VideoInfoExtractor::VideoInfoExtractor(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
connect(this, &VideoInfoExtractor::videoIdChanged, this, [=] {
|
||||
connect(this, &VideoInfoExtractor::videoIdChanged, this, [this] {
|
||||
if (m_videoId.isEmpty()) {
|
||||
m_videoInfo = {};
|
||||
Q_EMIT audioUrlChanged();
|
||||
@@ -20,24 +23,23 @@ VideoInfoExtractor::VideoInfoExtractor(QObject *parent)
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
YTMusicThread::instance()->extractVideoInfo(QString::fromStdString(m_videoId.toStdString()));
|
||||
});
|
||||
|
||||
connect(&YTMusicThread::instance().get(), &AsyncYTMusic::extractVideoInfoFinished, this, [=](const video_info::VideoInfo &info) {
|
||||
m_videoInfo = info;
|
||||
setLoading(false);
|
||||
Q_EMIT audioUrlChanged();
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT songChanged();
|
||||
Q_EMIT thumbnailChanged();
|
||||
auto future = YTMusicThread::instance()->extractVideoInfo(QString::fromStdString(m_videoId.toStdString()));
|
||||
connectFuture(future, this, [this](const video_info::VideoInfo &videoInfo) {
|
||||
m_videoInfo = videoInfo;
|
||||
setLoading(false);
|
||||
Q_EMIT audioUrlChanged();
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT songChanged();
|
||||
Q_EMIT thumbnailChanged();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
QUrl VideoInfoExtractor::audioUrl() const
|
||||
{
|
||||
if (m_videoInfo.formats.empty()) {
|
||||
return QUrl();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<video_info::Format> audioFormats;
|
||||
@@ -49,17 +51,13 @@ QUrl VideoInfoExtractor::audioUrl() const
|
||||
});
|
||||
|
||||
if (audioFormats.empty()) {
|
||||
return QUrl();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
struct {
|
||||
bool operator()(const video_info::Format &a, const video_info::Format &b) {
|
||||
return a.quality > b.quality;
|
||||
}
|
||||
} qualitySort;
|
||||
|
||||
std::sort(audioFormats.begin(), audioFormats.end(), qualitySort);
|
||||
std::sort(audioFormats.begin(), audioFormats.end(),
|
||||
[](const video_info::Format &a, const video_info::Format &b) {
|
||||
return a.quality > b.quality;
|
||||
});
|
||||
|
||||
return QUrl(QString::fromStdString(audioFormats.front().url));
|
||||
}
|
||||
@@ -71,6 +69,9 @@ QString VideoInfoExtractor::videoId() const
|
||||
|
||||
void VideoInfoExtractor::setVideoId(const QString &videoId)
|
||||
{
|
||||
if (m_videoId == videoId || videoId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
m_videoId = videoId;
|
||||
Q_EMIT videoIdChanged();
|
||||
}
|
||||
@@ -82,7 +83,7 @@ QString VideoInfoExtractor::title() const
|
||||
|
||||
QString VideoInfoExtractor::thumbnail() const
|
||||
{
|
||||
return QString::fromStdString(m_videoInfo.thumnnail);
|
||||
return QString::fromStdString(m_videoInfo.thumbnail);
|
||||
}
|
||||
|
||||
bool VideoInfoExtractor::loading() const
|
||||
|
||||
@@ -21,7 +21,7 @@ class VideoInfoExtractor : public QObject
|
||||
Q_PROPERTY(bool loading READ loading WRITE setLoading NOTIFY loadingChanged)
|
||||
|
||||
public:
|
||||
VideoInfoExtractor(QObject *parent = nullptr);
|
||||
explicit VideoInfoExtractor(QObject *parent = nullptr);
|
||||
|
||||
QUrl audioUrl() const;
|
||||
Q_SIGNAL void audioUrlChanged();
|
||||
|
||||
+102
-68
@@ -13,13 +13,54 @@ namespace py = pybind11;
|
||||
|
||||
using namespace py::literals;
|
||||
|
||||
/// Useful for debugging
|
||||
void pyPrintPretty(py::handle obj) {
|
||||
auto json = py::module::import("json");
|
||||
py::print(json.attr("dumps")(obj, "indent"_a=py::int_(4)));
|
||||
}
|
||||
|
||||
#define UNEXPORT __attribute__ ((visibility("hidden")))
|
||||
|
||||
constexpr auto TESTED_YTMUSICAPI_VERSION = "0.16.0";
|
||||
constexpr auto TESTED_YTMUSICAPI_VERSION = "0.21.0";
|
||||
|
||||
struct UNEXPORT YTMusicPrivate {
|
||||
py::scoped_interpreter guard {};
|
||||
py::object ytmusic;
|
||||
|
||||
std::optional<std::string> auth;
|
||||
std::optional<std::string> user;
|
||||
std::optional<bool> requests_session;
|
||||
std::optional<std::map<std::string, std::string> > proxies;
|
||||
std::string language;
|
||||
|
||||
py::object get_ytmusic() {
|
||||
if (ytmusic.is_none()) {
|
||||
const auto module = py::module::import("ytmusicapi");
|
||||
ytmusic = module.attr("YTMusic")(auth, user, requests_session, proxies, language);
|
||||
|
||||
// Some of the called python code randomly fails if the encoding is not utf8
|
||||
setenv("LC_ALL", "en_US.utf8", true);
|
||||
|
||||
const auto version = module.attr("_version").attr("__version__").cast<std::string>();
|
||||
if (version != TESTED_YTMUSICAPI_VERSION) {
|
||||
std::cerr << "Running with untested version of ytmusicapi." << std::endl;
|
||||
std::cerr << "The currently tested and supported version is " << TESTED_YTMUSICAPI_VERSION << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return ytmusic;
|
||||
}
|
||||
|
||||
py::object get_ytdl() {
|
||||
// lazy initialization
|
||||
if (ytdl.is_none()) {
|
||||
ytdl = py::module::import("yt_dlp").attr("YoutubeDL")(py::dict());
|
||||
}
|
||||
|
||||
return ytdl;
|
||||
}
|
||||
|
||||
private:
|
||||
py::object ytmusic = py::none();
|
||||
py::object ytdl = py::none();
|
||||
};
|
||||
|
||||
@@ -29,7 +70,7 @@ std::optional<T> optional_key(py::handle obj, const char *name) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return obj[name].cast<T>();
|
||||
return obj[name].cast<std::optional<T>>();
|
||||
}
|
||||
|
||||
meta::Thumbnail extract_thumbnail(py::handle thumbnail) {
|
||||
@@ -47,31 +88,17 @@ meta::Artist extract_meta_artist(py::handle artist) {
|
||||
};
|
||||
};
|
||||
|
||||
album::Track extract_album_track(py::handle track) {
|
||||
return {
|
||||
track["index"].cast<std::string>(),
|
||||
track["title"].cast<std::string>(),
|
||||
track["artists"].cast<std::string>(),
|
||||
track["videoId"].cast<std::optional<std::string>>(), // E rated songs don't have a videoId
|
||||
track["lengthMs"].cast<std::optional<std::string>>(), //
|
||||
track["likeStatus"].cast<std::optional<std::string>>()
|
||||
};
|
||||
}
|
||||
|
||||
video_info::Format extract_format(py::handle format) {
|
||||
return {
|
||||
optional_key<int>(format, "quality"),
|
||||
format["url"].cast<std::string>(),
|
||||
format["vcodec"].cast<std::string>(),
|
||||
format["acodec"].cast<std::string>()
|
||||
};
|
||||
}
|
||||
|
||||
playlist::Track extract_playlist_track(py::handle track);
|
||||
watch::Playlist::Track extract_watch_track(py::handle track);
|
||||
album::Track extract_album_track(py::handle track);
|
||||
video_info::Format extract_format(py::handle format);
|
||||
|
||||
template <typename T>
|
||||
inline auto extract_py_list(py::handle obj) {
|
||||
if (obj.is_none()) {
|
||||
return std::vector<T>();
|
||||
}
|
||||
|
||||
const auto list = obj.cast<py::list>();
|
||||
std::vector<T> output;
|
||||
|
||||
@@ -96,6 +123,27 @@ inline auto extract_py_list(py::handle obj) {
|
||||
return output;
|
||||
}
|
||||
|
||||
album::Track extract_album_track(py::handle track) {
|
||||
return {
|
||||
track["isExplicit"].cast<bool>(),
|
||||
track["title"].cast<std::string>(),
|
||||
extract_py_list<meta::Artist>(track["artists"]),
|
||||
track["album"].cast<std::optional<std::string>>(),
|
||||
track["videoId"].cast<std::optional<std::string>>(), // E rated songs don't have a videoId
|
||||
track["duration"].cast<std::optional<std::string>>(), //
|
||||
track["likeStatus"].cast<std::optional<std::string>>()
|
||||
};
|
||||
}
|
||||
|
||||
video_info::Format extract_format(py::handle format) {
|
||||
return {
|
||||
optional_key<int>(format, "quality"),
|
||||
format["url"].cast<std::string>(),
|
||||
format["vcodec"].cast<std::string>(),
|
||||
format["acodec"].cast<std::string>()
|
||||
};
|
||||
}
|
||||
|
||||
meta::Album extract_meta_album(py::handle album) {
|
||||
return meta::Album {
|
||||
album["name"].cast<std::string>(),
|
||||
@@ -241,7 +289,7 @@ std::optional<search::SearchResultItem> extract_search_result(py::handle result)
|
||||
result["title"].cast<std::string>(),
|
||||
result["type"].cast<std::string>(),
|
||||
extract_py_list<meta::Artist>(result["artists"]),
|
||||
result["year"].cast<std::string>(),
|
||||
result["year"].cast<std::optional<std::string>>(),
|
||||
result["isExplicit"].cast<bool>()
|
||||
};
|
||||
} else if (resultType == "playlist") {
|
||||
@@ -260,7 +308,8 @@ std::optional<search::SearchResultItem> extract_search_result(py::handle result)
|
||||
};
|
||||
} else {
|
||||
std::cerr << "Warning: Unsupported search result type found" << std::endl;
|
||||
std::cerr << "It's called: " << resultType;
|
||||
std::cerr << "It's called: " << resultType << std::endl;
|
||||
pyPrintPretty(result);
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
@@ -273,16 +322,11 @@ YTMusic::YTMusic(
|
||||
const std::string &language)
|
||||
: d(std::make_unique<YTMusicPrivate>())
|
||||
{
|
||||
const auto module = py::module::import("ytmusicapi");
|
||||
d->ytmusic = module.attr("YTMusic")(auth, user, requests_session, proxies, language);
|
||||
|
||||
setenv("LC_ALL", "en_US.utf8", true);
|
||||
|
||||
const auto version = module.attr("_version").attr("__version__").cast<std::string>();
|
||||
if (version != TESTED_YTMUSICAPI_VERSION) {
|
||||
std::cerr << "Running with untested version of ytmusicapi." << std::endl;
|
||||
std::cerr << "The currently tested and supported version is " << TESTED_YTMUSICAPI_VERSION << std::endl;
|
||||
}
|
||||
d->auth = auth;
|
||||
d->user = user;
|
||||
d->requests_session = requests_session;
|
||||
d->proxies = proxies;
|
||||
d->language = language;
|
||||
}
|
||||
|
||||
YTMusic::~YTMusic() = default;
|
||||
@@ -290,10 +334,11 @@ YTMusic::~YTMusic() = default;
|
||||
std::vector<search::SearchResultItem> YTMusic::search(
|
||||
const std::string &query,
|
||||
const std::optional<std::string> &filter,
|
||||
const std::optional<std::string> &scope,
|
||||
const int limit,
|
||||
const bool ignore_spelling) const
|
||||
{
|
||||
const auto results = d->ytmusic.attr("search")(query, filter, limit, ignore_spelling).cast<py::list>();
|
||||
const auto results = d->get_ytmusic().attr("search")("query"_a=query, "filter"_a=filter, "scope"_a=scope, "limit"_a = limit, "ignore_spelling"_a = ignore_spelling).cast<py::list>();
|
||||
|
||||
std::vector<search::SearchResultItem> output;
|
||||
for (const auto &result : results) {
|
||||
@@ -307,9 +352,9 @@ std::vector<search::SearchResultItem> YTMusic::search(
|
||||
|
||||
artist::Artist YTMusic::get_artist(const std::string &channel_id) const
|
||||
{
|
||||
const auto artist = d->ytmusic.attr("get_artist")(channel_id);
|
||||
const auto artist = d->get_ytmusic().attr("get_artist")(channel_id);
|
||||
return artist::Artist {
|
||||
artist["description"].cast<std::optional<std::string>>(),
|
||||
optional_key<std::string>(artist, "description"),
|
||||
artist["views"].cast<std::optional<std::string>>(),
|
||||
artist["name"].cast<std::string>(),
|
||||
artist["channelId"].cast<std::string>(),
|
||||
@@ -325,32 +370,29 @@ artist::Artist YTMusic::get_artist(const std::string &channel_id) const
|
||||
|
||||
album::Album YTMusic::get_album(const std::string &browseId) const
|
||||
{
|
||||
const auto album = d->ytmusic.attr("get_album")(browseId);
|
||||
|
||||
const auto album = d->get_ytmusic().attr("get_album")(browseId);
|
||||
return {
|
||||
album["title"].cast<std::string>(),
|
||||
album["trackCount"].cast<std::string>(),
|
||||
album["durationMs"].cast<std::string>(),
|
||||
album["playlistId"].cast<std::string>(),
|
||||
[&]() -> album::Album::ReleaseDate {
|
||||
const auto date = album["releaseDate"];
|
||||
return {
|
||||
date["year"].cast<int>(),
|
||||
date["month"].cast<int>(),
|
||||
date["day"].cast<int>()
|
||||
};
|
||||
}(),
|
||||
album["description"].cast<std::string>(),
|
||||
album["trackCount"].cast<int>(),
|
||||
album["duration"].cast<std::string>(),
|
||||
album["audioPlaylistId"].cast<std::string>(),
|
||||
album["year"].cast<std::string>(),
|
||||
optional_key<std::string>(album, "description"),
|
||||
extract_py_list<meta::Thumbnail>(album["thumbnails"]),
|
||||
extract_py_list<album::Track>(album["tracks"])
|
||||
extract_py_list<album::Track>(album["tracks"]),
|
||||
extract_py_list<meta::Artist>(album["artists"])
|
||||
};
|
||||
}
|
||||
|
||||
song::Song YTMusic::get_song(const std::string &video_id) const
|
||||
std::optional<song::Song> YTMusic::get_song(const std::string &video_id) const
|
||||
{
|
||||
const auto song = d->ytmusic.attr("get_song")(video_id);
|
||||
const auto song = d->get_ytmusic().attr("get_song")(video_id);
|
||||
|
||||
return {
|
||||
if (!song.cast<py::dict>().contains("videoId")) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return song::Song {
|
||||
song["videoId"].cast<std::string>(),
|
||||
song["title"].cast<std::string>(),
|
||||
song["lengthSeconds"].cast<std::string>(),
|
||||
@@ -380,7 +422,7 @@ song::Song YTMusic::get_song(const std::string &video_id) const
|
||||
|
||||
playlist::Playlist YTMusic::get_playlist(const std::string &playlist_id, int limit) const
|
||||
{
|
||||
const auto playlist = d->ytmusic.attr("get_playlist")(playlist_id, limit);
|
||||
const auto playlist = d->get_ytmusic().attr("get_playlist")(playlist_id, limit);
|
||||
|
||||
return {
|
||||
playlist["id"].cast<std::string>(),
|
||||
@@ -397,7 +439,7 @@ playlist::Playlist YTMusic::get_playlist(const std::string &playlist_id, int lim
|
||||
|
||||
std::vector<artist::Artist::Album> YTMusic::get_artist_albums(const std::string &channel_id, const std::string ¶ms) const
|
||||
{
|
||||
const auto py_albums = d->ytmusic.attr("get_artist_albums")(channel_id, params);
|
||||
const auto py_albums = d->get_ytmusic().attr("get_artist_albums")(channel_id, params);
|
||||
std::vector<artist::Artist::Album> albums;
|
||||
|
||||
std::transform(py_albums.begin(), py_albums.end(), std::back_inserter(albums), [](py::handle album) {
|
||||
@@ -417,15 +459,7 @@ video_info::VideoInfo YTMusic::extract_video_info(const std::string &video_id) c
|
||||
{
|
||||
using namespace pybind11::literals;
|
||||
|
||||
// lazy initialization
|
||||
if (d->ytdl.is_none()) {
|
||||
const auto module = py::module::import("youtube_dl");
|
||||
py::dict options;
|
||||
d->ytdl = module.attr("YoutubeDL")(options);
|
||||
}
|
||||
|
||||
const auto info = d->ytdl.attr("extract_info")(video_id, "download"_a=py::bool_(false));
|
||||
//py::print(py::module::import("json").attr("dumps")(info, "indent"_a=4));
|
||||
const auto info = d->get_ytdl().attr("extract_info")(video_id, "download"_a=py::bool_(false));
|
||||
|
||||
return {
|
||||
info["id"].cast<std::string>(),
|
||||
@@ -440,7 +474,7 @@ watch::Playlist YTMusic::get_watch_playlist(const std::optional<std::string> &vi
|
||||
int limit,
|
||||
const std::optional<std::string> ¶ms) const
|
||||
{
|
||||
const auto playlist = d->ytmusic.attr("get_watch_playlist")("videoId"_a = videoId,
|
||||
const auto playlist = d->get_ytmusic().attr("get_watch_playlist")("videoId"_a = videoId,
|
||||
"playlistId"_a = playlistId,
|
||||
"limit"_a = py::int_(limit),
|
||||
"params"_a = params);
|
||||
|
||||
+15
-12
@@ -67,7 +67,7 @@ struct Album {
|
||||
std::string title;
|
||||
std::string type;
|
||||
std::vector<meta::Artist> artists;
|
||||
std::string year;
|
||||
std::optional<std::string> year;
|
||||
bool is_explicit;
|
||||
};
|
||||
|
||||
@@ -122,7 +122,7 @@ struct Artist {
|
||||
|
||||
struct Single {
|
||||
std::string title;
|
||||
std::vector<meta::Thumbnail> thumnnails;
|
||||
std::vector<meta::Thumbnail> thumbnails;
|
||||
std::string year;
|
||||
std::string browse_id;
|
||||
};
|
||||
@@ -143,11 +143,12 @@ struct Artist {
|
||||
|
||||
namespace album {
|
||||
struct Track {
|
||||
std::string index;
|
||||
bool is_explicit;
|
||||
std::string title;
|
||||
std::string artists;
|
||||
std::vector<meta::Artist> artists;
|
||||
std::optional<std::string> album;
|
||||
std::optional<std::string> video_id;
|
||||
std::optional<std::string> length_ms;
|
||||
std::optional<std::string> duration;
|
||||
std::optional<std::string> like_status;
|
||||
};
|
||||
|
||||
@@ -159,13 +160,14 @@ namespace album {
|
||||
};
|
||||
|
||||
std::string title;
|
||||
std::string track_count;
|
||||
std::string duration_ms;
|
||||
std::string playlist_id;
|
||||
ReleaseDate release_date;
|
||||
std::string description;
|
||||
int track_count;
|
||||
std::string duration;
|
||||
std::string audio_playlist_id;
|
||||
std::string year;
|
||||
std::optional<std::string> description;
|
||||
std::vector<meta::Thumbnail> thumbnails;
|
||||
std::vector<Track> tracks;
|
||||
std::vector<meta::Artist> artists;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -240,7 +242,7 @@ struct VideoInfo {
|
||||
std::string id;
|
||||
std::string title;
|
||||
std::vector<Format> formats;
|
||||
std::string thumnnail;
|
||||
std::string thumbnail;
|
||||
|
||||
// More, but not interesting for us right now
|
||||
};
|
||||
@@ -277,6 +279,7 @@ public:
|
||||
|
||||
std::vector<search::SearchResultItem> search(const std::string &query,
|
||||
const std::optional<std::string> &filter = std::nullopt,
|
||||
const std::optional<std::string> &scope = std::nullopt,
|
||||
const int limit = 20,
|
||||
const bool ignore_spelling = false) const;
|
||||
|
||||
@@ -287,7 +290,7 @@ public:
|
||||
album::Album get_album(const std::string &browse_id) const;
|
||||
|
||||
/// https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.get_song
|
||||
song::Song get_song(const std::string &video_id) const;
|
||||
std::optional<song::Song> get_song(const std::string &video_id) const;
|
||||
|
||||
/// https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.get_playlist
|
||||
playlist::Playlist get_playlist(const std::string &playlist_id, int limit = 100) const;
|
||||
|
||||
Reference in new issue
Block a user