1 | diff -cr mythtv.orig/libs/libmythtv/channelsettings.cpp mythtv/libs/libmythtv/channelsettings.cpp |
---|
2 | *** mythtv.orig/libs/libmythtv/channelsettings.cpp 2005-11-25 19:23:05.000000000 -0800 |
---|
3 | --- mythtv/libs/libmythtv/channelsettings.cpp 2005-11-25 19:40:05.000000000 -0800 |
---|
4 | *************** |
---|
5 | *** 21,26 **** |
---|
6 | --- 21,39 ---- |
---|
7 | }; |
---|
8 | }; |
---|
9 | |
---|
10 | + class TimeOffset: public LineEditSetting, public CSetting { |
---|
11 | + public: |
---|
12 | + TimeOffset(const ChannelID& id): |
---|
13 | + LineEditSetting(), CSetting(id, "tmoffset") { |
---|
14 | + setLabel(QObject::tr("Time Offset")); |
---|
15 | + setHelpText(QObject::tr("Offset (in seconds) to apply to the program " |
---|
16 | + "guide data in listings. This can be used " |
---|
17 | + "when the listings for a particular channel " |
---|
18 | + "are in a different time zone. (Works for " |
---|
19 | + "DataDirect listings only.)")); |
---|
20 | + }; |
---|
21 | + }; |
---|
22 | + |
---|
23 | class Channum: public LineEditSetting, public CSetting { |
---|
24 | public: |
---|
25 | Channum(const ChannelID& id): |
---|
26 | *************** |
---|
27 | *** 284,289 **** |
---|
28 | --- 297,303 ---- |
---|
29 | connect(source,SIGNAL(valueChanged(const QString&)),this,SLOT(sourceChanged(const QString&))); |
---|
30 | #else |
---|
31 | addChild(new XmltvID(id)); |
---|
32 | + addChild(new TimeOffset(id)); |
---|
33 | #endif |
---|
34 | }; |
---|
35 | |
---|
36 | diff -cr mythtv.orig/libs/libmythtv/dbcheck.cpp mythtv/libs/libmythtv/dbcheck.cpp |
---|
37 | *** mythtv.orig/libs/libmythtv/dbcheck.cpp 2005-11-25 19:23:01.000000000 -0800 |
---|
38 | --- mythtv/libs/libmythtv/dbcheck.cpp 2005-11-25 19:44:07.000000000 -0800 |
---|
39 | *************** |
---|
40 | *** 10,16 **** |
---|
41 | #include "mythdbcon.h" |
---|
42 | |
---|
43 | /// This is the DB schema version expected by the running MythTV instance. |
---|
44 | ! const QString currentDatabaseVersion = "1110"; |
---|
45 | |
---|
46 | static bool UpdateDBVersionNumber(const QString &newnumber); |
---|
47 | static bool performActualUpdate(const QString updates[], QString version, |
---|
48 | --- 10,16 ---- |
---|
49 | #include "mythdbcon.h" |
---|
50 | |
---|
51 | /// This is the DB schema version expected by the running MythTV instance. |
---|
52 | ! const QString currentDatabaseVersion = "1111"; |
---|
53 | |
---|
54 | static bool UpdateDBVersionNumber(const QString &newnumber); |
---|
55 | static bool performActualUpdate(const QString updates[], QString version, |
---|
56 | *************** |
---|
57 | *** 241,246 **** |
---|
58 | --- 241,251 ---- |
---|
59 | The 'xmltvid' field is used to identify this channel to the listings |
---|
60 | provider. |
---|
61 | |
---|
62 | + The 'tmoffset' field is used to apply an offset (in seconds) from the listings |
---|
63 | + provided by the provider to a new time in the MythTV program guide database. |
---|
64 | + This is very handy when the listings provider has listings which are offset |
---|
65 | + by a few hours on individual channels with the rest of them being correct. |
---|
66 | + |
---|
67 | The 'recpriority' field is used tell the scheduler from which of two |
---|
68 | otherwise equivalent programs on two different channels should be |
---|
69 | prefered, a higher number means this channel is more preferred. |
---|
70 | *************** |
---|
71 | *** 2385,2390 **** |
---|
72 | --- 2390,2406 ---- |
---|
73 | return false; |
---|
74 | } |
---|
75 | |
---|
76 | + if (dbver == "1110") |
---|
77 | + { |
---|
78 | + const QString updates[] = { |
---|
79 | + "ALTER TABLE channel ADD COLUMN tmoffset INT NOT NULL default '0';", |
---|
80 | + "" |
---|
81 | + }; |
---|
82 | + |
---|
83 | + if (!performActualUpdate(updates, "1111", dbver)) |
---|
84 | + return false; |
---|
85 | + } |
---|
86 | + |
---|
87 | // Drop xvmc_buffer_settings table in 0.20 |
---|
88 | // Drop dvb_dmx_buf_size and dvb_pkt_buf_size columns of channel in 0.20 |
---|
89 | |
---|
90 | Only in mythtv/libs/libmythtv: .dbcheck.cpp.swp |
---|
91 | diff -cr mythtv.orig/programs/mythfilldatabase/filldata.cpp mythtv/programs/mythfilldatabase/filldata.cpp |
---|
92 | *** mythtv.orig/programs/mythfilldatabase/filldata.cpp 2005-11-25 19:23:06.000000000 -0800 |
---|
93 | --- mythtv/programs/mythfilldatabase/filldata.cpp 2005-11-25 19:29:50.000000000 -0800 |
---|
94 | *************** |
---|
95 | *** 986,992 **** |
---|
96 | "hdtv, closecaptioned, partnumber, parttotal, seriesid, " |
---|
97 | "originalairdate, colorcode, syndicatedepisodenumber, " |
---|
98 | "programid) " |
---|
99 | ! "SELECT chanid, starttime, endtime, " |
---|
100 | "title, subtitle, description, " |
---|
101 | "showtype, dd_genre.class, category_type, " |
---|
102 | "airdate, stars, previouslyshown, stereo, subtitled, " |
---|
103 | --- 986,994 ---- |
---|
104 | "hdtv, closecaptioned, partnumber, parttotal, seriesid, " |
---|
105 | "originalairdate, colorcode, syndicatedepisodenumber, " |
---|
106 | "programid) " |
---|
107 | ! "SELECT chanid," |
---|
108 | ! "DATE_ADD(starttime, INTERVAL (SELECT tmoffset from channel where dd_v_program.chanid = channel.chanid) SECOND), " |
---|
109 | ! "DATE_ADD(endtime, INTERVAL (SELECT tmoffset from channel where dd_v_program.chanid = channel.chanid) SECOND), " |
---|
110 | "title, subtitle, description, " |
---|
111 | "showtype, dd_genre.class, category_type, " |
---|
112 | "airdate, stars, previouslyshown, stereo, subtitled, " |
---|
113 | *************** |
---|
114 | *** 2247,2253 **** |
---|
115 | int chanid = 0; |
---|
116 | |
---|
117 | query.prepare("SELECT chanid FROM channel WHERE sourceid = :ID AND " |
---|
118 | ! "xmltvid = :XMLTVID;"); |
---|
119 | query.bindValue(":ID", id); |
---|
120 | query.bindValue(":XMLTVID", mapiter.key()); |
---|
121 | |
---|
122 | --- 2249,2255 ---- |
---|
123 | int chanid = 0; |
---|
124 | |
---|
125 | query.prepare("SELECT chanid FROM channel WHERE sourceid = :ID AND " |
---|
126 | ! "xmltvid = :XMLTVID;"); |
---|
127 | query.bindValue(":ID", id); |
---|
128 | query.bindValue(":XMLTVID", mapiter.key()); |
---|
129 | |
---|