summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/om3u.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/om3u.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/om3u.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp
index 841d950..7183fb4 100644
--- a/noncore/multimedia/opieplayer2/om3u.cpp
+++ b/noncore/multimedia/opieplayer2/om3u.cpp
@@ -71,21 +71,15 @@ void Om3u::readM3u() {
71 QString name = f.baseName(); 71 QString name = f.baseName();
72 name = name.right( name.length() - name.findRev( "\\", -1, TRUE ) -1 ); 72 name = name.right( name.length() - name.findRev( "\\", -1, TRUE ) -1 );
73 s=s.replace( QRegExp( "\\" ), "/" ); 73 s=s.replace( QRegExp( "\\" ), "/" );
74 append(s); 74 append(s);
75// qDebug(s); 75// qDebug(s);
76 } else { // is url 76 } else { // is url
77 s.replace( QRegExp( "%20" )," " );
78 QString name; 77 QString name;
79// if( name.left( 4 ) == "http" ) { 78 name = s;
80// name = s.right( s.length() - 7 );
81// } else {
82 name = s;
83// }
84 append(name); 79 append(name);
85// qDebug(name);
86 } 80 }
87 } 81 }
88 } 82 }
89} 83}
90 84
91void Om3u::readPls() { //it's a pls file 85void Om3u::readPls() { //it's a pls file
@@ -144,13 +138,13 @@ void Om3u::add(const QString &filePath) { //adds to m3u file
144void Om3u::remove(const QString &filePath) { //removes from m3u list 138void Om3u::remove(const QString &filePath) { //removes from m3u list
145 QString list, currentFile; 139 QString list, currentFile;
146 if(count()>0) { 140 if(count()>0) {
147 for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { 141 for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
148 currentFile=*it; 142 currentFile=*it;
149 // qDebug(*it); 143 // qDebug(*it);
150 144
151 if( filePath != currentFile) 145 if( filePath != currentFile)
152 list += currentFile+"\n"; 146 list += currentFile+"\n";
153 } 147 }
154 f.writeBlock( list, list.length() ); 148 f.writeBlock( list, list.length() );
155 } 149 }
156} 150}