summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 1fc7dd8..efea385 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1051,65 +1051,65 @@ void PlayListWidget::populateVideoView() {
1051 QListViewItem * newItem; 1051 QListViewItem * newItem;
1052 if ( QFile( Vdit.current()->file()).exists() ) { 1052 if ( QFile( Vdit.current()->file()).exists() ) {
1053 newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), 1053 newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(),
1054 QString::number( QFile( Vdit.current()->file() ).size() ), 1054 QString::number( QFile( Vdit.current()->file() ).size() ),
1055 storage, Vdit.current()->file()); 1055 storage, Vdit.current()->file());
1056 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/videofile" )); 1056 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/videofile" ));
1057 } 1057 }
1058 } 1058 }
1059} 1059}
1060 1060
1061void PlayListWidget::openFile() { 1061void PlayListWidget::openFile() {
1062 QString filename, name; 1062 QString filename, name;
1063 InputDialog *fileDlg; 1063 InputDialog *fileDlg;
1064 fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); 1064 fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0);
1065 fileDlg->exec(); 1065 fileDlg->exec();
1066 if( fileDlg->result() == 1 ) { 1066 if( fileDlg->result() == 1 ) {
1067 filename = fileDlg->text(); 1067 filename = fileDlg->text();
1068 // qDebug( "Selected filename is " + filename ); 1068 // qDebug( "Selected filename is " + filename );
1069 DocLnk lnk; 1069 DocLnk lnk;
1070 Config cfg( "OpiePlayer" ); 1070 Config cfg( "OpiePlayer" );
1071 cfg.setGroup("PlayList"); 1071 cfg.setGroup("PlayList");
1072 1072
1073 QString m3uFile; 1073 QString m3uFile;
1074 m3uFile = filename; 1074 m3uFile = filename;
1075 if(filename.left(4) == "http") { 1075 if(filename.left(4) == "http") {
1076 if(filename.find(":",8,TRUE) != -1) { //found a port 1076 if(filename.find(":",8,TRUE) != -1) { //found a port
1077 1077
1078 m3uFile = filename; 1078 m3uFile = filename;
1079 if( m3uFile.right( 1 ).find( '/' ) == -1) { 1079 if( m3uFile.right( 1 ).find( '/' ) == -1) {
1080 m3uFile += "/"; 1080 m3uFile += "/";
1081 } 1081 }
1082 filename = m3uFile; 1082 filename = m3uFile;
1083 = } 1083 }
1084 lnk.setName( m3uFile ); //sets name 1084 lnk.setName( m3uFile ); //sets name
1085 lnk.setFile( filename ); //sets file name 1085 lnk.setFile( filename ); //sets file name
1086 lnk.setIcon("opieplayer2/musicfile"); 1086 lnk.setIcon("opieplayer2/musicfile");
1087 d->selectedFiles->addToSelection( lnk ); 1087 d->selectedFiles->addToSelection( lnk );
1088 writeCurrentM3u(); 1088 writeCurrentM3u();
1089 } 1089 }
1090 else if( filename.right( 3) == "m3u" ) { 1090 else if( filename.right( 3) == "m3u" ) {
1091 readm3u( filename ); 1091 readm3u( filename );
1092 1092
1093 } else if( filename.right(3) == "pls" ) { 1093 } else if( filename.right(3) == "pls" ) {
1094 readPls( filename ); 1094 readPls( filename );
1095 } else { 1095 } else {
1096 lnk.setName( fullBaseName ( QFileInfo(filename)) ); //sets name 1096 lnk.setName( fullBaseName ( QFileInfo(filename)) ); //sets name
1097 lnk.setFile( filename ); //sets file name 1097 lnk.setFile( filename ); //sets file name
1098 d->selectedFiles->addToSelection( lnk); 1098 d->selectedFiles->addToSelection( lnk);
1099 lnk.removeLinkFile(); 1099 lnk.removeLinkFile();
1100 writeCurrentM3u(); 1100 writeCurrentM3u();
1101 } 1101 }
1102 } 1102 }
1103 1103
1104 if( fileDlg ) { 1104 if( fileDlg ) {
1105 delete fileDlg; 1105 delete fileDlg;
1106 } 1106 }
1107} 1107}
1108 1108
1109 1109
1110/* 1110/*
1111reads m3u and shows files/urls to playlist widget */ 1111reads m3u and shows files/urls to playlist widget */
1112void PlayListWidget::readm3u( const QString &filename ) { 1112void PlayListWidget::readm3u( const QString &filename ) {
1113 // qDebug( "read m3u filename " + filename ); 1113 // qDebug( "read m3u filename " + filename );
1114 1114
1115 Om3u *m3uList; 1115 Om3u *m3uList;