Ticket #713: perchanneloffset_cp_v1.diff
File perchanneloffset_cp_v1.diff, 4.4 KB (added by , 20 years ago) |
---|
-
libs/libmythtv/channelsettings.cpp
82 82 }; 83 83 }; 84 84 85 class TimeOffset: public SpinBoxSetting, public CSetting { 86 public: 87 TimeOffset(const ChannelID& id): 88 SpinBoxSetting(-1440, 1440, 1), CSetting(id, "tmoffset") { 89 setLabel(QObject::tr("DataDirect") + " " + QObject::tr("Time Offset")); 90 setHelpText(QObject::tr("Offset (in minutes) to apply to the program " 91 "guide data during import. This can be used when the " 92 "listings for a particular channel are in a different " 93 "time zone.") + " " + 94 QObject::tr("(Works for DataDirect listings only.)")); 95 }; 96 }; 97 85 98 class Rank: public SpinBoxSetting, public CSetting { 86 99 public: 87 100 Rank(const ChannelID& id): … … 284 297 connect(source,SIGNAL(valueChanged(const QString&)),this,SLOT(sourceChanged(const QString&))); 285 298 #else 286 299 addChild(new XmltvID(id)); 300 addChild(new TimeOffset(id)); 287 301 #endif 288 302 }; 289 303 … … 347 361 addChild(new Colour(id)); 348 362 addChild(new Hue(id)); 349 363 }; 364 365 /* vim: set expandtab tabstop=4 shiftwidth=4: */ -
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 = "11 29";13 const QString currentDatabaseVersion = "1130"; 14 14 15 15 static bool UpdateDBVersionNumber(const QString &newnumber); 16 16 static bool performActualUpdate(const QString updates[], QString version, … … 240 240 The 'xmltvid' field is used to identify this channel to the listings 241 241 provider. 242 242 243 The 'tmoffset' field is used to apply an offset (in minutes) from the listings 244 provided by the provider to a new time in the MythTV program guide database. 245 This is very handy when the listings provider has listings which are offset 246 by a few hours on individual channels with the rest of them being correct. 247 243 248 The 'recpriority' field is used tell the scheduler from which of two 244 249 otherwise equivalent programs on two different channels should be 245 250 prefered, a higher number means this channel is more preferred. … … 2112 2117 return false; 2113 2118 } 2114 2119 2120 if (dbver == "1129") 2121 { 2122 const QString updates[] = { 2123 "ALTER TABLE channel ADD COLUMN tmoffset INT NOT NULL default '0';", 2124 "" 2125 }; 2126 2127 if (!performActualUpdate(updates, "1130", dbver)) 2128 return false; 2129 } 2130 2115 2131 //"ALTER TABLE capturecard DROP COLUMN dvb_recordts;" in 0.21 2116 2132 //"ALTER TABLE capturecard DROP COLUMN dvb_hw_decoder;" in 0.21 2117 2133 -
programs/mythfilldatabase/filldata.cpp
988 988 "hdtv, closecaptioned, partnumber, parttotal, seriesid, " 989 989 "originalairdate, colorcode, syndicatedepisodenumber, " 990 990 "programid) " 991 "SELECT chanid, starttime, endtime, " 991 "SELECT dd_v_program.chanid, " 992 "DATE_ADD(starttime, INTERVAL channel.tmoffset MINUTE), " 993 "DATE_ADD(endtime, INTERVAL channel.tmoffset MINUTE), " 992 994 "title, subtitle, description, " 993 995 "showtype, dd_genre.class, category_type, " 994 996 "airdate, stars, previouslyshown, stereo, subtitled, " 995 997 "hdtv, closecaptioned, partnumber, parttotal, seriesid, " 996 998 "originalairdate, colorcode, syndicatedepisodenumber, " 997 "dd_v_program.programid FROM dd_v_program "999 "dd_v_program.programid FROM dd_v_program, channel " 998 1000 "LEFT JOIN dd_genre ON (" 999 1001 "dd_v_program.programid = dd_genre.programid AND " 1000 "dd_genre.relevance = '0');")) 1002 "dd_genre.relevance = '0') " 1003 "WHERE dd_v_program.chanid = channel.chanid;")) 1001 1004 MythContext::DBError("Inserting into program table", query); 1002 1005 1003 1006 //cerr << "Finished adding rows to main program table...\n";