Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index c0d3108..d53c423 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -59,2 +59,4 @@ extern MediaPlayerState *mediaPlayerState; +QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg"; +// no m3u's here please @@ -207,3 +209,3 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) { d->selectedFiles->addToSelection( lnk ); - writeCurrentM3u(); +// writeCurrentM3u(); } @@ -254,3 +256,3 @@ void PlayListWidget::addAllToList() { DocLnkSet filesAll; - Global::findDocuments(&filesAll, "video/*;audio/*"); + Global::findDocuments(&filesAll, "video/*;"+audioMimes); QListIterator<DocLnk> Adit( filesAll.children() ); @@ -266,2 +268,4 @@ void PlayListWidget::addAllToList() { void PlayListWidget::addAllMusicToList() { + if(!audioScan) + scanForAudio(); QListIterator<DocLnk> dit( files.children() ); @@ -277,2 +281,4 @@ void PlayListWidget::addAllMusicToList() { void PlayListWidget::addAllVideoToList() { + if(!videoScan) + scanForVideo(); QListIterator<DocLnk> dit( vFiles.children() ); @@ -308,2 +314,4 @@ void PlayListWidget::setDocument( const QString& fileref ) { addToSelection( DocLnk( fileref ) ); + writeCurrentM3u(); + d->setDocumentUsed = TRUE; @@ -614,3 +622,3 @@ void PlayListWidget::scanForAudio() { // Global::findDocuments( &files, "audio/*"); - Global::findDocuments( &files, "audio/mpeg;audio/x-wav;audio/x-ogg"); + Global::findDocuments( &files, audioMimes); audioScan = TRUE; @@ -846,3 +854,3 @@ void PlayListWidget::writeCurrentM3u() { QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); - // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); + Om3u *m3uList; @@ -850,4 +858,5 @@ void PlayListWidget::writeCurrentM3u() { d->selectedFiles->first(); - + qDebug( d->selectedFiles->current()->file()); do { + qDebug( d->selectedFiles->current()->file()); m3uList->add( d->selectedFiles->current()->file()); @@ -855,3 +864,3 @@ void PlayListWidget::writeCurrentM3u() { while ( d->selectedFiles->next() ); -// qDebug( list ); + qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); m3uList->write(); |