Diffstat (limited to 'core/multimedia/opieplayer/om3u.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/om3u.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/core/multimedia/opieplayer/om3u.cpp b/core/multimedia/opieplayer/om3u.cpp index ae89518..95ed03c 100644 --- a/core/multimedia/opieplayer/om3u.cpp +++ b/core/multimedia/opieplayer/om3u.cpp @@ -32,4 +32,6 @@ #include "om3u.h" +/* OPIE */ +#include <opie2/odebug.h> @@ -45,5 +47,5 @@ static inline QString fullBaseName ( const QFileInfo &fi ) Om3u::Om3u( const QString &filePath, int mode) : QStringList (){ -//qDebug("<<<<<<<new m3u "+filePath); +//odebug << "<<<<<<<new m3u "+filePath << oendl; f.setName(filePath); f.open(mode); @@ -53,11 +55,11 @@ Om3u::~Om3u(){} void Om3u::readM3u() { -// qDebug("<<<<<<reading m3u "+f.name()); +// odebug << "<<<<<<reading m3u "+f.name() << oendl; QTextStream t(&f); - t.setEncoding(QTextStream::UnicodeUTF8); + t.setEncoding(QTextStream::UnicodeUTF8); QString s; while ( !t.atEnd() ) { s=t.readLine(); - // qDebug(s); + // odebug << s << oendl; if( s.find( "#", 0, TRUE) == -1 ) { if( s.left(2) == "E:" || s.left(2) == "P:" ) { @@ -68,5 +70,5 @@ void Om3u::readM3u() { s=s.replace( QRegExp( "\\" ), "/" ); append(s); - // qDebug(s); + // odebug << s << oendl; } else { // is url s.replace( QRegExp( "%20" )," " ); @@ -78,5 +80,5 @@ void Om3u::readM3u() { // } append(name); - // qDebug(name); + // odebug << name << oendl; } } @@ -86,5 +88,5 @@ void Om3u::readM3u() { void Om3u::readPls() { //it's a pls file QTextStream t( &f ); - t.setEncoding(QTextStream::UnicodeUTF8); + t.setEncoding(QTextStream::UnicodeUTF8); QString s; while ( !t.atEnd() ) { @@ -93,5 +95,5 @@ void Om3u::readPls() { //it's a pls file s = s.right( s.length() - 6 ); s.replace( QRegExp( "%20" )," "); -// qDebug( "adding " + s + " to playlist" ); +// odebug << "adding " + s + " to playlist" << oendl; // numberofentries=2 // File1=http @@ -123,10 +125,10 @@ void Om3u::readPls() { //it's a pls file void Om3u::write() { //writes list to m3u file QString list; - QTextStream t(&f); + QTextStream t(&f); t.setEncoding(QTextStream::UnicodeUTF8); if(count()>0) { for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { - // qDebug(*it); - t << *it << "\n"; + // odebug << *it << oendl; + t << *it << "\n"; } } @@ -143,6 +145,6 @@ void Om3u::remove(const QString &filePath) { //removes from m3u list for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { currentFile=*it; - // qDebug(*it); - + // odebug << *it << oendl; + if( filePath != currentFile) list += currentFile+"\n"; |