summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 6e2457f..707f4d2 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -826,21 +826,22 @@ void PlayListWidget::writem3u() {
826 826
827 if( fileDlg->result() == 1 ) { 827 if( fileDlg->result() == 1 ) {
828 name = fileDlg->text(); 828 name = fileDlg->text();
829// qDebug( filename ); 829// qDebug( filename );
830 830 if( name.find("/",0,true) != -1) {// assume they specify a file path
831 if( name.left( 1) != "/" ) { 831 filename = name;
832 filename = QPEApplication::documentDir() + "/" + name; 832 name = name.right(name.length()- name.findRev("/",-1,true) - 1 );
833 }
834
835 if( name.right( 3 ) != "m3u" ) {
836 filename = QPEApplication::documentDir() + "/" +name+".m3u";
837 } 833 }
834 else //otherwise dump it somewhere noticable
835 filename = QPEApplication::documentDir() + "/" + name;
838 836
839 if( d->selectedFiles->first()) { 837 if( filename.right( 3 ) != "m3u" ) //needs filename extension
840 m3uList = new Om3u(filename, IO_ReadWrite); 838 filename += ".m3u";
839
840 if( d->selectedFiles->first()) { //ramble through playlist view
841 m3uList = new Om3u( filename, IO_ReadWrite);
841 842
842 do { 843 do {
843 m3uList->add( d->selectedFiles->current()->file()); 844 m3uList->add( d->selectedFiles->current()->file());
844 } 845 }
845 while ( d->selectedFiles->next() ); 846 while ( d->selectedFiles->next() );
846 // qDebug( list ); 847 // qDebug( list );