cloneVideo->m_title = m_title;
cloneVideo->m_description = m_description;
cloneVideo->m_author = m_author;
+ cloneVideo->m_authorUri = m_authorUri;
cloneVideo->m_webpage = m_webpage;
cloneVideo->m_streamUrl = m_streamUrl;
cloneVideo->m_thumbnail = m_thumbnail;
const QString author() const { return m_author; }
void setAuthor( QString author ) { m_author = author; }
+ const QString authorUri() const { return m_authorUri; }
+ void setAuthorUri( QString authorUri ) { m_authorUri = authorUri; }
+
const QUrl webpage() const { return m_webpage; }
void setWebpage( QUrl webpage ) { m_webpage = webpage; }
QString m_title;
QString m_description;
QString m_author;
+ QString m_authorUri;
QUrl m_webpage;
QUrl m_streamUrl;
QImage m_thumbnail;
) {
QString webpage = attributes().value("href").toString();
webpage.remove("&feature=youtube_gdata");
- // qDebug() << "Webpage: " << webpage;
video->setWebpage(QUrl(webpage));
-
} else if (name() == "author") {
- readNext();
- if (name() == "name") {
- QString author = readElementText();
- // qDebug() << "Author: " << author;
- video->setAuthor(author);
- }
+ while(readNextStartElement())
+ if (name() == "name") {
+ QString author = readElementText();
+ video->setAuthor(author);
+ } else if (name() == "uri") {
+ QString uri = readElementText();
+ int i = uri.lastIndexOf('/');
+ if (i != -1) uri = uri.mid(i+1);
+ video->setAuthorUri(uri);
+ } else skipCurrentElement();
} else if (name() == "published") {
video->setPublished(QDateTime::fromString(readElementText(), Qt::ISODate));
- } else if (namespaceUri() == "http://gdata.youtube.com/schemas/2007" && name() == "statistics") {
-
+ } else if (namespaceUri() == "http://gdata.youtube.com/schemas/2007"
+ && name() == "statistics") {
QString viewCount = attributes().value("viewCount").toString();
- // qDebug() << "viewCount: " << viewCount;
video->setViewCount(viewCount.toInt());
}
else if (namespaceUri() == "http://search.yahoo.com/mrss/" && name() == "group") {