Ticket #2142: diseqc-only-lnb.patch

File diseqc-only-lnb.patch, 2.3 KB (added by yeasah@…, 18 years ago)

patch for LNB-only diseqc input name problem

  • libs/libmythtv/videosource.cpp

     
    23762376
    23772377    DTVDeviceTreeWizard diseqcWiz(tree);
    23782378    diseqcWiz.exec();
    2379     defaultinput->fillSelections(tree.Root() != NULL);
     2379    defaultinput->fillSelections(DTVDeviceNeedsConfiguration(tree));
    23802380#endif // USING_DVB
    23812381}
    23822382
     
    23852385    VerticalConfigurationGroup::load();
    23862386#ifdef USING_DVB
    23872387    tree.Load(parent.getCardID());
    2388     defaultinput->fillSelections(tree.Root() != NULL);
     2388    defaultinput->fillSelections(DTVDeviceNeedsConfiguration(tree));
    23892389#endif
    23902390}
    23912391
  • libs/libmythtv/diseqcsettings.cpp

     
    10711071
    10721072bool DTVDeviceNeedsConfiguration(uint cardid)
    10731073{
    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}
    10811078
    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;
     1079bool DTVDeviceNeedsConfiguration(DiSEqCDevTree& tree)
     1080{
     1081    DiSEqCDevDevice *root = tree.Root();
     1082    return (root && root->GetDeviceType() != DiSEqCDevDevice::kTypeLNB);
    10881083}
    10891084
    10901085//////////////////////////////////////// DTVDeviceConfigWizard
  • libs/libmythtv/diseqcsettings.h

     
    1212
    1313typedef QMap<uint, Setting*> devid_to_setting_t;
    1414
    15 bool DTVDeviceNeedsConfiguration(uint input_id);
     15bool DTVDeviceNeedsConfiguration(uint cardid);
     16bool DTVDeviceNeedsConfiguration(DiSEqCDevTree& tree);
    1617
    1718class SwitchTypeSetting;
    1819class SwitchPortsSetting;