-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 41fcb30..2323ac2 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -418,2 +418,7 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) { | |||
418 | // qDebug("add"); | 418 | // qDebug("add"); |
419 | if( lnk.file().find(" ",0,TRUE) != -1 || lnk.file().find("%20",0,TRUE) != -1) { | ||
420 | QMessageBox::message("Note","You are trying to play\na malformed url."); | ||
421 | |||
422 | } else { | ||
423 | |||
419 | d->setDocumentUsed = FALSE; | 424 | d->setDocumentUsed = FALSE; |
@@ -426,2 +431,3 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) { | |||
426 | } | 431 | } |
432 | } | ||
427 | 433 | ||
@@ -848,5 +854,10 @@ void PlayListWidget::btnPlay(bool b) { | |||
848 | { | 854 | { |
855 | qDebug("here we are"); | ||
856 | if( d->selectedFiles->current()->file().find(" ",0,TRUE) != -1 || d->selectedFiles->current()->file().find("%20",0,TRUE) != -1) { | ||
857 | QMessageBox::message("Note","You are trying to play\na malformed url."); | ||
858 | |||
859 | } else { | ||
849 | 860 | ||
850 | mediaPlayerState->setPlaying(b); | 861 | mediaPlayerState->setPlaying(b); |
851 | } | 862 | } } |
852 | break; | 863 | break; |
@@ -860,4 +871,3 @@ void PlayListWidget::btnPlay(bool b) { | |||
860 | insanityBool=FALSE; | 871 | insanityBool=FALSE; |
861 | // audioView->clearSelection(); | 872 | }// audioView->clearSelection(); |
862 | } | ||
863 | break; | 873 | break; |
@@ -872,6 +882,6 @@ void PlayListWidget::btnPlay(bool b) { | |||
872 | insanityBool=FALSE; | 882 | insanityBool=FALSE; |
873 | // videoView->clearSelection(); | 883 | }// videoView->clearSelection(); |
874 | } | ||
875 | break; | 884 | break; |
876 | }; | 885 | }; |
886 | |||
877 | } | 887 | } |
@@ -1070,4 +1080,7 @@ void PlayListWidget::openFile() { | |||
1070 | // http://66.28.68.70:8000 | 1080 | // http://66.28.68.70:8000 |
1071 | filename.replace(QRegExp("%20")," "); | 1081 | // filename.replace(QRegExp("%20")," "); |
1072 | 1082 | if(filename.find(" ",0,TRUE) != -1 || filename.find("%20",0,TRUE) != -1) { | |
1083 | QMessageBox::message("Note","Spaces in urls are not allowed."); | ||
1084 | return; | ||
1085 | } else { | ||
1073 | qDebug("Selected filename is "+filename); | 1086 | qDebug("Selected filename is "+filename); |
@@ -1096,2 +1109,3 @@ void PlayListWidget::openFile() { | |||
1096 | } | 1109 | } |
1110 | } | ||
1097 | if(fileDlg) | 1111 | if(fileDlg) |
@@ -1207,3 +1221,6 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1207 | s=t.readLine(); | 1221 | s=t.readLine(); |
1208 | if(s.find("#",0,TRUE) == -1) { | 1222 | if(s.find(" ",0,TRUE) != -1 || s.find("%20",0,TRUE) != -1) { |
1223 | QMessageBox::message("Note","Spaces in urls are not allowed."); | ||
1224 | } | ||
1225 | else if(s.find("#",0,TRUE) == -1) { | ||
1209 | if(s.find(" ",0,TRUE) == -1) { // not sure if this is neede since cf uses vfat | 1226 | if(s.find(" ",0,TRUE) == -1) { // not sure if this is neede since cf uses vfat |
@@ -1222,2 +1239,3 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1222 | } else { // is url | 1239 | } else { // is url |
1240 | |||
1223 | s.replace(QRegExp("%20")," "); | 1241 | s.replace(QRegExp("%20")," "); |
@@ -1240,2 +1258,3 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1240 | } | 1258 | } |
1259 | f.close(); | ||
1241 | } | 1260 | } |