summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-17 23:27:07 (UTC)
committer llornkcor <llornkcor>2002-06-17 23:27:07 (UTC)
commit33fea370b99c4d6985de14aa913534fb4b1188d3 (patch) (unidiff)
tree356afa8be87f8e16030ec386bfa514ebf2f0a274
parent8b089ad594fad0eed4303bc83db4910784e17dd5 (diff)
downloadopie-33fea370b99c4d6985de14aa913534fb4b1188d3.zip
opie-33fea370b99c4d6985de14aa913534fb4b1188d3.tar.gz
opie-33fea370b99c4d6985de14aa913534fb4b1188d3.tar.bz2
need special case for urls to be added
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index b0d4958..41fcb30 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -389,65 +389,65 @@ void PlayListWidget::writeConfig( Config& cfg ) const {
389 if ( lnk ) { 389 if ( lnk ) {
390 QString entryName; 390 QString entryName;
391 entryName.sprintf( "File%i", noOfFiles + 1 ); 391 entryName.sprintf( "File%i", noOfFiles + 1 );
392// qDebug(entryName); 392// qDebug(entryName);
393 cfg.writeEntry( entryName, lnk->linkFile() ); 393 cfg.writeEntry( entryName, lnk->linkFile() );
394 // if this link does exist, add it so we have the file 394 // if this link does exist, add it so we have the file
395 // next time... 395 // next time...
396 if ( !QFile::exists( lnk->linkFile() ) ) { 396 if ( !QFile::exists( lnk->linkFile() ) ) {
397 // the way writing lnks doesn't really check for out 397 // the way writing lnks doesn't really check for out
398 // of disk space, but check it anyway. 398 // of disk space, but check it anyway.
399 if ( !lnk->writeLink() ) { 399 if ( !lnk->writeLink() ) {
400 QMessageBox::critical( 0, tr("Out of space"), 400 QMessageBox::critical( 0, tr("Out of space"),
401 tr( "There was a problem saving " 401 tr( "There was a problem saving "
402 "the playlist.\n" 402 "the playlist.\n"
403 "Your playlist " 403 "Your playlist "
404 "may be missing some entries\n" 404 "may be missing some entries\n"
405 "the next time you start it." ) 405 "the next time you start it." )
406 ); 406 );
407 } 407 }
408 } 408 }
409 noOfFiles++; 409 noOfFiles++;
410 } 410 }
411 } 411 }
412 while ( d->selectedFiles->next() ); 412 while ( d->selectedFiles->next() );
413 cfg.writeEntry("NumberOfFiles", noOfFiles ); 413 cfg.writeEntry("NumberOfFiles", noOfFiles );
414} 414}
415 415
416 416
417void PlayListWidget::addToSelection( const DocLnk& lnk ) { 417void PlayListWidget::addToSelection( const DocLnk& lnk ) {
418// qDebug("add"); 418// qDebug("add");
419 d->setDocumentUsed = FALSE; 419 d->setDocumentUsed = FALSE;
420 if ( mediaPlayerState->playlist() ) { 420 if ( mediaPlayerState->playlist() ) {
421 if(QFileInfo(lnk.file()).exists()) 421 if(QFileInfo(lnk.file()).exists() || lnk.file().left(4) == "http" )
422 d->selectedFiles->addToSelection( lnk ); 422 d->selectedFiles->addToSelection( lnk );
423 } 423 }
424 else 424 else
425 mediaPlayerState->setPlaying( TRUE ); 425 mediaPlayerState->setPlaying( TRUE );
426} 426}
427 427
428 428
429void PlayListWidget::clearList() { 429void PlayListWidget::clearList() {
430 while ( first() ) 430 while ( first() )
431 d->selectedFiles->removeSelected(); 431 d->selectedFiles->removeSelected();
432} 432}
433 433
434 434
435void PlayListWidget::addAllToList() { 435void PlayListWidget::addAllToList() {
436 DocLnkSet filesAll; 436 DocLnkSet filesAll;
437 Global::findDocuments(&filesAll, "video/*;audio/*"); 437 Global::findDocuments(&filesAll, "video/*;audio/*");
438 QListIterator<DocLnk> Adit( filesAll.children() ); 438 QListIterator<DocLnk> Adit( filesAll.children() );
439 for ( ; Adit.current(); ++Adit ) 439 for ( ; Adit.current(); ++Adit )
440 if(QFileInfo(Adit.current()->file()).exists()) 440 if(QFileInfo(Adit.current()->file()).exists())
441 d->selectedFiles->addToSelection( **Adit ); 441 d->selectedFiles->addToSelection( **Adit );
442} 442}
443 443
444 444
445void PlayListWidget::addAllMusicToList() { 445void PlayListWidget::addAllMusicToList() {
446 QListIterator<DocLnk> dit( files.children() ); 446 QListIterator<DocLnk> dit( files.children() );
447 for ( ; dit.current(); ++dit ) 447 for ( ; dit.current(); ++dit )
448 if(QFileInfo(dit.current()->file()).exists()) 448 if(QFileInfo(dit.current()->file()).exists())
449 d->selectedFiles->addToSelection( **dit ); 449 d->selectedFiles->addToSelection( **dit );
450} 450}
451 451
452 452
453void PlayListWidget::addAllVideoToList() { 453void PlayListWidget::addAllVideoToList() {