-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 35208e4..b0d4958 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -417,8 +417,10 @@ void PlayListWidget::writeConfig( Config& cfg ) const { void PlayListWidget::addToSelection( const DocLnk& lnk ) { // qDebug("add"); d->setDocumentUsed = FALSE; - if ( mediaPlayerState->playlist() ) + if ( mediaPlayerState->playlist() ) { + if(QFileInfo(lnk.file()).exists()) d->selectedFiles->addToSelection( lnk ); + } else mediaPlayerState->setPlaying( TRUE ); } @@ -435,6 +437,7 @@ void PlayListWidget::addAllToList() { Global::findDocuments(&filesAll, "video/*;audio/*"); QListIterator<DocLnk> Adit( filesAll.children() ); for ( ; Adit.current(); ++Adit ) + if(QFileInfo(Adit.current()->file()).exists()) d->selectedFiles->addToSelection( **Adit ); } @@ -442,6 +445,7 @@ void PlayListWidget::addAllToList() { void PlayListWidget::addAllMusicToList() { QListIterator<DocLnk> dit( files.children() ); for ( ; dit.current(); ++dit ) + if(QFileInfo(dit.current()->file()).exists()) d->selectedFiles->addToSelection( **dit ); } @@ -449,6 +453,7 @@ void PlayListWidget::addAllMusicToList() { void PlayListWidget::addAllVideoToList() { QListIterator<DocLnk> dit( vFiles.children() ); for ( ; dit.current(); ++dit ) + if(QFileInfo( dit.current()->file()).exists()) d->selectedFiles->addToSelection( **dit ); } |