Diffstat (limited to 'noncore/multimedia/opieplayer2/om3u.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/om3u.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp index 235d973..841d950 100644 --- a/noncore/multimedia/opieplayer2/om3u.cpp +++ b/noncore/multimedia/opieplayer2/om3u.cpp | |||
@@ -85,25 +85,26 @@ void Om3u::readM3u() { | |||
85 | // qDebug(name); | 85 | // qDebug(name); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | void Om3u::readPls() { //it's a pls file | 91 | void Om3u::readPls() { //it's a pls file |
92 | QTextStream t( &f ); | 92 | QTextStream t( &f ); |
93 | QString s; | 93 | QString s; |
94 | while ( !t.atEnd() ) { | 94 | while ( !t.atEnd() ) { |
95 | s = t.readLine(); | 95 | s = t.readLine(); |
96 | if( s.left(4) == "File" ) { | 96 | if( s.left(4) == "File" ) { |
97 | s = s.right( s.length() - 6 ); | 97 | s = s.right( s.length() - s.find("=",0,true)-1 ); |
98 | s = s.stripWhiteSpace(); | ||
98 | s.replace( QRegExp( "%20" )," "); | 99 | s.replace( QRegExp( "%20" )," "); |
99 | // qDebug( "adding " + s + " to playlist" ); | 100 | // qDebug( "adding " + s + " to playlist" ); |
100 | // numberofentries=2 | 101 | // numberofentries=2 |
101 | // File1=http | 102 | // File1=http |
102 | // Title | 103 | // Title |
103 | // Length | 104 | // Length |
104 | // Version | 105 | // Version |
105 | // File2=http | 106 | // File2=http |
106 | s = s.replace( QRegExp( "\\" ), "/" ); | 107 | s = s.replace( QRegExp( "\\" ), "/" ); |
107 | QFileInfo f( s ); | 108 | QFileInfo f( s ); |
108 | QString name = f.baseName(); | 109 | QString name = f.baseName(); |
109 | if( name.left( 4 ) == "http" ) { | 110 | if( name.left( 4 ) == "http" ) { |