X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fytsinglevideosource.cpp;fp=src%2Fytsinglevideosource.cpp;h=6d9276cb3d9b0c26ed47c3e7b0b6616cefd0dc71;hb=e5ab28f93dda6e878973f57276db5edab68d13bc;hp=05e5a327db238eae33b1654fb10c170898cfee8b;hpb=4250cf62c1410d5c4e16720128264aeb59c8dc17;p=minitube
diff --git a/src/ytsinglevideosource.cpp b/src/ytsinglevideosource.cpp
index 05e5a32..6d9276c 100644
--- a/src/ytsinglevideosource.cpp
+++ b/src/ytsinglevideosource.cpp
@@ -19,40 +19,128 @@ along with Minitube. If not, see .
$END_LICENSE */
#include "ytsinglevideosource.h"
-#include
#include "networkaccess.h"
#include "video.h"
+
+#ifdef APP_YT3
+#include "yt3.h"
+#include "yt3listparser.h"
+#else
#include "ytfeedreader.h"
+#endif
namespace The {
NetworkAccess* http();
}
-YTSingleVideoSource::YTSingleVideoSource(QObject *parent) : VideoSource(parent) {
- skip = 0;
- max = 0;
+YTSingleVideoSource::YTSingleVideoSource(QObject *parent) : PaginatedVideoSource(parent),
+ video(0),
+ startIndex(0),
+ max(0) { }
+
+#ifdef APP_YT3
+
+void YTSingleVideoSource::loadVideos(int max, int startIndex) {
+ aborted = false;
+ this->startIndex = startIndex;
+ this->max = max;
+
+ QUrl url;
+
+ if (startIndex == 1) {
+
+ if (video) {
+ QList