summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp97
1 files changed, 0 insertions, 97 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 707f4d2..e9615f1 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -247,8 +247,6 @@ void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *, const QPoi
247 247
248void PlayListWidget::addAllToList() { 248void PlayListWidget::addAllToList() {
249 249
250// QTime t;
251// t.start();
252 250
253 audioView->populateView(); 251 audioView->populateView();
254 252
@@ -273,28 +271,6 @@ void PlayListWidget::addAllToList() {
273 d->selectedFiles->addToSelection( lnk); 271 d->selectedFiles->addToSelection( lnk);
274 } 272 }
275 273
276 // d->selectedFiles->addToSelection( );
277 // if ( it.current()->isSelected() )
278 // lst->append( audioIt.current() );
279 // }
280
281
282// if(!audioScan)
283// scanForAudio();
284// if(!videoScan)
285// scanForVideo();
286
287// DocLnkSet filesAll;
288// Global::findDocuments(&filesAll, "video/*;"+audioMimes);
289// QListIterator<DocLnk> Adit( filesAll.children() );
290// for ( ; Adit.current(); ++Adit ) {
291// if( QFileInfo( Adit.current()->file() ).exists() ) {
292// d->selectedFiles->addToSelection( **Adit );
293// }
294// }
295
296 // qDebug("elapsed time %d", t.elapsed() );
297
298 tabWidget->setCurrentPage(0); 274 tabWidget->setCurrentPage(0);
299 275
300 writeCurrentM3u(); 276 writeCurrentM3u();
@@ -317,15 +293,6 @@ void PlayListWidget::addAllMusicToList() {
317 d->selectedFiles->addToSelection( lnk); 293 d->selectedFiles->addToSelection( lnk);
318 } 294 }
319 295
320 /* if(!audioScan)
321 scanForAudio();
322 QListIterator<DocLnk> dit( files.children() );
323 for ( ; dit.current(); ++dit ) {
324 if( QFileInfo(dit.current()->file() ).exists() ) {
325 d->selectedFiles->addToSelection( **dit );
326 }
327 }
328 */
329 tabWidget->setCurrentPage(0); 296 tabWidget->setCurrentPage(0);
330 writeCurrentM3u(); 297 writeCurrentM3u();
331 d->selectedFiles->first(); 298 d->selectedFiles->first();
@@ -345,17 +312,6 @@ void PlayListWidget::addAllVideoToList() {
345 lnk.setFile( filename ); //sets file name 312 lnk.setFile( filename ); //sets file name
346 d->selectedFiles->addToSelection( lnk); 313 d->selectedFiles->addToSelection( lnk);
347 } 314 }
348
349
350 /* if(!videoScan)
351 scanForVideo();
352 QListIterator<DocLnk> dit( vFiles.children() );
353 for ( ; dit.current(); ++dit ) {
354 if( QFileInfo( dit.current()->file() ).exists() ) {
355 d->selectedFiles->addToSelection( **dit );
356 }
357 }
358*/
359 tabWidget->setCurrentPage(0); 315 tabWidget->setCurrentPage(0);
360 writeCurrentM3u(); 316 writeCurrentM3u();
361 d->selectedFiles->first(); 317 d->selectedFiles->first();
@@ -472,13 +428,10 @@ bool PlayListWidget::last() {
472 428
473void PlayListWidget::loadList( const DocLnk & lnk) { 429void PlayListWidget::loadList( const DocLnk & lnk) {
474 QString name = lnk.name(); 430 QString name = lnk.name();
475 // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name);
476 431
477 if( name.length()>0) { 432 if( name.length()>0) {
478 setCaption("OpiePlayer: "+name); 433 setCaption("OpiePlayer: "+name);
479// qDebug("<<<<<<<<<<<<load list "+ lnk.file());
480 clearList(); 434 clearList();
481// readm3u(lnk.file());
482 readListFromFile(lnk.file()); 435 readListFromFile(lnk.file());
483 tabWidget->setCurrentPage(0); 436 tabWidget->setCurrentPage(0);
484 } 437 }
@@ -501,7 +454,6 @@ void PlayListWidget::addSelected() {
501 454
502 currentFileListView->clearSelection(); 455 currentFileListView->clearSelection();
503 456
504// tabWidget->setCurrentPage( 0 );
505 writeCurrentM3u(); 457 writeCurrentM3u();
506} 458}
507 459
@@ -526,7 +478,6 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
526 if(it) { 478 if(it) {
527 if ( currentTab() == CurrentPlayList ) 479 if ( currentTab() == CurrentPlayList )
528 return; 480 return;
529 // case 1: {
530 DocLnk lnk; 481 DocLnk lnk;
531 QString filename; 482 QString filename;
532 483
@@ -673,7 +624,6 @@ void PlayListWidget::openFile() {
673 m3uFile=filename; 624 m3uFile=filename;
674 } 625 }
675 626
676// qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+ m3uFile);
677 lnk.setName( filename ); //sets name 627 lnk.setName( filename ); //sets name
678 lnk.setFile( filename ); //sets file name 628 lnk.setFile( filename ); //sets file name
679 629
@@ -685,7 +635,6 @@ void PlayListWidget::openFile() {
685 } 635 }
686 else if( filename.right( 3) == "m3u" || filename.right(3) == "pls" ) { 636 else if( filename.right( 3) == "m3u" || filename.right(3) == "pls" ) {
687 readListFromFile( filename ); 637 readListFromFile( filename );
688// readPls( filename );
689 } else { 638 } else {
690 lnk.setName( QFileInfo(filename).baseName() ); //sets name 639 lnk.setName( QFileInfo(filename).baseName() ); //sets name
691 lnk.setFile( filename ); //sets file name 640 lnk.setFile( filename ); //sets file name
@@ -737,7 +686,6 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
737 config.write(); 686 config.write();
738 currentPlayList=filename; 687 currentPlayList=filename;
739 688
740// m3uList->write();
741 m3uList->close(); 689 m3uList->close();
742 delete m3uList; 690 delete m3uList;
743 691
@@ -746,51 +694,6 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
746 694
747} 695}
748 696
749// /*
750// reads pls and adds files/urls to playlist */
751// void PlayListWidget::readPls( const QString &filename ) {
752
753// qDebug( "pls filename is " + filename );
754// Om3u *m3uList;
755// QString s, name;
756// m3uList = new Om3u( filename, IO_ReadOnly );
757// m3uList->readPls();
758
759// for ( QStringList::ConstIterator it = m3uList->begin(); it != m3uList->end(); ++it ) {
760// s = *it;
761// // s.replace( QRegExp( "%20" )," " );
762// DocLnk lnk( s );
763// QFileInfo f( s );
764// QString name = f.baseName();
765
766// if( name.left( 4 ) == "http" ) {
767// name = s.right( s.length() - 7);
768// } else {
769// name = s;
770// }
771
772// name = name.right( name.length() - name.findRev( "\\", -1, TRUE) - 1 );
773
774// lnk.setName( name );
775// if( s.at( s.length() - 4) == '.') {// if this is probably a file
776// lnk.setFile( s );
777// } else { //if its a url
778// // if( name.right( 1 ).find( '/' ) == -1) {
779// // s += "/";
780// // }
781// lnk.setFile( s );
782// }
783// lnk.setType( "audio/x-mpegurl" );
784
785// lnk.writeLink();
786// d->selectedFiles->addToSelection( lnk );
787// }
788
789// m3uList->close();
790// delete m3uList;
791// }
792
793// /*
794// writes current playlist to current m3u file */ 697// writes current playlist to current m3u file */
795 void PlayListWidget::writeCurrentM3u() { 698 void PlayListWidget::writeCurrentM3u() {
796 qDebug("writing to current m3u"); 699 qDebug("writing to current m3u");