From: Jakob Haufe Date: Tue, 29 Sep 2020 08:49:53 +0000 (+0200) Subject: New upstream version 3.6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=92723c9ba6a5553e1b136692d99f3bf76b9d5d1c;p=minitube New upstream version 3.6 --- diff --git a/minitube.pro b/minitube.pro index 5598e04..c07090c 100644 --- a/minitube.pro +++ b/minitube.pro @@ -1,7 +1,7 @@ CONFIG += c++17 exceptions_off rtti_off optimize_full object_parallel_to_source TEMPLATE = app -VERSION = 3.5.1 +VERSION = 3.6 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube @@ -42,6 +42,7 @@ include(lib/media/media.pri) include(src/qtsingleapplication/qtsingleapplication.pri) include(src/invidious/invidious.pri) +include(src/ytjs/ytjs.pri) INCLUDEPATH += $$PWD/src diff --git a/src/channelaggregator.cpp b/src/channelaggregator.cpp index 5848fa9..2fcf42b 100644 --- a/src/channelaggregator.cpp +++ b/src/channelaggregator.cpp @@ -30,8 +30,9 @@ $END_LICENSE */ #include "http.h" #include "httputils.h" -#include "videoapi.h" #include "ivchannelsource.h" +#include "videoapi.h" +#include "ytjschannelsource.h" ChannelAggregator::ChannelAggregator(QObject *parent) : QObject(parent), unwatchedCount(-1), running(false), stopped(false), currentChannel(0) { @@ -100,7 +101,15 @@ void ChannelAggregator::processNextChannel() { void ChannelAggregator::checkWebPage(YTChannel *channel) { currentChannel = channel; - QString url = "https://www.youtube.com/channel/" + channel->getChannelId() + "/videos"; + + QString channelId = channel->getChannelId(); + QString url; + if (channelId.startsWith("UC") && !channelId.contains(' ')) { + url = "https://www.youtube.com/channel/" + channelId + "/videos"; + } else { + url = "https://www.youtube.com/user/" + channelId + "/videos"; + } + QObject *reply = HttpUtils::yt().get(url); connect(reply, SIGNAL(data(QByteArray)), SLOT(parseWebPage(QByteArray))); @@ -153,6 +162,11 @@ void ChannelAggregator::reallyProcessChannel(YTChannel *channel) { connect(videoSource, SIGNAL(gotVideos(QVector