-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index ac52b07..2df7f27 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -786,35 +786,34 @@ void PlayListWidget::readPls( const QString &filename ) { | |||
786 | /* | 786 | /* |
787 | writes current playlist to current m3u file */ | 787 | writes current playlist to current m3u file */ |
788 | void PlayListWidget::writeCurrentM3u() { | 788 | void PlayListWidget::writeCurrentM3u() { |
789 | qDebug("writing to current m3u"); | 789 | qDebug("writing to current m3u"); |
790 | Config cfg( "OpiePlayer" ); | 790 | Config cfg( "OpiePlayer" ); |
791 | cfg.setGroup("PlayList"); | 791 | cfg.setGroup("PlayList"); |
792 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default"); | 792 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default"); |
793 | 793 | ||
794 | Om3u *m3uList; | 794 | Om3u *m3uList; |
795 | m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); | 795 | m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); |
796 | if( d->selectedFiles->first()) { | 796 | if( d->selectedFiles->first()) { |
797 | 797 | ||
798 | do { | 798 | do { |
799 | // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); | 799 | // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); |
800 | m3uList->add( d->selectedFiles->current()->file() ); | 800 | m3uList->add( d->selectedFiles->current()->file() ); |
801 | } | ||
802 | while ( d->selectedFiles->next() ); | ||
803 | // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); | ||
804 | m3uList->write(); | ||
805 | m3uList->close(); | ||
801 | } | 806 | } |
802 | while ( d->selectedFiles->next() ); | ||
803 | // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); | ||
804 | m3uList->write(); | ||
805 | m3uList->close(); | ||
806 | |||
807 | delete m3uList; | 807 | delete m3uList; |
808 | } | ||
809 | 808 | ||
810 | } | 809 | } |
811 | 810 | ||
812 | /* | 811 | /* |
813 | writes current playlist to m3u file */ | 812 | writes current playlist to m3u file */ |
814 | void PlayListWidget::writem3u() { | 813 | void PlayListWidget::writem3u() { |
815 | InputDialog *fileDlg; | 814 | InputDialog *fileDlg; |
816 | fileDlg = new InputDialog( this, tr( "Save m3u Playlist " ), TRUE, 0); | 815 | fileDlg = new InputDialog( this, tr( "Save m3u Playlist " ), TRUE, 0); |
817 | fileDlg->exec(); | 816 | fileDlg->exec(); |
818 | QString name, filename, list; | 817 | QString name, filename, list; |
819 | Om3u *m3uList; | 818 | Om3u *m3uList; |
820 | 819 | ||