From c491c11c876ce3cf59fb08f1aa2ee593cb811ce3 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 5 Apr 2020 18:26:21 +0000 Subject: improved m3u support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9330 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp b/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp index dbcd2aa8d..6239f5e9e 100644 --- a/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp +++ b/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp @@ -40,6 +40,7 @@ QList M3UPlaylistFormat::decode(const QByteArray &contents) return out; QRegExp extInfRegExp("#EXTINF:(-{0,1}\\d+),(.*) - (.*)"); + QRegExp extInfRegExp2("#EXTINF:(-{0,1}\\d+),(.*)"); int length = 0; QString artist, title; bool hasExtInf = false; @@ -57,6 +58,12 @@ QList M3UPlaylistFormat::decode(const QByteArray &contents) title = extInfRegExp.cap(3); hasExtInf = true; } + else if(extInfRegExp2.indexIn(str) > -1) + { + length = extInfRegExp.cap(1).toInt(); + title = extInfRegExp.cap(2); + hasExtInf = true; + } if(str.startsWith("#")) continue; -- cgit v1.2.3-13-gbd6f