</message>
<message numerus="yes">
<source>%n year(s) ago</source>
- <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+ <translation><numerusform>Fa %n any(s)</numerusform><numerusform>Fa %n any(s)</numerusform></translation>
</message>
</context>
<context>
</message>
<message>
<source>Rewind %1 seconds</source>
- <translation type="unfinished"/>
+ <translation>Rebobina %1 segons</translation>
</message>
<message>
<source>Fast forward %1 seconds</source>
- <translation type="unfinished"/>
+ <translation>Avança %1 segons</translation>
</message>
<message>
<source>channel</source>
- <translation type="unfinished"/>
+ <translation>canal</translation>
</message>
</context>
<context>
</message>
<message>
<source>This year</source>
- <translation type="unfinished"/>
+ <translation>Aquest any</translation>
</message>
<message>
<source>HD</source>
- <translation type="unfinished"/>
+ <translation>HD</translation>
</message>
<message>
<source>4K</source>
- <translation type="unfinished"/>
+ <translation>4K</translation>
</message>
<message>
<source>HDR</source>
- <translation type="unfinished"/>
+ <translation>HDR</translation>
</message>
</context>
<context>
</message>
<message>
<source>Remove</source>
- <translation type="unfinished"/>
+ <translation>Suprimeix</translation>
</message>
<message>
<source>Need a remote control for %1? Try %2!</source>
- <translation type="unfinished"/>
+ <translation>Necessiteu un comandament remot per a %1? Proveu %2!</translation>
</message>
<message>
<source>I keep improving %1 to make it the best I can. Support this work!</source>
- <translation type="unfinished"/>
+ <translation>L'aplicació %1 sempre està millorant constantment. Ajudeu-nos amb la nostra tasca!</translation>
</message>
<message>
<source>An update is ready to be installed. Quit and install update.</source>
- <translation type="unfinished"/>
+ <translation>Una actualització està disponible per ser instal·lada. sortiu de l'aplicació i actualitzeu.</translation>
</message>
</context>
<context>
</message>
<message>
<source>Trending</source>
- <translation type="unfinished"/>
+ <translation>Tendències</translation>
</message>
<message>
<source>Music</source>
- <translation type="unfinished"/>
+ <translation>Música</translation>
</message>
<message>
<source>News</source>
- <translation type="unfinished"/>
+ <translation>Novetats</translation>
</message>
<message>
<source>Movies</source>
- <translation type="unfinished"/>
+ <translation>Pel·lícules</translation>
</message>
<message>
<source>Gaming</source>
- <translation type="unfinished"/>
+ <translation>Jocs</translation>
</message>
</context>
<context>
<name>Updater</name>
<message>
<source>Check for Updates...</source>
- <translation type="unfinished"/>
+ <translation>S'està comprovant si hi han actualitzacions disponibles...</translation>
</message>
<message>
<source>Version %1 is available...</source>
- <translation type="unfinished"/>
+ <translation>La versió %1 està disponible...</translation>
</message>
<message>
<source>Downloading version %1...</source>
- <translation type="unfinished"/>
+ <translation>S'està baixant la versió %1...</translation>
</message>
<message>
<source>Restart to Update</source>
- <translation type="unfinished"/>
+ <translation>Reinicieu per actualitzar</translation>
</message>
<message>
<source>Version %1 download failed</source>
- <translation type="unfinished"/>
+ <translation>Ha fallat la baixada de la versió %1</translation>
</message>
<message>
<source>Check for Updates</source>
- <translation type="unfinished"/>
+ <translation>Cerca actualitzacions</translation>
</message>
<message>
<source>Download Update</source>
- <translation type="unfinished"/>
+ <translation>Baixa l'actualització</translation>
</message>
<message>
<source>Downloading update...</source>
</message>
<message>
<source>Retry Update Download</source>
- <translation type="unfinished"/>
+ <translation>Prova novament baixar l'actualització</translation>
</message>
<message>
<source>You have the latest version.</source>
- <translation type="unfinished"/>
+ <translation>Teniu la darrera versió.</translation>
</message>
<message>
<source>Version %1 is available.</source>
- <translation type="unfinished"/>
+ <translation>Versió %1 disponible.</translation>
</message>
<message>
<source>An update has been downloaded and is ready to be installed.</source>
- <translation type="unfinished"/>
+ <translation>S'ha baixat una actualització i està preparada per ser instal·lada.</translation>
</message>
</context>
<context>
<name>updater::DefaultUpdater</name>
<message>
<source>There are currently no updates available.</source>
- <translation type="unfinished"/>
+ <translation>No s'ha trobat cap actualització disponible.</translation>
</message>
</context>
<context>
<name>updater::Dialog</name>
<message>
<source>You already have the latest version</source>
- <translation type="unfinished"/>
+ <translation>Ja teniu la darrera versió</translation>
</message>
<message>
<source>Downloading %1 %2...</source>
- <translation type="unfinished"/>
+ <translation>S'està baixant %1 %2...</translation>
</message>
<message>
<source>A new version of %1 is available!</source>
</message>
<message>
<source>Download Update</source>
- <translation type="unfinished"/>
+ <translation>Baixa l'actualització</translation>
</message>
</context>
</TS>
\ No newline at end of file
</message>
<message>
<source>An update is ready to be installed. Quit and install update.</source>
- <translation type="unfinished"/>
+ <translation>Ein Update ist für die Installation bereit. Schließe das Spiel und installiere das Update.</translation>
</message>
</context>
<context>
</message>
<message numerus="yes">
<source>%n year(s) ago</source>
- <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+ <translation><numerusform>Il y a %n an(s)</numerusform><numerusform>Il y a %n an(s)</numerusform></translation>
</message>
</context>
<context>
</message>
<message>
<source>Rewind %1 seconds</source>
- <translation type="unfinished"/>
+ <translation>Rembobiner %1 secondes</translation>
</message>
<message>
<source>Fast forward %1 seconds</source>
- <translation type="unfinished"/>
+ <translation>Avance rapide d e%1 secondes</translation>
</message>
<message>
<source>channel</source>
- <translation type="unfinished"/>
+ <translation>chaîne</translation>
</message>
</context>
<context>
</message>
<message>
<source>This year</source>
- <translation type="unfinished"/>
+ <translation>Cette année</translation>
</message>
<message>
<source>HD</source>
- <translation type="unfinished"/>
+ <translation>HD</translation>
</message>
<message>
<source>4K</source>
- <translation type="unfinished"/>
+ <translation>4K</translation>
</message>
<message>
<source>HDR</source>
- <translation type="unfinished"/>
+ <translation>HDR</translation>
</message>
</context>
<context>
</message>
<message>
<source>Remove</source>
- <translation type="unfinished"/>
+ <translation>Supprimer</translation>
</message>
<message>
<source>Need a remote control for %1? Try %2!</source>
- <translation type="unfinished"/>
+ <translation>Besoin d'une commande à distance pour %1 ? Essayez %2 !</translation>
</message>
<message>
<source>I keep improving %1 to make it the best I can. Support this work!</source>
- <translation type="unfinished"/>
+ <translation>Je continue d’améliorer %1 pour en faire le mieux que je peux. Soutenez ce travail!</translation>
</message>
<message>
<source>An update is ready to be installed. Quit and install update.</source>
- <translation type="unfinished"/>
+ <translation>Une mise à jour est prête à être installée. Quittez et installez la mise à jour.</translation>
</message>
</context>
<context>
</message>
<message>
<source>Trending</source>
- <translation type="unfinished"/>
+ <translation>Tendance</translation>
</message>
<message>
<source>Music</source>
- <translation type="unfinished"/>
+ <translation>Musique</translation>
</message>
<message>
<source>News</source>
- <translation type="unfinished"/>
+ <translation>Journaux</translation>
</message>
<message>
<source>Movies</source>
- <translation type="unfinished"/>
+ <translation>Films</translation>
</message>
<message>
<source>Gaming</source>
- <translation type="unfinished"/>
+ <translation>Jeux</translation>
</message>
</context>
<context>
<name>Updater</name>
<message>
<source>Check for Updates...</source>
- <translation type="unfinished"/>
+ <translation>Vérifier les mises à jour...</translation>
</message>
<message>
<source>Version %1 is available...</source>
- <translation type="unfinished"/>
+ <translation>La version %1 est disponible...</translation>
</message>
<message>
<source>Downloading version %1...</source>
- <translation type="unfinished"/>
+ <translation>Téléchargement de la version %1...</translation>
</message>
<message>
<source>Restart to Update</source>
- <translation type="unfinished"/>
+ <translation>Redémarrez pour mettre à jour</translation>
</message>
<message>
<source>Version %1 download failed</source>
- <translation type="unfinished"/>
+ <translation>Le téléchargement de la version %1 a échoué</translation>
</message>
<message>
<source>Check for Updates</source>
- <translation type="unfinished"/>
+ <translation>Vérifier les mises à jour</translation>
</message>
<message>
<source>Download Update</source>
- <translation type="unfinished"/>
+ <translation>Télécharger la mise à jour</translation>
</message>
<message>
<source>Downloading update...</source>
</message>
<message>
<source>Retry Update Download</source>
- <translation type="unfinished"/>
+ <translation>Réessayer de télécharger la mise à jour</translation>
</message>
<message>
<source>You have the latest version.</source>
- <translation type="unfinished"/>
+ <translation>Vous avez la dernière version</translation>
</message>
<message>
<source>Version %1 is available.</source>
- <translation type="unfinished"/>
+ <translation>La version %1 est disponible.</translation>
</message>
<message>
<source>An update has been downloaded and is ready to be installed.</source>
- <translation type="unfinished"/>
+ <translation>Une mise à jour a été téléchargée et est prête à être installée.</translation>
</message>
</context>
<context>
<name>updater::DefaultUpdater</name>
<message>
<source>There are currently no updates available.</source>
- <translation type="unfinished"/>
+ <translation>Il n'y a actuellement aucune mise à jour disponible.</translation>
</message>
</context>
<context>
<name>updater::Dialog</name>
<message>
<source>You already have the latest version</source>
- <translation type="unfinished"/>
+ <translation>Vous avez déjà la dernière version</translation>
</message>
<message>
<source>Downloading %1 %2...</source>
- <translation type="unfinished"/>
+ <translation>Téléchargement de %1 %2...</translation>
</message>
<message>
<source>A new version of %1 is available!</source>
</message>
<message>
<source>Download Update</source>
- <translation type="unfinished"/>
+ <translation>Télécharger la mise à jour</translation>
</message>
</context>
</TS>
\ No newline at end of file
CONFIG += c++17 exceptions_off rtti_off object_parallel_to_source
TEMPLATE = app
-VERSION = 3.8
+VERSION = 3.8.1
DEFINES += APP_VERSION="$$VERSION"
APP_NAME = Minitube
layout->addLayout(buttonLayout);
+#ifndef APP_WIN_STORE
verticalLayout->addWidget(new AppsWidget());
+#endif
}
void AboutView::appear() {
}
void SearchVideoSource::connectSource(int max, int startIndex) {
+ connect(source, &VideoSource::nameChanged, this, &VideoSource::nameChanged);
connect(source, &VideoSource::finished, this, &VideoSource::finished);
connect(source, &VideoSource::gotVideos, this, [this](auto &videos) {
if (aborted) return;
.onJson([this](auto &doc) {
auto obj = doc.object();
- qDebug() << doc.toJson();
-
continuation = obj["continuation"].toString();
const auto items = obj["items"].toArray();
QString channelName = i["author"].toString();
if (channelName != name) {
- this->name = channelName;
+ name = channelName;
emit nameChanged(name);
}
video->setChannelTitle(channelName);
auto obj = doc.object();
// qDebug() << doc.toJson();
- const auto items = obj["related_videos"].toArray();
- QVector<Video *> videos;
- videos.reserve(items.size());
-
- for (const auto &i : items) {
+ auto parseVideoObject = [](QJsonObject i) {
Video *video = new Video();
QString id = i["id"].toString();
QString channelName = i["author"].toString();
video->setChannelTitle(channelName);
- videos << video;
+ return video;
+ };
+
+ QVector<Video *> videos;
+
+ if (!video) {
+ // parse video details
+ videos << parseVideoObject(obj["videoDetails"].toObject());
+ }
+
+ const auto items = obj["related_videos"].toArray();
+ videos.reserve(items.size());
+
+ for (const auto &i : items) {
+ videos << parseVideoObject(i.toObject());
}
if (videos.isEmpty()) {
}
QString YTSearch::videoIdFromUrl(const QString &url) {
- static QRegExp re = QRegExp("^.*[\\?&]v=([^&#]+).*$");
- if (re.exactMatch(url)) return re.cap(1);
- re = QRegExp("^.*://.*/([^&#\\?]+).*$");
- if (re.exactMatch(url)) return re.cap(1);
+ static const QVector<QRegExp> res = {QRegExp("^.*[\\?&]v=([^&#]+).*$"),
+ QRegExp("^.*://.*/([^&#\\?]+).*$"),
+ QRegExp("^.*/shorts/([^&#\\?/]+)$")};
+ for (const auto &re : res) {
+ if (re.exactMatch(url)) return re.cap(1);
+ }
return QString();
}