-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 6a15134..36f77be 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -314,35 +314,41 @@ void PlayListWidget::addAllVideoToList() { QListViewItemIterator videoIt( videoView ); DocLnk lnk; QString filename; for ( ; videoIt.current(); ++videoIt ) { filename = videoIt.current()->text(3); lnk.setName( QFileInfo(filename).baseName() ); //sets name lnk.setFile( filename ); //sets file name d->selectedFiles->addToSelection( lnk); } tabWidget->setCurrentPage(0); writeCurrentM3u(); d->selectedFiles->first(); } -void PlayListWidget::setDocument( const QString& fileref ) { +void PlayListWidget::setDocument( const QString& _fileref ) { // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl; + QString fileref = _fileref; fromSetDocument = TRUE; + + DocLnk lnk(_fileref); + if(lnk.isValid()) + fileref = lnk.file(); + QFileInfo fileInfo(fileref); if ( !fileInfo.exists() ) { QMessageBox::warning( this, tr( "Invalid File" ), tr( "There was a problem in getting the file." ) ); return; } clearList(); QString extension = fileInfo.extension(false); if( extension.find( "m3u", 0, false) != -1 || extension.find( "pls", 0, false) != -1 ) { readListFromFile( fileref ); } else { clearList(); |