Ticket #6948: 6948-v1.patch

File 6948-v1.patch, 24.2 KB (added by danielk, 10 years ago)

Partial fix

  • libs/libmythtv/dbchannelinfo.cpp

     
    2424    const QString &_channum, const QString &_callsign,
    2525    uint _chanid, uint _major_chan, uint _minor_chan,
    2626    uint _mplexid, bool _visible,
    27     const QString &_name, const QString &_icon) :
     27    const QString &_name, const QString &_icon,
     28    uint _sourceid, uint _cardid, uint _grpid) :
    2829    channum(_channum),
    29     callsign(_callsign), chanid(_chanid),
     30    callsign(_callsign),
     31    name(_name), icon((_icon == "none") ? QString() : _icon),
     32    chanid(_chanid),
    3033    major_chan(_major_chan), minor_chan(_minor_chan),
    31     mplexid(_mplexid), visible(_visible),
    32     name(_name), icon(_icon)
     34    mplexid((_mplexid == 32767) ? 0 : _mplexid),
     35    sourceid(_sourceid), cardid(_cardid), grpid(_grpid),
     36    visible(_visible)
    3337{
    34     channum.detach();
    35     callsign.detach();
    36     name.detach();
    37     icon.detach();
    38     mplexid = (mplexid == 32767) ? 0 : mplexid;
    39     icon = (icon == "none") ? QString::null : icon;
    4038}
    4139
    4240DBChannel &DBChannel::operator=(const DBChannel &other)
    4341{
    44     channum    = other.channum;  channum.detach();
    45     callsign   = other.callsign; callsign.detach();
     42    channum    = other.channum;
     43    callsign   = other.callsign;
     44    name       = other.name;
     45    icon       = other.icon;
    4646    chanid     = other.chanid;
    4747    major_chan = other.major_chan;
    4848    minor_chan = other.minor_chan;
    4949    mplexid    = (other.mplexid == 32767) ? 0 : other.mplexid;
     50    sourceid   = other.sourceid;
     51    cardid     = other.cardid;
     52    grpid      = other.grpid;
    5053    visible    = other.visible;
    51     name       = other.name; name.detach();
    52     icon       = other.icon; icon.detach();
    5354
    5455    return *this;
    5556}
  • libs/libmythtv/channelutil.h

     
    148148    static QString GetVideoFilters(uint sourceid, const QString &channum)
    149149        { return GetChannelValueStr("videofilters", sourceid, channum); }
    150150
    151     static DBChanList GetChannels(uint srcid, bool vis_only,
    152                                   QString grp = "", int changrpid = -1);
     151    static DBChanList GetChannels(
     152        uint sourceid, bool visible_only,
     153        QString group_by = "", uint channel_groupid = 0);
    153154    static vector<uint> GetChanIDs(int sourceid = -1);
    154155    static uint    GetChannelCount(int sourceid = -1);
    155156    static void    SortChannels(DBChanList &list, const QString &order,
    156157                                bool eliminate_duplicates = false);
    157     static void    EliminateDuplicateChanNum(DBChanList &list);
    158158
    159     static uint    GetNextChannel(const DBChanList  &sorted,
    160                                   uint               old_chanid,
    161                                   uint               mplexid_restriction,
    162                                   int                direction);
     159    static uint    GetNextChannel(const DBChanList &sorted,
     160                                  uint old_chanid,
     161                                  uint mplexid_restriction,
     162                                  int  direction,
     163                                  bool skip_non_visible = true,
     164                                  bool skip_same_channum_and_callsign = false);
    163165
    164166    static QString GetChannelValueStr(const QString &channel_field,
    165167                                      uint           sourceid,
  • libs/libmythtv/dbchannelinfo.h

     
    2525    DBChannel(const QString &_channum, const QString &_callsign,
    2626              uint _chanid, uint _major_chan, uint _minor_chan,
    2727              uint _mplexid, bool _visible,
    28               const QString &_name, const QString &_icon);
     28              const QString &_name, const QString &_icon,
     29              uint _sourceid, uint _cardid, uint _grpid);
    2930    DBChannel& operator=(const DBChannel&);
    3031
    3132    bool operator == (uint _chanid) const
     
    3435  public:
    3536    QString channum;
    3637    QString callsign;
     38    QString name;
     39    QString icon;
    3740    uint    chanid;
    3841    uint    major_chan;
    3942    uint    minor_chan;
    4043    uint    mplexid;
     44    uint    sourceid;
     45    uint    cardid;
     46    uint    grpid;
    4147    bool    visible;
    42     QString name;
    43     QString icon;
    4448};
    4549typedef vector<DBChannel> DBChanList;
    4650
  • libs/libmythtv/dbcheck.cpp

     
    2020   mythtv/bindings/perl/MythTV.pm
    2121*/
    2222/// This is the DB schema version expected by the running MythTV instance.
    23 const QString currentDatabaseVersion = "1264";
     23const QString currentDatabaseVersion = "1265";
    2424
    2525static bool UpdateDBVersionNumber(const QString &newnumber, QString &dbver);
    2626static bool performActualUpdate(
     
    55025502            return false;
    55035503    }
    55045504
     5505    if (dbver == "1264")
     5506    {
     5507        const char *updates[] = {
     5508"INSERT INTO profilegroups SET name = 'ASI Recorder (DVEO)', cardtype = 'ASI', is_default = 1;",
     5509"INSERT INTO recordingprofiles SET name = \"Default\", profilegroup = 14;",
     5510"INSERT INTO recordingprofiles SET name = \"Live TV\", profilegroup = 14;",
     5511"INSERT INTO recordingprofiles SET name = \"High Quality\", profilegroup = 14;",
     5512"INSERT INTO recordingprofiles SET name = \"Low Quality\", profilegroup = 14;",
     5513"INSERT INTO profilegroups SET name = 'OCUR Recorder (CableLabs)', cardtype = 'OCUR', is_default = 1;",
     5514"INSERT INTO recordingprofiles SET name = \"Default\", profilegroup = 15;",
     5515"INSERT INTO recordingprofiles SET name = \"Live TV\", profilegroup = 15;",
     5516"INSERT INTO recordingprofiles SET name = \"High Quality\", profilegroup = 15;",
     5517"INSERT INTO recordingprofiles SET name = \"Low Quality\", profilegroup = 15;",
     5518"INSERT INTO profilegroups SET name = 'BDA Recorder (Microsoft)', cardtype = 'BDA', is_default = 1;",
     5519"INSERT INTO recordingprofiles SET name = \"Default\", profilegroup = 16;",
     5520"INSERT INTO recordingprofiles SET name = \"Live TV\", profilegroup = 16;",
     5521"INSERT INTO recordingprofiles SET name = \"High Quality\", profilegroup = 16;",
     5522"INSERT INTO recordingprofiles SET name = \"Low Quality\", profilegroup = 16;",
     5523NULL
     5524};
     5525        if (!performActualUpdate(updates, "1265", dbver))
     5526            return false;
     5527    }
     5528
    55055529    return true;
    55065530}
    55075531
  • libs/libmythtv/channelbase.cpp

     
    840840        m_allchannels.insert(m_allchannels.end(),
    841841                           channels.begin(), channels.end());
    842842    }
    843     ChannelUtil::SortChannels(m_allchannels, order);
    844     ChannelUtil::EliminateDuplicateChanNum(m_allchannels);
     843    ChannelUtil::SortChannels(m_allchannels, order, true);
    845844
    846845    m_currentInputID = GetDefaultInput(cardid);
    847846
  • libs/libmythtv/tvbrowsehelper.h

     
    44#define _TV_BROWSE_HELPER_H_
    55
    66#include <QWaitCondition>
     7#include <QMultiMap>
    78#include <QThread>
    89#include <QString>
     10#include <QHash>
    911
    1012#include "dbchannelinfo.h" // for DBChanList
    1113#include "programtypes.h"  // for InfoMap
     
    1921{
    2022  public:
    2123    BrowseInfo(BrowseDirection dir) :
    22         m_dir(dir), m_chanid(0)
     24        m_dir(dir), m_chanid(0), m_sourceid(0)
    2325    {
    2426    }
    2527    BrowseInfo(BrowseDirection dir,
    2628               const QString &channum,
    2729               uint           chanid,
    2830               const QString &starttime) :
    29         m_dir(dir),  m_channum(channum),
    30         m_chanid(0), m_starttime(starttime)
     31        m_dir(dir),         m_channum(channum),
     32        m_chanid(chanid),   m_starttime(starttime),
     33        m_sourceid(0)
    3134    {
    3235    }
     36    BrowseInfo(const QString &channum,
     37               uint           sourceid) :
     38        m_dir(BROWSE_SAME), m_channum(channum),
     39        m_chanid(0),        m_sourceid(sourceid)
     40    {
     41    }
    3342
     43    QString toString() const
     44    {
     45        return QString("%1;%2;%3;%4;%5")
     46            .arg(BROWSE_SAME==m_dir?"SAME":
     47                 BROWSE_UP  ==m_dir?"UP":
     48                 BROWSE_DOWN==m_dir?"DOWN":
     49                 QString::number(m_dir))
     50            .arg(m_channum)
     51            .arg(m_chanid)
     52            .arg(m_starttime)
     53            .arg(m_sourceid);
     54    }
     55
    3456    BrowseDirection m_dir;
    3557    QString         m_channum;
    3658    uint            m_chanid;
    3759    QString         m_starttime;
     60    uint            m_sourceid;
    3861};
    3962
    4063
     
    82105            BrowseDispInfo(ctx, bi);
    83106    }
    84107
    85     void BrowseChannel(PlayerContext *ctx, const QString &channum)
    86     {
    87         BrowseInfo bi(BROWSE_SAME, channum, 0, "");
    88         BrowseDispInfo(ctx, bi);
    89     }
     108    void BrowseChannel(PlayerContext *ctx, const QString &channum);
    90109
    91110    BrowseInfo GetBrowsedInfo(void) const;
    92111    bool IsBrowsing(void) const;
    93     uint BrowseAllGetChanId(const QString &channum) const;
     112    uint GetChanId(const QString &channum,
     113                   uint pref_cardid, uint pref_sourceid) const;
    94114
    95115  protected:
    96116    void GetNextProgram(BrowseDirection direction, InfoMap &infoMap) const;
     
    99119    virtual void run();
    100120
    101121    TV               *m_tv;
    102     DBChanList        db_browse_all_channels;
     122    DBChanList        db_all_channels;
     123    DBChanList        db_all_visible_channels;
    103124    QString           db_time_format;
    104125    QString           db_short_date_format;
    105126    uint              db_browse_max_forward;
    106127    bool              db_browse_all_tuners;
    107128    bool              db_use_channel_groups;
     129    QHash<uint,QString>     db_chanid_to_channum;
     130    QMultiMap<QString,uint> db_channum_to_chanids;
    108131
    109132    mutable QMutex    m_lock; // protects variables below
    110133    PlayerContext    *m_ctx;
  • libs/libmythtv/tvbrowsehelper.cpp

     
    66#include "playercontext.h"
    77#include "remoteencoder.h"
    88#include "recordinginfo.h"
     9#include "cardutil.h"
    910#include "tv_play.h"
    1011
     12#define LOC      QString("BH: ")
     13#define LOC_WARN QString("BH Warning: ")
     14#define LOC_ERR  QString("BH Error: ")
     15
    1116#define GetPlayer(X,Y) GetPlayerHaveLock(X, Y, __FILE__ , __LINE__)
    1217#define GetOSDLock(X) GetOSDL(X, __FILE__, __LINE__)
    1318
     
    3944    m_chanid(0),
    4045    m_run(true)
    4146{
    42     if (db_browse_all_tuners)
     47    db_all_channels = ChannelUtil::GetChannels(
     48        0, true, "channum, callsign");
     49    ChannelUtil::SortChannels(
     50        db_all_channels, db_channel_ordering, false);
     51
     52    DBChanList::const_iterator it = db_all_channels.begin();
     53    for (; it != db_all_channels.end(); ++it)
    4354    {
    44         db_browse_all_channels = ChannelUtil::GetChannels(
    45             0, true, "channum, callsign");
    46         ChannelUtil::SortChannels(
    47             db_browse_all_channels, db_channel_ordering, true);
     55        db_chanid_to_channum[(*it).chanid] = (*it).channum;
     56        db_channum_to_chanids.insert((*it).channum,(*it).chanid);
    4857    }
    4958
     59    db_all_visible_channels = ChannelUtil::GetChannels(
     60        0, true, "channum, callsign");
     61    ChannelUtil::SortChannels(
     62        db_all_visible_channels, db_channel_ordering, false);
     63
    5064    start();
    5165}
    5266
     
    140154
    141155void TVBrowseHelper::BrowseDispInfo(PlayerContext *ctx, BrowseInfo &bi)
    142156{
    143     VERBOSE(VB_IMPORTANT, "BrowseDispInfo()");
     157    VERBOSE(VB_IMPORTANT, QString("BrowseDispInfo(..%1)")
     158            .arg(bi.toString()));
    144159
    145160    if (!gCoreContext->IsUIThread())
    146161        return;
     
    165180    m_wait.wakeAll();
    166181}
    167182
     183void TVBrowseHelper::BrowseChannel(PlayerContext *ctx, const QString &channum)
     184{
     185    VERBOSE(VB_IMPORTANT, QString("BrowseChannel(.. %1)").arg(channum));
     186
     187    if (!gCoreContext->IsUIThread())
     188        return;
     189
     190    if (db_browse_all_tuners)
     191    {
     192        BrowseInfo bi(channum, 0);
     193        BrowseDispInfo(ctx, bi);
     194        return;
     195    }
     196
     197    if (!ctx->recorder || !ctx->last_cardid)
     198        return;
     199
     200    QString inputname = ctx->recorder->GetInput();
     201    uint    inputid   = CardUtil::GetInputID(ctx->last_cardid, inputname);
     202    uint    sourceid  = CardUtil::GetSourceID(inputid);
     203    if (sourceid)
     204    {
     205        BrowseInfo bi(channum, sourceid);
     206        BrowseDispInfo(ctx, bi);
     207    }
     208}
     209
    168210BrowseInfo TVBrowseHelper::GetBrowsedInfo(void) const
    169211{
    170212    QMutexLocker locker(&m_lock);
     
    189231    return m_ctx != NULL;
    190232}
    191233
    192 /// Returns chanid of random channel with with matching channum
    193 uint TVBrowseHelper::BrowseAllGetChanId(const QString &channum) const
     234/** \brief Returns a chanid for the channum, or 0 if none is available.
     235 *
     236 *  This will prefer a given sourceid first, and then a given card id,
     237 *  but if one or the other can not be satisfied but db_browse_all_tuners
     238 *  is set then it will look to see if the chanid is available on any
     239 *  tuner.
     240 */
     241uint TVBrowseHelper::GetChanId(
     242    const QString &channum, uint pref_cardid, uint pref_sourceid) const
    194243{
    195     DBChanList::const_iterator it = db_browse_all_channels.begin();
    196     for (; it != db_browse_all_channels.end(); ++it)
     244    if (pref_sourceid)
    197245    {
    198         if ((*it).channum == channum)
    199             return (*it).chanid;
     246        DBChanList::const_iterator it = db_all_channels.begin();
     247        for (; it != db_all_channels.end(); ++it)
     248        {
     249            if ((*it).sourceid == pref_sourceid && (*it).channum == channum)
     250                return (*it).chanid;
     251        }
    200252    }
     253
     254    if (pref_cardid)
     255    {
     256        DBChanList::const_iterator it = db_all_channels.begin();
     257        for (; it != db_all_channels.end(); ++it)
     258        {
     259            if ((*it).cardid == pref_cardid && (*it).channum == channum)
     260                return (*it).chanid;
     261        }
     262    }
     263
     264    if (db_browse_all_tuners)
     265    {
     266        DBChanList::const_iterator it = db_all_channels.begin();
     267        for (; it != db_all_channels.end(); ++it)
     268        {
     269            if ((*it).channum == channum)
     270                return (*it).chanid;
     271        }
     272    }
     273
    201274    return 0;
    202275}
    203276
     
    273346{
    274347    uint chanid = infoMap["chanid"].toUInt();
    275348    if (!chanid)
    276         chanid = BrowseAllGetChanId(infoMap["channum"]);
     349    {
     350        VERBOSE(VB_IMPORTANT, LOC_ERR +
     351                "GetNextProgramDB() requires a chanid");
     352        return;
     353    }
    277354
    278355    int chandir = -1;
    279356    switch (direction)
     
    282359        case BROWSE_DOWN:     chandir = CHANNEL_DIRECTION_DOWN;     break;
    283360        case BROWSE_FAVORITE: chandir = CHANNEL_DIRECTION_FAVORITE; break;
    284361    }
    285     if (direction != BROWSE_INVALID)
     362    if (chandir != -1)
    286363    {
    287364        chanid = ChannelUtil::GetNextChannel(
    288             db_browse_all_channels, chanid, 0, chandir);
     365            db_all_visible_channels, chanid, 0 /*mplexid_restriction*/,
     366            chandir, true /*skip non visible*/, true /*skip same callsign*/);
    289367    }
    290368
    291     infoMap["chanid"] = QString::number(chanid);
     369    infoMap["chanid"]  = QString::number(chanid);
     370    infoMap["channum"] = db_chanid_to_channum[chanid];
    292371
    293     DBChanList::const_iterator it = db_browse_all_channels.begin();
    294     for (; it != db_browse_all_channels.end(); ++it)
    295     {
    296         if ((*it).chanid == chanid)
    297         {
    298             QString tmp = (*it).channum;
    299             tmp.detach();
    300             infoMap["channum"] = tmp;
    301             break;
    302         }
    303     }
    304 
    305372    QDateTime nowtime = QDateTime::currentDateTime();
    306373    QDateTime latesttime = nowtime.addSecs(6*60*60);
    307374    QDateTime browsetime = QDateTime::fromString(
     
    364431
    365432        PlayerContext *ctx = m_ctx;
    366433
     434        vector<uint> chanids;
    367435        if (BROWSE_SAME == bi.m_dir)
    368436        {
    369437            m_channum   = bi.m_channum;
    370438            m_chanid    = bi.m_chanid;
    371439            m_starttime = bi.m_starttime;
     440            if (!m_chanid)
     441            {
     442
     443            // TODO When channum is given and not chanid,
     444            // we want to check all channels available to
     445            // us with that channum..
     446            }
    372447        }
    373448
    374449        BrowseDirection direction = bi.m_dir;
     
    438513            }
    439514            else
    440515            {
     516                // TODO handle browse_same...
     517                uint orig_chanid = infoMap["chanid"].toUInt();
    441518                GetNextProgramDB(direction, infoMap);
    442519                while (!m_tv->IsTunable(ctx, infoMap["chanid"].toUInt()) &&
    443                        (infoMap["channum"] != m_channum))
     520                       (infoMap["chanid"].toUInt() != orig_chanid))
    444521                {
    445522                    GetNextProgramDB(direction, infoMap);
    446523                }
  • libs/libmythtv/channelutil.cpp

     
    17681768                           dvb_transportid, dvb_networkid, dtv_si_std);
    17691769}
    17701770
    1771 DBChanList ChannelUtil::GetChannels(uint sourceid, bool vis_only, QString grp, int changrpid)
     1771DBChanList ChannelUtil::GetChannels(
     1772    uint sourceid, bool vis_only, QString grp, uint changrpid)
    17721773{
    17731774    DBChanList list;
    17741775
     
    17771778    QString qstr =
    17781779        "SELECT channum, callsign, channel.chanid, "
    17791780        "       atsc_major_chan, atsc_minor_chan, "
    1780         "       name, icon, mplexid, visible "
    1781         "FROM channel ";
     1781        "       name, icon, mplexid, visible, "
     1782        "       channel.sourceid, cardinput.cardid, channelgroup.grpid "
     1783        "FROM channel "
     1784        "LEFT JOIN channelgroup ON channel.chanid     = channelgroup.chanid "
     1785        "JOIN cardinput         ON cardinput.sourceid = channel.sourceid "
     1786        "JOIN capturecard       ON cardinput.cardid   = capturecard.cardid ";
    17821787
    1783     // Select only channels from the specified channel group
    1784     if (changrpid > -1)
    1785         qstr += QString(",channelgroup ");
     1788    QString cond = " WHERE ";
    17861789
    17871790    if (sourceid)
     1791    {
    17881792        qstr += QString("WHERE sourceid='%1' ").arg(sourceid);
    1789     else
    1790         qstr += ",cardinput,capturecard "
    1791             "WHERE cardinput.sourceid = channel.sourceid   AND "
    1792             "      cardinput.cardid   = capturecard.cardid     ";
     1793        cond = " AND ";
     1794    }
    17931795
    1794     if (changrpid > -1)
     1796    // Select only channels from the specified channel group
     1797    if (changrpid > 0)
    17951798    {
    1796         qstr += QString("AND channel.chanid = channelgroup.chanid "
    1797                         "AND channelgroup.grpid ='%1' ").arg(changrpid);
     1799        qstr += QString("%1 channelgroup.grpid = '%2' ")
     1800            .arg(cond).arg(changrpid);
     1801        cond = " AND ";
    17981802    }
    17991803
    18001804    if (vis_only)
    1801         qstr += "AND visible=1 ";
     1805    {
     1806        qstr += QString("%1 visible=1 ").arg(cond);
     1807        cond = " AND ";
     1808    }
    18021809
    18031810    if (!grp.isEmpty())
    1804         qstr += QString("GROUP BY %1 ").arg(grp);
     1811        qstr += QString(" GROUP BY %1 ").arg(grp);
    18051812
    18061813    query.prepare(qstr);
    1807     if (!query.exec() || !query.isActive())
     1814    if (!query.exec())
    18081815    {
    1809         MythDB::DBError("get channels -- sourceid", query);
     1816        MythDB::DBError("ChannelUtil::GetChannels()", query);
    18101817        return list;
    18111818    }
    18121819
     
    18241831            query.value(7).toUInt(),                      /* mplexid    */
    18251832            query.value(8).toBool(),                      /* visible    */
    18261833            query.value(5).toString(),                    /* name       */
    1827             query.value(6).toString());                   /* icon       */
     1834            query.value(6).toString(),                    /* icon       */
     1835            query.value(9).toUInt(),                      /* sourceid   */
     1836            query.value(11).toUInt(),                     /* cardid     */
     1837            query.value(10).toUInt());                    /* grpid      */
    18281838
    18291839        list.push_back(chan);
    18301840    }
     
    19922002    }
    19932003}
    19942004
    1995 void ChannelUtil::EliminateDuplicateChanNum(DBChanList &list)
    1996 {
    1997     typedef std::set<QString> seen_set;
    1998     seen_set seen;
    1999 
    2000     DBChanList::iterator it = list.begin();
    2001 
    2002     while (it != list.end())
    2003     {
    2004         QString tmp = it->channum; tmp.detach();
    2005         std::pair<seen_set::iterator, bool> insret = seen.insert(tmp);
    2006         if (insret.second)
    2007             ++it;
    2008         else
    2009             it = list.erase(it);
    2010     }
    2011 }
    2012 
    20132005uint ChannelUtil::GetNextChannel(
    20142006    const DBChanList &sorted,
    20152007    uint              old_chanid,
    20162008    uint              mplexid_restriction,
    2017     int               direction)
     2009    int               direction,
     2010    bool              skip_non_visible,
     2011    bool              skip_same_channum_and_callsign)
    20182012{
     2013    // TODO implement skip_same_channum_and_callsign
     2014
    20192015    DBChanList::const_iterator it =
    20202016        find(sorted.begin(), sorted.end(), old_chanid);
    20212017
     
    20262022        return 0; // no channels..
    20272023
    20282024    DBChanList::const_iterator start = it;
    2029     bool skip_non_visible = true; // TODO make DB selectable
    20302025
    20312026    if (CHANNEL_DIRECTION_DOWN == direction)
    20322027    {
  • libs/libmythtv/tv_play.cpp

     
    69166916        QString chaninput = GetQueuedInput();
    69176917        if (browsehelper->IsBrowsing())
    69186918        {
     6919            uint sourceid = 0;
     6920            ctx->LockPlayingInfo(__FILE__, __LINE__);
     6921            if (ctx->playingInfo)
     6922                sourceid = ctx->playingInfo->GetSourceID();
     6923            ctx->UnlockPlayingInfo(__FILE__, __LINE__);
     6924
    69196925            commited = true;
    69206926            if (channum.isEmpty())
    69216927                channum = browsehelper->GetBrowsedInfo().m_channum;
     6928            uint chanid = browsehelper->GetChanId(
     6929                channum, ctx->GetCardID(), sourceid);
     6930            if (chanid)
     6931                browsehelper->BrowseChannel(ctx, channum);
    69226932
    6923             if ((ctx->recorder && ctx->recorder->CheckChannel(channum)) ||
    6924                 (db_browse_all_tuners &&
    6925                  browsehelper->BrowseAllGetChanId(channum)))
    6926             {
    6927                 browsehelper->BrowseChannel(ctx, channum);
    6928             }
    69296933            HideOSDWindow(ctx, "osd_input");
    69306934        }
    69316935        else if (GetQueuedChanID() || !channum.isEmpty())
     
    69576961                return;
    69586962            }
    69596963            // Collect channel info
    6960             const ProgramInfo pginfo(*ctx->playingInfo);
    6961             old_chanid = pginfo.GetChanID();
     6964            old_chanid = ctx->playingInfo->GetChanID();
    69626965            ctx->UnlockPlayingInfo(__FILE__, __LINE__);
    69636966        }
    69646967
  • libs/libmythdb/mythversion.h

     
    3030 *       mythtv/bindings/python/MythTV/static.py (version number)
    3131 *       mythtv/bindings/python/MythTV/mythproto.py (layout)
    3232 */
    33 #define MYTH_PROTO_VERSION "64"
    34 #define MYTH_PROTO_TOKEN "8675309J"
     33#define MYTH_PROTO_VERSION "63"
     34#define MYTH_PROTO_TOKEN "3875641D"
    3535
    3636MPUBLIC const char *GetMythSourceVersion();
    3737
  • programs/mythfrontend/guidegrid.cpp

     
    172172        changrpid = gCoreContext->GetNumSetting("ChannelGroupDefault", -1);
    173173
    174174    // check there are some channels setup
    175     DBChanList channels = ChannelUtil::GetChannels(0, true, "", changrpid);
     175    DBChanList channels = ChannelUtil::GetChannels(
     176        0, true, "", (changrpid<0) ? 0 : changrpid);
    176177    if (!channels.size())
    177178    {
    178179        QString message;
     
    835836    m_channelInfoIdx.clear();
    836837    m_currentStartChannel = 0;
    837838
    838     DBChanList channels = ChannelUtil::GetChannels(0, true, "", m_changrpid);
     839    DBChanList channels = ChannelUtil::GetChannels(
     840        0, true, "", (m_changrpid < 0) ? 0 : m_changrpid);
    839841    ChannelUtil::SortChannels(channels, m_channelOrdering, false);
    840842
    841843    typedef vector<uint> uint_list_t;