Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 17 |
1 files changed, 11 insertions, 6 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 @@ -419,6 +419,8 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) { d->setDocumentUsed = FALSE; - if ( mediaPlayerState->playlist() ) - d->selectedFiles->addToSelection( lnk ); + if ( mediaPlayerState->playlist() ) { + if(QFileInfo(lnk.file()).exists()) + d->selectedFiles->addToSelection( lnk ); + } else - mediaPlayerState->setPlaying( TRUE ); + mediaPlayerState->setPlaying( TRUE ); } @@ -437,3 +439,4 @@ void PlayListWidget::addAllToList() { for ( ; Adit.current(); ++Adit ) - d->selectedFiles->addToSelection( **Adit ); + if(QFileInfo(Adit.current()->file()).exists()) + d->selectedFiles->addToSelection( **Adit ); } @@ -443,3 +446,4 @@ void PlayListWidget::addAllMusicToList() { QListIterator<DocLnk> dit( files.children() ); - for ( ; dit.current(); ++dit ) + for ( ; dit.current(); ++dit ) + if(QFileInfo(dit.current()->file()).exists()) d->selectedFiles->addToSelection( **dit ); @@ -451,3 +455,4 @@ void PlayListWidget::addAllVideoToList() { for ( ; dit.current(); ++dit ) - d->selectedFiles->addToSelection( **dit ); + if(QFileInfo( dit.current()->file()).exists()) + d->selectedFiles->addToSelection( **dit ); } |