Ticket #541: videosource1.patch

File videosource1.patch, 4.6 KB (added by John Pullan <john.pullan@…>, 18 years ago)
  • videosource.h

     
    209209    QString grabber;
    210210};
    211211
     212class OnAirGuide_config: public LabelSetting {
     213public:
     214    OnAirGuide_config();
     215
     216    virtual void load() {};
     217    virtual void save() {};
     218};
     219
    212220class XMLTVConfig: public VerticalConfigurationGroup,
    213221                   public TriggeredConfigurationGroup {
    214222public:
  • videosource.cpp

     
    904904    pdlg.Close();
    905905}
    906906
     907OnAirGuide_config::OnAirGuide_config()
     908{
     909}
     910
    907911XMLTVConfig::XMLTVConfig(const VideoSource& parent)
    908912{
    909913    setUseLabel(false);
     
    921925    addTarget("technovera", new DataDirect_config(parent, DD_LXM));
    922926    grabber->addSelection("LxM (United States)", "technovera");
    923927
     928#ifdef USING_DVB_EIT
     929    addTarget("onairguide", new OnAirGuide_config());
     930    grabber->addSelection("Transmitted Over Air Guide (EIT)", "onairguide");
     931#endif
     932
    924933    addTarget("tv_grab_de_tvtoday", new XMLTV_generic_config(parent, "tv_grab_de_tvtoday"));
    925934    grabber->addSelection("Germany (tvtoday)", "tv_grab_de_tvtoday");
    926935
  • channelsettings.cpp

     
    306306#ifdef USING_DVB
    307307
    308308    bool fDVB =false;
     309    bool fOnAirGuide =false;
    309310
    310311    MSqlQuery query(MSqlQuery::InitCon());
    311312
     
    323324    {
    324325        query.next();
    325326        if (query.value(0).toInt())
     327        {
    326328           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       }
    327339    }
    328     if (fDVB)
     340
     341    if (fOnAirGuide)
    329342    {
    330        onairguide->setEnabled(true);
    331        xmltvID->setEnabled(!onairguide->boolValue());
     343       onairguide->setEnabled(false);
     344       xmltvID->setEnabled(false);
    332345    }
     346    else if (fDVB)
     347    {
     348        onairguide->setEnabled(true);
     349        xmltvID->setEnabled(!onairguide->boolValue());
     350    }
    333351    else
    334352    {
    335353       onairguide->setEnabled(false);
  • eithelper.cpp

     
    145145    // linkage to chanid is different than DVB
    146146    if (event.ATSC)
    147147    {
    148         query.prepare(QString("SELECT chanid, useonairguide FROM channel "
     148        query.prepare(QString("SELECT chanid, xmltvgrabber, useonairguide "
     149                              "FROM channel, videosource "
    149150                              "WHERE atscsrcid = %1 AND mplexid = %2")
    150151                      .arg(event.ServiceID)
    151152                      .arg(mplexid));
     
    153154    else
    154155    {
    155156        /* 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 "
    158159                              "WHERE serviceid = %1 AND "
    159160                              "      networkid = %2 AND "
    160161                              "      channel.mplexid = dtv_multiplex.mplexid")
     
    173174        return -1;
    174175    }
    175176
    176     // Check to see if we are interseted in this channel
     177    // Check to see if we are interested in this channel
    177178    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;
    180185}
    181186
    182187static uint update_eit_in_db(MSqlQuery &query, MSqlQuery &query2,
  • siscan.cpp

     
    14951495                chan_num,
    14961496                (*s).ServiceID,
    14971497                atsc_major, atsc_minor,
    1498                 true,
     1498                false,
    14991499                !(*s).EITPresent, !(*s).EITPresent,
    15001500                freqid);
    15011501        }