summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-06-11 23:09:04 (UTC)
committer llornkcor <llornkcor>2003-06-11 23:09:04 (UTC)
commitf0fab7d044feb2fe7f6a8c2a8d41653e1a17a538 (patch) (unidiff)
tree4d8a625d5dd4ab6fba872f14b6d9e5c7e9cb13fe
parent24097a2790fd7bb241a0a8da24ef2996e4f4ad15 (diff)
downloadopie-f0fab7d044feb2fe7f6a8c2a8d41653e1a17a538.zip
opie-f0fab7d044feb2fe7f6a8c2a8d41653e1a17a538.tar.gz
opie-f0fab7d044feb2fe7f6a8c2a8d41653e1a17a538.tar.bz2
compile
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
@@ -1035,97 +1035,97 @@ void PlayListWidget::populateVideoView() {
1035 StorageInfo storageInfo; 1035 StorageInfo storageInfo;
1036 const QList<FileSystem> &fs = storageInfo.fileSystems(); 1036 const QList<FileSystem> &fs = storageInfo.fileSystems();
1037 1037
1038 if(!videoScan ) scanForVideo(); 1038 if(!videoScan ) scanForVideo();
1039 1039
1040 QListIterator<DocLnk> Vdit( vFiles.children() ); 1040 QListIterator<DocLnk> Vdit( vFiles.children() );
1041 QListIterator<FileSystem> it ( fs ); 1041 QListIterator<FileSystem> it ( fs );
1042 videoView->clear(); 1042 videoView->clear();
1043 QString storage; 1043 QString storage;
1044 for ( ; Vdit.current(); ++Vdit ) { 1044 for ( ; Vdit.current(); ++Vdit ) {
1045 for( ; it.current(); ++it ){ 1045 for( ; it.current(); ++it ){
1046 const QString name = (*it)->name(); 1046 const QString name = (*it)->name();
1047 const QString path = (*it)->path(); 1047 const QString path = (*it)->path();
1048 if( Vdit.current()->file().find(path) != -1 ) storage=name; 1048 if( Vdit.current()->file().find(path) != -1 ) storage=name;
1049 } 1049 }
1050 1050
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;
1116 QString s, name; 1116 QString s, name;
1117 m3uList = new Om3u( filename, IO_ReadOnly ); 1117 m3uList = new Om3u( filename, IO_ReadOnly );
1118 m3uList->readM3u(); 1118 m3uList->readM3u();
1119 DocLnk lnk; 1119 DocLnk lnk;
1120 for ( QStringList::ConstIterator it = m3uList->begin(); it != m3uList->end(); ++it ) { 1120 for ( QStringList::ConstIterator it = m3uList->begin(); it != m3uList->end(); ++it ) {
1121 s = *it; 1121 s = *it;
1122 // qDebug("reading "+ s); 1122 // qDebug("reading "+ s);
1123 if(s.left(4)=="http") { 1123 if(s.left(4)=="http") {
1124 lnk.setName( s ); //sets file name 1124 lnk.setName( s ); //sets file name
1125 lnk.setIcon("opieplayer2/musicfile"); 1125 lnk.setIcon("opieplayer2/musicfile");
1126 1126
1127 // if(s.right(4) != '.' || s.right(5) != '.') 1127 // if(s.right(4) != '.' || s.right(5) != '.')
1128 if(s.right(4) != '.' || s.right(5) != '.' ) 1128 if(s.right(4) != '.' || s.right(5) != '.' )
1129 if( s.right(1) != "/") 1129 if( s.right(1) != "/")
1130 lnk.setFile( s+"/"); //if url with no extension 1130 lnk.setFile( s+"/"); //if url with no extension
1131 else 1131 else