Ticket #541: videosource1.patch
File videosource1.patch, 4.6 KB (added by , 18 years ago) |
---|
-
videosource.h
209 209 QString grabber; 210 210 }; 211 211 212 class OnAirGuide_config: public LabelSetting { 213 public: 214 OnAirGuide_config(); 215 216 virtual void load() {}; 217 virtual void save() {}; 218 }; 219 212 220 class XMLTVConfig: public VerticalConfigurationGroup, 213 221 public TriggeredConfigurationGroup { 214 222 public: -
videosource.cpp
904 904 pdlg.Close(); 905 905 } 906 906 907 OnAirGuide_config::OnAirGuide_config() 908 { 909 } 910 907 911 XMLTVConfig::XMLTVConfig(const VideoSource& parent) 908 912 { 909 913 setUseLabel(false); … … 921 925 addTarget("technovera", new DataDirect_config(parent, DD_LXM)); 922 926 grabber->addSelection("LxM (United States)", "technovera"); 923 927 928 #ifdef USING_DVB_EIT 929 addTarget("onairguide", new OnAirGuide_config()); 930 grabber->addSelection("Transmitted Over Air Guide (EIT)", "onairguide"); 931 #endif 932 924 933 addTarget("tv_grab_de_tvtoday", new XMLTV_generic_config(parent, "tv_grab_de_tvtoday")); 925 934 grabber->addSelection("Germany (tvtoday)", "tv_grab_de_tvtoday"); 926 935 -
channelsettings.cpp
306 306 #ifdef USING_DVB 307 307 308 308 bool fDVB =false; 309 bool fOnAirGuide =false; 309 310 310 311 MSqlQuery query(MSqlQuery::InitCon()); 311 312 … … 323 324 { 324 325 query.next(); 325 326 if (query.value(0).toInt()) 327 { 326 328 fDVB = true; 329 query.prepare("SELECT xmltvgrabber FROM videosource WHERE " 330 "videosource.sourceid = :SOURCEID "); 331 query.bindValue(":SOURCEID", str); 332 if (query.exec() && query.isActive() && query.size() > 0) 333 { 334 query.next(); 335 if (query.value(0).toString() == "onairguide") 336 fOnAirGuide = true; 337 } 338 } 327 339 } 328 if (fDVB) 340 341 if (fOnAirGuide) 329 342 { 330 onairguide->setEnabled( true);331 xmltvID->setEnabled( !onairguide->boolValue());343 onairguide->setEnabled(false); 344 xmltvID->setEnabled(false); 332 345 } 346 else if (fDVB) 347 { 348 onairguide->setEnabled(true); 349 xmltvID->setEnabled(!onairguide->boolValue()); 350 } 333 351 else 334 352 { 335 353 onairguide->setEnabled(false); -
eithelper.cpp
145 145 // linkage to chanid is different than DVB 146 146 if (event.ATSC) 147 147 { 148 query.prepare(QString("SELECT chanid, useonairguide FROM channel " 148 query.prepare(QString("SELECT chanid, xmltvgrabber, useonairguide " 149 "FROM channel, videosource " 149 150 "WHERE atscsrcid = %1 AND mplexid = %2") 150 151 .arg(event.ServiceID) 151 152 .arg(mplexid)); … … 153 154 else 154 155 { 155 156 /* DVB Link to chanid */ 156 query.prepare(QString("SELECT chanid, useonairguide "157 "FROM channel, dtv_multiplex "157 query.prepare(QString("SELECT chanid, xmltvgrabber, useonairguide " 158 "FROM channel, videosource, dtv_multiplex " 158 159 "WHERE serviceid = %1 AND " 159 160 " networkid = %2 AND " 160 161 " channel.mplexid = dtv_multiplex.mplexid") … … 173 174 return -1; 174 175 } 175 176 176 // Check to see if we are inter seted in this channel177 // Check to see if we are interested in this channel 177 178 query.next(); 178 bool useOnAirGuide = query.value(1).toBool(); 179 return (useOnAirGuide) ? query.value(0).toInt() : -1; 179 if (query.value(1).toString() == "onairguide") 180 return query.value(0).toInt(); 181 else if (query.value(2).toBool()) 182 return query.value(0).toInt(); 183 else 184 return -1; 180 185 } 181 186 182 187 static uint update_eit_in_db(MSqlQuery &query, MSqlQuery &query2, -
siscan.cpp
1495 1495 chan_num, 1496 1496 (*s).ServiceID, 1497 1497 atsc_major, atsc_minor, 1498 true,1498 false, 1499 1499 !(*s).EITPresent, !(*s).EITPresent, 1500 1500 freqid); 1501 1501 }