Ticket #713: perchantimes.diff

File perchantimes.diff, 3.8 KB (added by Joe Votour <joevph@…>, 14 years ago)

Updated patch to SVN 8465

  • libs/libmythtv/channelsettings.cpp

    diff -Naur mythtv.orig/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.orig/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 = "1121";
     13const QString currentDatabaseVersion = "1122";
    1414
    1515static bool UpdateDBVersionNumber(const QString &newnumber);
    1616static bool performActualUpdate(const QString updates[], QString version,
     
    241241The 'xmltvid' field is used to identify this channel to the listings
    242242provider.
    243243
     244The 'tmoffset' field is used to apply an offset (in seconds) from the listings
     245provided by the provider to a new time in the MythTV program guide database.
     246This is very handy when the listings provider has listings which are offset
     247by a few hours on individual channels with the rest of them being correct.
     248
    244249The 'recpriority' field is used tell the scheduler from which of two
    245250otherwise equivalent programs on two different channels should be
    246251prefered, a higher number means this channel is more preferred.
     
    19801985            return false;
    19811986    }
    19821987
     1988    if (dbver == "1121")
     1989    {
     1990        const QString updates[] = {
     1991"ALTER TABLE channel ADD COLUMN tmoffset INT NOT NULL default '0';",
     1992""
     1993};
     1994
     1995        if (!performActualUpdate(updates, "1122", dbver))
     1996            return false;
     1997    }
     1998
    19831999// Drop xvmc_buffer_settings table in 0.20
    19842000// Drop dvb_dmx_buf_size and dvb_pkt_buf_size columns of channel in 0.20
    19852001
  • programs/mythfilldatabase/filldata.cpp

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