summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-08 21:32:13 (UTC)
committer llornkcor <llornkcor>2002-10-08 21:32:13 (UTC)
commitca0c224318a50c6618691fb30f39aa1d9b0b8a4f (patch) (unidiff)
tree961917745cbb5bccf220735b9b62705d4651ffe7
parent9fdf7460f752f979497ee743ba67ddba52c1a7d7 (diff)
downloadopie-ca0c224318a50c6618691fb30f39aa1d9b0b8a4f.zip
opie-ca0c224318a50c6618691fb30f39aa1d9b0b8a4f.tar.gz
opie-ca0c224318a50c6618691fb30f39aa1d9b0b8a4f.tar.bz2
fix addAll* from menu
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp25
1 files changed, 17 insertions, 8 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;
59 59
60QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg";
61// no m3u's here please
60 62
@@ -207,3 +209,3 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) {
207 d->selectedFiles->addToSelection( lnk ); 209 d->selectedFiles->addToSelection( lnk );
208 writeCurrentM3u(); 210// writeCurrentM3u();
209 } 211 }
@@ -254,3 +256,3 @@ void PlayListWidget::addAllToList() {
254 DocLnkSet filesAll; 256 DocLnkSet filesAll;
255 Global::findDocuments(&filesAll, "video/*;audio/*"); 257 Global::findDocuments(&filesAll, "video/*;"+audioMimes);
256 QListIterator<DocLnk> Adit( filesAll.children() ); 258 QListIterator<DocLnk> Adit( filesAll.children() );
@@ -266,2 +268,4 @@ void PlayListWidget::addAllToList() {
266void PlayListWidget::addAllMusicToList() { 268void PlayListWidget::addAllMusicToList() {
269 if(!audioScan)
270 scanForAudio();
267 QListIterator<DocLnk> dit( files.children() ); 271 QListIterator<DocLnk> dit( files.children() );
@@ -277,2 +281,4 @@ void PlayListWidget::addAllMusicToList() {
277void PlayListWidget::addAllVideoToList() { 281void PlayListWidget::addAllVideoToList() {
282 if(!videoScan)
283 scanForVideo();
278 QListIterator<DocLnk> dit( vFiles.children() ); 284 QListIterator<DocLnk> dit( vFiles.children() );
@@ -308,2 +314,4 @@ void PlayListWidget::setDocument( const QString& fileref ) {
308 addToSelection( DocLnk( fileref ) ); 314 addToSelection( DocLnk( fileref ) );
315 writeCurrentM3u();
316
309 d->setDocumentUsed = TRUE; 317 d->setDocumentUsed = TRUE;
@@ -614,3 +622,3 @@ void PlayListWidget::scanForAudio() {
614// Global::findDocuments( &files, "audio/*"); 622// Global::findDocuments( &files, "audio/*");
615 Global::findDocuments( &files, "audio/mpeg;audio/x-wav;audio/x-ogg"); 623 Global::findDocuments( &files, audioMimes);
616 audioScan = TRUE; 624 audioScan = TRUE;
@@ -846,12 +854,13 @@ void PlayListWidget::writeCurrentM3u() {
846 QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); 854 QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
847 // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); 855
848 Om3u *m3uList; 856 Om3u *m3uList;
849 m3uList = new Om3u( currentPlaylist, IO_ReadWrite |IO_Truncate ); 857 m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate );
850 d->selectedFiles->first(); 858 d->selectedFiles->first();
851 859 qDebug( d->selectedFiles->current()->file());
852 do { 860 do {
853 m3uList->add( d->selectedFiles->current()->file()); 861 qDebug( d->selectedFiles->current()->file());
862 m3uList->add( d->selectedFiles->current()->file() );
854 } 863 }
855 while ( d->selectedFiles->next() ); 864 while ( d->selectedFiles->next() );
856// qDebug( list ); 865 qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" );
857 m3uList->write(); 866 m3uList->write();