Ticket #713: perchandiff9163.diff

File perchandiff9163.diff, 3.9 KB (added by Joe Votour <joevph@…>, 20 years ago)

Patch against MythTV SVN9163

  • libs/libmythtv/channelsettings.cpp

    diff -Naur mythtv-unpatched/libs/libmythtv/channelsettings.cpp mythtv/libs/libmythtv/channelsettings.cpp
    old new  
    2121    };
    2222};
    2323
     24class TimeOffset: public LineEditSetting, public CSetting {
     25public:
     26    TimeOffset(const ChannelID& id):
     27        LineEditSetting(), CSetting(id, "tmoffset") {
     28        setLabel(QObject::tr("Time Offset"));
     29        setHelpText(QObject::tr("Offset (in seconds) to apply to the program "
     30                                "guide data in listings.  This can be used "
     31                                "when the listings for a particular channel "
     32                                "are in a different time zone. (Works for "
     33                                "DataDirect listings only.)"));
     34    };
     35};
     36
    2437class Channum: public LineEditSetting, public CSetting {
    2538public:
    2639    Channum(const ChannelID& id):
     
    284297    connect(source,SIGNAL(valueChanged(const QString&)),this,SLOT(sourceChanged(const QString&)));
    285298#else
    286299    addChild(new XmltvID(id));
     300    addChild(new TimeOffset(id));
    287301#endif
    288302};
    289303
  • libs/libmythtv/dbcheck.cpp

    diff -Naur mythtv-unpatched/libs/libmythtv/dbcheck.cpp mythtv/libs/libmythtv/dbcheck.cpp
    old new  
    1010#include "mythdbcon.h"
    1111
    1212/// This is the DB schema version expected by the running MythTV instance.
    13 const QString currentDatabaseVersion = "1128";
     13const QString currentDatabaseVersion = "1129";
    1414
    1515static bool UpdateDBVersionNumber(const QString &newnumber);
    1616static bool performActualUpdate(const QString updates[], QString version,
     
    240240The 'xmltvid' field is used to identify this channel to the listings
    241241provider.
    242242
     243The 'tmoffset' field is used to apply an offset (in seconds) from the listings
     244provided by the provider to a new time in the MythTV program guide database.
     245This is very handy when the listings provider has listings which are offset
     246by a few hours on individual channels with the rest of them being correct.
     247
    243248The 'recpriority' field is used tell the scheduler from which of two
    244249otherwise equivalent programs on two different channels should be
    245250prefered, a higher number means this channel is more preferred.
     
    20572062        if (!performActualUpdate(updates, "1128", dbver))
    20582063            return false;
    20592064    }
    2060 
     2065    if (dbver == "1128")
     2066    {
     2067        const QString updates[] = {
     2068"ALTER TABLE channel ADD COLUMN tmoffset INT NOT NULL default '0';",
     2069""
     2070};
     2071        if (!performActualUpdate(updates, "1129", dbver))
     2072            return false;
     2073    }
    20612074//"ALTER TABLE capturecard DROP COLUMN dvb_recordts;" in 0.21
    20622075//"ALTER TABLE capturecard DROP COLUMN dvb_hw_decoder;" in 0.21
    20632076
  • programs/mythfilldatabase/filldata.cpp

    diff -Naur mythtv-unpatched/programs/mythfilldatabase/filldata.cpp mythtv/programs/mythfilldatabase/filldata.cpp
    old new  
    988988                    "hdtv, closecaptioned, partnumber, parttotal, seriesid, "
    989989                    "originalairdate, colorcode, syndicatedepisodenumber, "
    990990                    "programid) "
    991                     "SELECT chanid, starttime, endtime, "
     991                    "SELECT chanid,"
     992                    "DATE_ADD(starttime, INTERVAL (SELECT tmoffset from channel where dd_v_program.chanid = channel.chanid) SECOND), "
     993                    "DATE_ADD(endtime, INTERVAL (SELECT tmoffset from channel where dd_v_program.chanid = channel.chanid) SECOND), "
    992994                    "title, subtitle, description, "
    993995                    "showtype, dd_genre.class, category_type, "
    994996                    "airdate, stars, previouslyshown, stereo, subtitled, "