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.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp
index d378145..c947033 100644
--- a/noncore/multimedia/opieplayer2/om3u.cpp
+++ b/noncore/multimedia/opieplayer2/om3u.cpp
@@ -48,15 +48,17 @@
48 48
49//extern PlayListWidget *playList; 49//extern PlayListWidget *playList;
50 50
51Om3u::Om3u( const QString &filePath) 51Om3u::Om3u( const QString &filePath, int mode)
52 : QStringList (){ 52 : QStringList (){
53//filePath is path name to m3u 53//filePath is path name to m3u
54//qDebug("<<<<<<<new m3u "+filePath); 54//qDebug("<<<<<<<new m3u "+filePath);
55 f.setName(filePath); 55 f.setName(filePath);
56 if(f.exists()) 56// if(f.exists())
57 f.open( IO_ReadWrite ); 57// f.open( IO_ReadWrite);
58 else 58// else
59 f.open( IO_ReadWrite | IO_Truncate); 59// f.open( IO_ReadWrite | IO_Truncate);
60 f.open(mode);
61
60} 62}
61 63
62Om3u::~Om3u(){} 64Om3u::~Om3u(){}
@@ -67,9 +69,8 @@ void Om3u::readM3u() { //it's m3u
67 QString s; 69 QString s;
68 while ( !t.atEnd() ) { 70 while ( !t.atEnd() ) {
69 s=t.readLine(); 71 s=t.readLine();
70 72 // qDebug(s);
71 if( s.find( "#", 0, TRUE) == -1 ) { 73 if( s.find( "#", 0, TRUE) == -1 ) {
72 if( s.find( " ", 0, TRUE) == -1 ) {
73 if( s.left(2) == "E:" || s.left(2) == "P:" ) { 74 if( s.left(2) == "E:" || s.left(2) == "P:" ) {
74 s = s.right( s.length() -2 ); 75 s = s.right( s.length() -2 );
75 QFileInfo f( s ); 76 QFileInfo f( s );
@@ -89,7 +90,6 @@ void Om3u::readM3u() { //it's m3u
89 append(name); 90 append(name);
90// qDebug(name); 91// qDebug(name);
91 } 92 }
92 }
93 } 93 }
94 } 94 }
95} 95}