From 52f496d238780d021ad5c4338b3398ec6d20a7e0 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Sun, 25 Jul 2010 17:31:54 +0200 Subject: [PATCH] Oops actually fmt18 still works --- src/MediaView.cpp | 3 ++- src/video.cpp | 16 ++++++++-------- src/videodefinition.cpp | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/MediaView.cpp b/src/MediaView.cpp index 8735f8a..d8d6775 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -277,6 +277,7 @@ void MediaView::gotStreamUrl(QUrl streamUrl) { if (reallyStopped) return; // go! + qDebug() << "Playing" << streamUrl.toString(); mediaObject->setCurrentSource(streamUrl); mediaObject->play(); @@ -299,7 +300,7 @@ void MediaView::itemActivated(const QModelIndex &index) { } void MediaView::currentSourceChanged(const Phonon::MediaSource source) { - qDebug() << "Playing" << source.url().toString(); + } void MediaView::skipVideo() { diff --git a/src/video.cpp b/src/video.cpp index 8aa21bf..6e90248 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -122,9 +122,9 @@ void Video::gotVideoInfo(QByteArray data) { QSettings settings; QString definitionName = settings.value("definition").toString(); int definitionCode = VideoDefinition::getDefinitionCode(definitionName); - if (definitionCode == 34) { + if (definitionCode == 18) { // This is assumed always available - foundVideoUrl(videoToken, 34); + foundVideoUrl(videoToken, 18); } else { findVideoUrl(definitionCode); } @@ -169,9 +169,9 @@ void Video::scrapeWebPage(QByteArray data) { QSettings settings; QString definitionName = settings.value("definition").toString(); int definitionCode = VideoDefinition::getDefinitionCode(definitionName); - if (definitionCode == 34) { + if (definitionCode == 18) { // This is assumed always available - foundVideoUrl(videoToken, 34); + foundVideoUrl(videoToken, 18); } else { findVideoUrl(definitionCode); } @@ -197,7 +197,7 @@ void Video::gotHeadHeaders(QNetworkReply* reply) { QString nextDefinitionName = definitionNames.at(previousIndex); findVideoUrl(nextDefinitionName); } else { - foundVideoUrl(videoToken, 34); + foundVideoUrl(videoToken, 18); }*/ @@ -207,15 +207,15 @@ void Video::gotHeadHeaders(QNetworkReply* reply) { if (currentIndex > 0) { previousIndex = currentIndex - 1; int definitionCode = definitionCodes.at(previousIndex); - if (definitionCode == 34) { + if (definitionCode == 18) { // This is assumed always available - foundVideoUrl(videoToken, 34); + foundVideoUrl(videoToken, 18); } else { findVideoUrl(definitionCode); } } else { - foundVideoUrl(videoToken, 34); + foundVideoUrl(videoToken, 18); } } diff --git a/src/videodefinition.cpp b/src/videodefinition.cpp index 842bf3c..c2180e2 100644 --- a/src/videodefinition.cpp +++ b/src/videodefinition.cpp @@ -6,14 +6,14 @@ QStringList VideoDefinition::getDefinitionNames() { } QList VideoDefinition::getDefinitionCodes() { - static QList definitionCodes = QList() << 34 << 22 << 37; + static QList definitionCodes = QList() << 18 << 22 << 37; return definitionCodes; } QHash VideoDefinition::getDefinitions() { static QHash definitions; if (definitions.isEmpty()) { - definitions.insert("360p", 34); + definitions.insert("360p", 18); definitions.insert("720p", 22); definitions.insert("1080p", 37); } -- 2.39.5