summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/om3u.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/om3u.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/om3u.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp
index 790fa09..f2a01d3 100644
--- a/noncore/multimedia/opieplayer2/om3u.cpp
+++ b/noncore/multimedia/opieplayer2/om3u.cpp
@@ -38,10 +38,13 @@ using namespace Opie::Core;
38//extern PlayListWidget *playList; 38//extern PlayListWidget *playList;
39 39
40Om3u::Om3u( const QString &filePath, int mode) 40Om3u::Om3u( const QString &filePath, int mode)
41 : QStringList (){ 41 : QStringList ()
42{
42odebug << "<<<<<<<new m3u "+filePath << oendl; 43odebug << "<<<<<<<new m3u "+filePath << oendl;
43 f.setName(filePath); 44 f.setName(filePath);
44 f.open(mode); 45 if (!f.open(mode)) {
46 owarn << "Unable to open file " << f.name() << oendl;
47 }
45} 48}
46 49
47Om3u::~Om3u(){} 50Om3u::~Om3u(){}
@@ -83,12 +86,6 @@ void Om3u::readPls() { //it's a pls file
83 s = s.stripWhiteSpace(); 86 s = s.stripWhiteSpace();
84 s.replace( QRegExp( "%20" )," "); 87 s.replace( QRegExp( "%20" )," ");
85// odebug << "adding " + s + " to playlist" << oendl; 88// odebug << "adding " + s + " to playlist" << oendl;
86 // numberofentries=2
87 // File1=http
88 // Title
89 // Length
90 // Version
91 // File2=http
92 s = s.replace( QRegExp( "\\" ), "/" ); 89 s = s.replace( QRegExp( "\\" ), "/" );
93 QFileInfo f( s ); 90 QFileInfo f( s );
94 QString name = f.baseName(); 91 QString name = f.baseName();
@@ -101,9 +98,6 @@ void Om3u::readPls() { //it's a pls file
101 if( s.at( s.length() - 4) == '.') // if this is probably a file 98 if( s.at( s.length() - 4) == '.') // if this is probably a file
102 append(s); 99 append(s);
103 else { //if its a url 100 else { //if its a url
104// if( name.right( 1 ).find( '/' ) == -1) {
105// s += "/";
106// }
107 append(s); 101 append(s);
108 } 102 }
109 } 103 }
@@ -120,7 +114,6 @@ void Om3u::write() { //writes list to m3u file
120 t << *it << "\n"; 114 t << *it << "\n";
121 } 115 }
122 } 116 }
123// f.close();
124} 117}
125 118
126void Om3u::add(const QString &filePath) { //adds to m3u file 119void Om3u::add(const QString &filePath) { //adds to m3u file