summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp16
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
@@ -853,7 +853,8 @@ void PlayListWidget::btnPlay(bool b) {
853 case 0: 853 case 0:
854 { 854 {
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.");
858 859
859 } else { 860 } else {
@@ -1233,6 +1234,7 @@ void PlayListWidget::readm3u(const QString &filename) {
1233 lnk.setName( name); 1234 lnk.setName( name);
1234 s=s.replace( QRegExp("\\"),"/"); 1235 s=s.replace( QRegExp("\\"),"/");
1235 lnk.setFile( s); 1236 lnk.setFile( s);
1237 lnk.writeLink();
1236// lnk.setIcon(opieplayer/MPEGPlayer); 1238// lnk.setIcon(opieplayer/MPEGPlayer);
1237 qDebug("add "+name); 1239 qDebug("add "+name);
1238 d->selectedFiles->addToSelection( lnk); 1240 d->selectedFiles->addToSelection( lnk);
@@ -1240,13 +1242,21 @@ void PlayListWidget::readm3u(const QString &filename) {
1240 1242
1241 s.replace(QRegExp("%20")," "); 1243 s.replace(QRegExp("%20")," ");
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);
1248// lnk.setComment( s+"/"); 1257// lnk.setComment( s+"/");
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");
1251// qDebug("add "+s); 1261// qDebug("add "+s);
1252 d->selectedFiles->addToSelection( lnk); 1262 d->selectedFiles->addToSelection( lnk);