Ticket #2528: 2528_setupDTVSigmon_by_SIstandard_DVB_v2.diff

File 2528_setupDTVSigmon_by_SIstandard_DVB_v2.diff, 2.3 KB (added by Janne <janne-mythtv@…>, 5 years ago)
  • mythtv/libs/libmythtv/dbcheck.cpp

    diff --git a/mythtv/libs/libmythtv/dbcheck.cpp b/mythtv/libs/libmythtv/dbcheck.cpp
    index 9018e78..74dcd74 100644
    a b using namespace std; 
    1010#include "mythdbcon.h" 
    1111 
    1212/// This is the DB schema version expected by the running MythTV instance. 
    13 const QString currentDatabaseVersion = "1168"; 
     13const QString currentDatabaseVersion = "1169"; 
    1414 
    1515static bool UpdateDBVersionNumber(const QString &newnumber); 
    1616static bool performActualUpdate(const QString updates[], QString version, 
    static bool doUpgradeTVDatabaseSchema(vo 
    26692669        if (!performActualUpdate(updates, "1168", dbver)) 
    26702670            return false; 
    26712671    } 
     2672 
     2673    if (dbver == "1168") 
     2674    { 
     2675        const QString updates[] = { 
     2676"UPDATE dtv_multiplex SET sistandard='mpeg', networkid=NULL, transportid=NULL " 
     2677"WHERE sistandard = 'dvb' AND networkid IS NULL OR networkid < 1;", 
     2678"" 
     2679}; 
     2680 
     2681        if (!performActualUpdate(updates, "1169", dbver)) 
     2682            return false; 
     2683    } 
    26722684//"ALTER TABLE cardinput DROP COLUMN preference;" in 0.22 
    26732685//"ALTER TABLE channel DROP COLUMN atscsrcid;" in 0.22 
    26742686//"ALTER TABLE recordedmarkup DROP COLUMN offset;" in 0.22 
  • mythtv/libs/libmythtv/tv_rec.cpp

    diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
    index a3141c1..806feb7 100644
    a b bool TVRec::SetupDTVSignalMonitor(void) 
    16661666    bool fta = CardUtil::IgnoreEncrypted( 
    16671667        GetCaptureCardNum(), channel->GetCurrentInput()); 
    16681668 
     1669    QString sistandard = dtvchan->GetSIStandard(); 
     1670 
    16691671    // Check if this is an ATSC Channel 
    16701672    int major = dtvchan->GetMajorChannel(); 
    16711673    int minor = dtvchan->GetMinorChannel(); 
    bool TVRec::SetupDTVSignalMonitor(void) 
    17011703    // Check if this is an DVB channel 
    17021704    int progNum = dtvchan->GetProgramNumber(); 
    17031705#ifdef USING_DVB 
    1704     int netid   = dtvchan->GetOriginalNetworkID(); 
    1705     int tsid    = dtvchan->GetTransportID(); 
    1706     if (netid > 0 && tsid > 0 && progNum >= 0) 
     1706    if (progNum >= 0 && sistandard == "dvb") 
    17071707    { 
     1708        int netid   = dtvchan->GetOriginalNetworkID(); 
     1709        int tsid    = dtvchan->GetTransportID(); 
     1710 
    17081711        uint neededVideo = 0; 
    17091712        uint neededAudio = 0; 
    17101713