summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-04-18 16:19:10 (UTC)
committer llornkcor <llornkcor>2003-04-18 16:19:10 (UTC)
commit486db3bff8680e22bade85c348a7673f847a6f37 (patch) (side-by-side diff)
treeadb4c1faff1bc5e97229333ffbbf8cb54d991f2f
parent81776eb70dcad6748b8494ff13fbd048c60c1fae (diff)
downloadopie-486db3bff8680e22bade85c348a7673f847a6f37.zip
opie-486db3bff8680e22bade85c348a7673f847a6f37.tar.gz
opie-486db3bff8680e22bade85c348a7673f847a6f37.tar.bz2
fix typed in url file/name problem
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 299181b..8b295b0 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1062,16 +1062,23 @@ void PlayListWidget::openFile() {
+ QString m3uFile;
+ m3uFile = filename;
if(filename.left(4) == "http") {
- QString m3uFile, m3uFilePath;
if(filename.find(":",8,TRUE) != -1) { //found a port
- m3uFile = filename.left( filename.find( ":",8,TRUE));
- m3uFile = m3uFile.right( 7);
- } else if(filename.left(4) == "http"){
- m3uFile=filename;
- m3uFile = m3uFile.right( m3uFile.length() - 7);
- } else{
+
+// m3uFile = filename.left( filename.find( ":",8,TRUE));
m3uFile=filename;
+ if( m3uFile.right( 1 ).find( '/' ) == -1) {
+ m3uFile += "/";
+ }
+ filename = m3uFile;
+// qDebug("1 "+m3uFile);
+// } else if(filename.left(4) == "http"){
+// m3uFile=filename;
+// m3uFile = m3uFile.right( m3uFile.length() - 7);
+// qDebug("2 "+m3uFile);
+// } else{
+// m3uFile=filename;
+// qDebug("3 "+m3uFile);
}
-
-// qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+ m3uFile);
- lnk.setName( filename ); //sets name
+ lnk.setName( m3uFile ); //sets name
lnk.setFile( filename ); //sets file name
@@ -1116,3 +1123,6 @@ void PlayListWidget::readm3u( const QString &filename ) {
lnk.setIcon("opieplayer2/musicfile");
+
+// if(s.right(4) != '.' || s.right(5) != '.')
if(s.right(4) != '.' || s.right(5) != '.')
+ if( s.right(1) != "/")
lnk.setFile( s+"/"); //if url with no extension