author | sandman <sandman> | 2002-12-11 00:17:09 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-11 00:17:09 (UTC) |
commit | 6c71f5ccd9506234a317d9ff3d119613c457e769 (patch) (unidiff) | |
tree | f78a9d2a0981dbb446096bf072ca5decaa5e1d59 /core/multimedia/opieplayer/om3u.cpp | |
parent | e9d1213578b83f8380c4681186246a2b32ae6375 (diff) | |
download | opie-6c71f5ccd9506234a317d9ff3d119613c457e769.zip opie-6c71f5ccd9506234a317d9ff3d119613c457e769.tar.gz opie-6c71f5ccd9506234a317d9ff3d119613c457e769.tar.bz2 |
fix for a stupid bug .. op1 wants to strip the extension, but instead
stripps everything after the first '.'. So filenames like
"02. foobar.mp3" become "02"
Diffstat (limited to 'core/multimedia/opieplayer/om3u.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/om3u.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/om3u.cpp b/core/multimedia/opieplayer/om3u.cpp index 039f3b1..3541e5f 100644 --- a/core/multimedia/opieplayer/om3u.cpp +++ b/core/multimedia/opieplayer/om3u.cpp | |||
@@ -48,2 +48,9 @@ | |||
48 | 48 | ||
49 | static inline QString fullBaseName ( const QFileInfo &fi ) | ||
50 | { | ||
51 | QString str = fi. fileName ( ); | ||
52 | return str. left ( str. findRev ( '.' )); | ||
53 | } | ||
54 | |||
55 | |||
49 | //extern PlayListWidget *playList; | 56 | //extern PlayListWidget *playList; |
@@ -70,3 +77,3 @@ void Om3u::readM3u() { | |||
70 | QFileInfo f( s ); | 77 | QFileInfo f( s ); |
71 | QString name = f.baseName(); | 78 | QString name = fullBaseName ( f ); |
72 | name = name.right( name.length() - name.findRev( "\\", -1, TRUE ) -1 ); | 79 | name = name.right( name.length() - name.findRev( "\\", -1, TRUE ) -1 ); |
@@ -107,3 +114,3 @@ void Om3u::readPls() { //it's a pls file | |||
107 | QFileInfo f( s ); | 114 | QFileInfo f( s ); |
108 | QString name = f.baseName(); | 115 | QString name = fullBaseName ( f ); |
109 | if( name.left( 4 ) == "http" ) { | 116 | if( name.left( 4 ) == "http" ) { |