#include "iconutils.h"
-#include "videoapi.h"
#include "ivchannel.h"
+#include "videoapi.h"
+#include "ytjschannel.h"
YTChannel::YTChannel(const QString &channelId, QObject *parent)
: QObject(parent), id(0), channelId(channelId), loadingThumbnail(false), notifyCount(0),
storeInfo();
loading = false;
});
+ } else if (VideoAPI::impl() == VideoAPI::JS) {
+ auto ivChannel = new YTJSChannel(channelId);
+ connect(ivChannel, &YTJSChannel::error, this, &YTChannel::requestError);
+ connect(ivChannel, &YTJSChannel::loaded, this, [this, ivChannel] {
+ displayName = ivChannel->getDisplayName();
+ description = ivChannel->getDescription();
+ thumbnailUrl = ivChannel->getThumbnailUrl();
+ ivChannel->deleteLater();
+ emit infoLoaded();
+ storeInfo();
+ loading = false;
+ });
}
}