Ticket #2142: diseqc-only-lnb.patch
File diseqc-only-lnb.patch, 2.3 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/videosource.cpp
2376 2376 2377 2377 DTVDeviceTreeWizard diseqcWiz(tree); 2378 2378 diseqcWiz.exec(); 2379 defaultinput->fillSelections( tree.Root() != NULL);2379 defaultinput->fillSelections(DTVDeviceNeedsConfiguration(tree)); 2380 2380 #endif // USING_DVB 2381 2381 } 2382 2382 … … 2385 2385 VerticalConfigurationGroup::load(); 2386 2386 #ifdef USING_DVB 2387 2387 tree.Load(parent.getCardID()); 2388 defaultinput->fillSelections( tree.Root() != NULL);2388 defaultinput->fillSelections(DTVDeviceNeedsConfiguration(tree)); 2389 2389 #endif 2390 2390 } 2391 2391 -
libs/libmythtv/diseqcsettings.cpp
1071 1071 1072 1072 bool DTVDeviceNeedsConfiguration(uint cardid) 1073 1073 { 1074 MSqlQuery query(MSqlQuery::InitCon()); 1075 query.prepare( 1076 "SELECT type " 1077 "FROM diseqc_tree, capturecard " 1078 "WHERE capturecard.diseqcid = diseqc_tree.diseqcid AND" 1079 " capturecard.cardid = :CARDID"); 1080 query.bindValue(":CARDID", cardid); 1074 DiSEqCDev dev; 1075 DiSEqCDevTree *diseqc_tree = dev.FindTree(cardid); 1076 return diseqc_tree ? DTVDeviceNeedsConfiguration(*diseqc_tree) : false; 1077 } 1081 1078 1082 if (!query.exec() || !query.isActive()) 1083 MythContext::DBError("DTVDeviceNeedsConfiguration", query); 1084 else if (query.next()) 1085 return (query.value(0).toString().lower() != "lnb"); 1086 1087 return false; 1079 bool DTVDeviceNeedsConfiguration(DiSEqCDevTree& tree) 1080 { 1081 DiSEqCDevDevice *root = tree.Root(); 1082 return (root && root->GetDeviceType() != DiSEqCDevDevice::kTypeLNB); 1088 1083 } 1089 1084 1090 1085 //////////////////////////////////////// DTVDeviceConfigWizard -
libs/libmythtv/diseqcsettings.h
12 12 13 13 typedef QMap<uint, Setting*> devid_to_setting_t; 14 14 15 bool DTVDeviceNeedsConfiguration(uint input_id); 15 bool DTVDeviceNeedsConfiguration(uint cardid); 16 bool DTVDeviceNeedsConfiguration(DiSEqCDevTree& tree); 16 17 17 18 class SwitchTypeSetting; 18 19 class SwitchPortsSetting;