From ed937813c00209f3c3d3e41577372b1951d13767 Mon Sep 17 00:00:00 2001 From: Paul Harrison Date: Sun, 12 Dec 2010 17:40:39 +0000 Subject: [PATCH] MythMusic: Fix redirects in the URL decoder handler. --- mythplugins/mythmusic/mythmusic/decoderhandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mythplugins/mythmusic/mythmusic/decoderhandler.cpp b/mythplugins/mythmusic/mythmusic/decoderhandler.cpp index aea01331e5f..6695482d532 100644 --- a/mythplugins/mythmusic/mythmusic/decoderhandler.cpp +++ b/mythplugins/mythmusic/mythmusic/decoderhandler.cpp @@ -137,6 +137,7 @@ DecoderIOFactoryUrl::DecoderIOFactoryUrl(DecoderHandler *parent) : DecoderIOFact m_input->open(QIODevice::ReadWrite); m_bytesWritten = 0; + m_redirectCount = 0; } DecoderIOFactoryUrl::~DecoderIOFactoryUrl(void) @@ -393,10 +394,10 @@ void DecoderHandler::customEvent(QEvent *e) bool DecoderHandler::createPlaylist(const QUrl &url) { - QString extension = QFileInfo(url.path()).fileName().right(4).toLower(); + QString extension = QFileInfo(url.path()).suffix(); VERBOSE (VB_NETWORK, QString ("File %1 has extension %2").arg (url.fileName()).arg(extension)); - if (extension == ".pls" || extension == ".m3u") + if (extension == "pls" || extension == "m3u") { if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute()) return createPlaylistFromFile(url);