author | llornkcor <llornkcor> | 2002-06-19 13:43:27 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-19 13:43:27 (UTC) |
commit | 110eeb8d44d3065c066a29931761371928df49c4 (patch) (unidiff) | |
tree | 527910aac86ed61e0c2d7d1c885300d841a632ba | |
parent | 94f27897d74d0553bb7a5614f7da0603d490533e (diff) | |
download | opie-110eeb8d44d3065c066a29931761371928df49c4.zip opie-110eeb8d44d3065c066a29931761371928df49c4.tar.gz opie-110eeb8d44d3065c066a29931761371928df49c4.tar.bz2 |
fixed problem with writing doclnk, and local files in an m3u
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 2323ac2..eeaed33 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -855,3 +855,4 @@ void PlayListWidget::btnPlay(bool b) { | |||
855 | qDebug("here we are"); | 855 | qDebug("here we are"); |
856 | if( d->selectedFiles->current()->file().find(" ",0,TRUE) != -1 || d->selectedFiles->current()->file().find("%20",0,TRUE) != -1) { | 856 | if( d->selectedFiles->current()->file().find(" ",0,TRUE) != -1 |
857 | || d->selectedFiles->current()->file().find("%20",0,TRUE) != -1) { | ||
857 | QMessageBox::message("Note","You are trying to play\na malformed url."); | 858 | QMessageBox::message("Note","You are trying to play\na malformed url."); |
@@ -1235,2 +1236,3 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1235 | lnk.setFile( s); | 1236 | lnk.setFile( s); |
1237 | lnk.writeLink(); | ||
1236 | // lnk.setIcon(opieplayer/MPEGPlayer); | 1238 | // lnk.setIcon(opieplayer/MPEGPlayer); |
@@ -1242,6 +1244,13 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1242 | DocLnk lnk( s); | 1244 | DocLnk lnk( s); |
1243 | QString name = s.right( s.length() - 7); | 1245 | QString name; |
1246 | if(name.left(4)=="http") | ||
1247 | name = s.right( s.length() - 7); | ||
1248 | else | ||
1249 | name=s; | ||
1244 | // name = name.right(name.length()-name.findRev("\\",-1,TRUE)-1); | 1250 | // name = name.right(name.length()-name.findRev("\\",-1,TRUE)-1); |
1245 | lnk.setName(name); | 1251 | lnk.setName(name); |
1246 | lnk.setFile( s+"/"); | 1252 | if(s.at(s.length()-4) == '.') |
1253 | lnk.setFile( s); | ||
1254 | else | ||
1255 | lnk.setFile( s+"/"); | ||
1247 | // lnk.setFile( filename); | 1256 | // lnk.setFile( filename); |
@@ -1249,2 +1258,3 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1249 | lnk.setType("audio/x-mpegurl"); | 1258 | lnk.setType("audio/x-mpegurl"); |
1259 | lnk.writeLink(); | ||
1250 | // lnk.setIcon( "opieplayer/MPEGPlayer"); | 1260 | // lnk.setIcon( "opieplayer/MPEGPlayer"); |