summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp8
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
@@ -318,27 +318,33 @@ void PlayListWidget::addAllVideoToList() {
318 for ( ; videoIt.current(); ++videoIt ) { 318 for ( ; videoIt.current(); ++videoIt ) {
319 filename = videoIt.current()->text(3); 319 filename = videoIt.current()->text(3);
320 lnk.setName( QFileInfo(filename).baseName() ); //sets name 320 lnk.setName( QFileInfo(filename).baseName() ); //sets name
321 lnk.setFile( filename ); //sets file name 321 lnk.setFile( filename ); //sets file name
322 d->selectedFiles->addToSelection( lnk); 322 d->selectedFiles->addToSelection( lnk);
323 } 323 }
324 tabWidget->setCurrentPage(0); 324 tabWidget->setCurrentPage(0);
325 writeCurrentM3u(); 325 writeCurrentM3u();
326 d->selectedFiles->first(); 326 d->selectedFiles->first();
327} 327}
328 328
329 329
330void PlayListWidget::setDocument( const QString& fileref ) { 330void PlayListWidget::setDocument( const QString& _fileref ) {
331 // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl; 331 // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl;
332 QString fileref = _fileref;
332 fromSetDocument = TRUE; 333 fromSetDocument = TRUE;
334
335 DocLnk lnk(_fileref);
336 if(lnk.isValid())
337 fileref = lnk.file();
338
333 QFileInfo fileInfo(fileref); 339 QFileInfo fileInfo(fileref);
334 340
335 if ( !fileInfo.exists() ) { 341 if ( !fileInfo.exists() ) {
336 QMessageBox::warning( this, tr( "Invalid File" ), 342 QMessageBox::warning( this, tr( "Invalid File" ),
337 tr( "There was a problem in getting the file." ) ); 343 tr( "There was a problem in getting the file." ) );
338 return; 344 return;
339 } 345 }
340 346
341 clearList(); 347 clearList();
342 QString extension = fileInfo.extension(false); 348 QString extension = fileInfo.extension(false);
343 349
344 if( extension.find( "m3u", 0, false) != -1 350 if( extension.find( "m3u", 0, false) != -1