]> git.sur5r.net Git - minitube/blobdiff - src/ytfeedreader.cpp
2.5.2
[minitube] / src / ytfeedreader.cpp
index 975e327a569c4360f462be23af18372f4c517d27..c063ce243999643b2b7727a4a7118eda64e5d3c6 100644 (file)
@@ -56,15 +56,15 @@ void YTFeedReader::readEntry() {
                     ) {
                 QString webpage = attributes().value("href").toString();
                 webpage.remove("&feature=youtube_gdata");
-                video->setWebpage(QUrl(webpage));
+                video->setWebpage(webpage);
             } else if (name() == QLatin1String("author")) {
                 while(readNextStartElement())
                     if (name() == QLatin1String("name")) {
                         QString author = readElementText();
-                        video->setAuthor(author);
+                        video->setChannelTitle(author);
                     } else if (name() == QLatin1String("userId")) {
                         QString userId = readElementText();
-                        video->setUserId(userId);
+                        video->setChannelId(userId);
                     } else skipCurrentElement();
             } else if (name() == QLatin1String("published")) {
                 video->setPublished(QDateTime::fromString(readElementText(), Qt::ISODate));
@@ -106,6 +106,12 @@ void YTFeedReader::readEntry() {
                             // qDebug() << "Duration: " << duration;
                             video->setDuration(duration.toInt());
                         }
+                        else if (name() == QLatin1String("license")) {
+                            QString license = readElementText();
+                            // qDebug() << "License: " << license;
+                            if (license == QLatin1String("cc"))
+                                video->setLicense(Video::LicenseCC);
+                        }
                     }
                 }
             }