Ticket #2741: 20070314_dvb_on_demand.diff
File 20070314_dvb_on_demand.diff, 4.0 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/dbcheck.cpp
10 10 #include "mythdbcon.h" 11 11 12 12 /// This is the DB schema version expected by the running MythTV instance. 13 const QString currentDatabaseVersion = "118 4";13 const QString currentDatabaseVersion = "1185"; 14 14 15 15 static bool UpdateDBVersionNumber(const QString &newnumber); 16 16 static bool performActualUpdate(const QString updates[], QString version, … … 2983 2983 return false; 2984 2984 } 2985 2985 2986 if (dbver == "1184") 2987 { 2988 const QString updates[] = { 2989 "UPDATE capturecard,cardinput,videosource " 2990 " SET dvb_on_demand = 0 " 2991 " WHERE capturecard.cardid = cardinput.cardid " 2992 " AND cardinput.sourceid = videosource.sourceid " 2993 " AND useeit = 1 " 2994 " AND dvb_on_demand = 1;", 2995 ""}; 2996 2997 if (!performActualUpdate(updates, "1185", dbver)) 2998 return false; 2999 } 3000 2986 3001 //"ALTER TABLE cardinput DROP COLUMN preference;" in 0.22 2987 3002 //"ALTER TABLE channel DROP COLUMN atscsrcid;" in 0.22 2988 3003 //"ALTER TABLE recordedmarkup DROP COLUMN offset;" in 0.22 … … 3000 3015 } 3001 3016 3002 3017 3003 3004 3018 bool InitializeDatabase(void) 3005 3019 { 3006 3020 MSqlQuery query(MSqlQuery::InitCon()); -
libs/libmythtv/videosource.cpp
926 926 setHelpText( 927 927 QObject::tr("This option makes the backend dvb-recorder " 928 928 "only open the card when it is actually in-use, leaving " 929 "it free for other programs at other times.")); 929 "it free for other programs at other times " 930 "(only recording and live-tv qualify as in-use, " 931 "the EIT scan does not).")); 930 932 }; 931 933 }; 932 934 -
libs/libmythtv/tv_rec.cpp
1144 1144 return NULL; 1145 1145 } 1146 1146 1147 bool get_use_eit(uint cardid)1147 static bool get_use_eit(uint cardid) 1148 1148 { 1149 1149 MSqlQuery query(MSqlQuery::InitCon()); 1150 1150 query.prepare( … … 1184 1184 return false; 1185 1185 } 1186 1186 1187 static bool get_dvb_on_demand(uint cardid) 1188 { 1189 MSqlQuery query(MSqlQuery::InitCon()); 1190 query.prepare( 1191 "SELECT dvb_on_demand " 1192 "FROM capturecard " 1193 "WHERE cardid = :CARDID"); 1194 query.bindValue(":CARDID", cardid); 1195 1196 if (!query.exec() || !query.isActive()) 1197 { 1198 MythContext::DBError("get_dvb_on_demand", query); 1199 return false; 1200 } 1201 else if (query.next()) 1202 return query.value(0).toBool(); 1203 return false; 1204 } 1205 1187 1206 /** \fn TVRec::RunTV(void) 1188 1207 * \brief Event handling method, contains event loop. 1189 1208 */ … … 1348 1367 "for all sources on this card."); 1349 1368 eitScanStartTime = eitScanStartTime.addYears(1); 1350 1369 } 1370 else if (get_dvb_on_demand(GetCaptureCardNum())) 1371 { 1372 VERBOSE(VB_EIT, LOC + "EIT scanning disabled " 1373 "since the card should be used only on demand."); 1374 eitScanStartTime = eitScanStartTime.addYears(1); 1375 } 1351 1376 else 1352 1377 { 1353 1378 scanner->StartActiveScan( -
libs/libmythtv/eitscanner.cpp
125 125 } 126 126 127 127 if (activeScanNextChan == activeScanChannels.end()) 128 activeScanNextChan = activeScanChannels.begin(); 128 { 129 exitThread = true; 130 break; 131 } 129 132 130 133 if (!(*activeScanNextChan).isEmpty()) 131 134 {