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.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp
index 69e87e7..26d5e15 100644
--- a/noncore/multimedia/opieplayer2/om3u.cpp
+++ b/noncore/multimedia/opieplayer2/om3u.cpp
@@ -8,64 +8,51 @@
8 _;:,     .>    :=|. This program is free software; you can 8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_,   >  .   <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU General Public 10:`=1 )Y*s>-.--   : the terms of the GNU General Public
11.="- .-=="i,     .._ License as published by the Free Software 11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_. 14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of 17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; General Public License for more 20..}^=.=       =       ; General Public License for more
21++=   -.     .`     .: details. 21++=   -.     .`     .: details.
22 :     =  ...= . :.=- 22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = General Public License along with 24  -_. . .   )=.  = General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29 29
30*/ 30*/
31 31
32#include "playlistwidget.h"
33#include "om3u.h" 32#include "om3u.h"
34 33
35#include <qpe/applnk.h> 34
36#include <qpe/qpeapplication.h>
37#include <qpe/storage.h>
38#include <qpe/mimetype.h>
39#include <qpe/global.h>
40#include <qpe/resource.h>
41
42#include <qdir.h>
43#include <qregexp.h>
44#include <qstring.h>
45#include <qtextstream.h>
46#include <qstringlist.h>
47#include <qcstring.h>
48 35
49//extern PlayListWidget *playList; 36//extern PlayListWidget *playList;
50 37
51Om3u::Om3u( const QString &filePath, int mode) 38Om3u::Om3u( const QString &filePath, int mode)
52 : QStringList (){ 39 : QStringList (){
53qDebug("<<<<<<<new m3u "+filePath); 40qDebug("<<<<<<<new m3u "+filePath);
54 f.setName(filePath); 41 f.setName(filePath);
55 f.open(mode); 42 f.open(mode);
56} 43}
57 44
58Om3u::~Om3u(){} 45Om3u::~Om3u(){}
59 46
60void Om3u::readM3u() { 47void Om3u::readM3u() {
61// qDebug("<<<<<<reading m3u "+f.name()); 48// qDebug("<<<<<<reading m3u "+f.name());
62 QTextStream t(&f); 49 QTextStream t(&f);
63 t.setEncoding(QTextStream::UnicodeUTF8); 50 t.setEncoding(QTextStream::UnicodeUTF8);
64 QString s; 51 QString s;
65 while ( !t.atEnd() ) { 52 while ( !t.atEnd() ) {
66 s=t.readLine(); 53 s=t.readLine();
67// qDebug(s); 54// qDebug(s);
68 if( s.find( "#", 0, TRUE) == -1 ) { 55 if( s.find( "#", 0, TRUE) == -1 ) {
69 if( s.left(2) == "E:" || s.left(2) == "P:" ) { 56 if( s.left(2) == "E:" || s.left(2) == "P:" ) {
70 s = s.right( s.length() -2 ); 57 s = s.right( s.length() -2 );
71 QFileInfo f( s ); 58 QFileInfo f( s );