Ticket #6948: 6948-v1.patch
File 6948-v1.patch, 24.2 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/dbchannelinfo.cpp
24 24 const QString &_channum, const QString &_callsign, 25 25 uint _chanid, uint _major_chan, uint _minor_chan, 26 26 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) : 28 29 channum(_channum), 29 callsign(_callsign), chanid(_chanid), 30 callsign(_callsign), 31 name(_name), icon((_icon == "none") ? QString() : _icon), 32 chanid(_chanid), 30 33 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) 33 37 { 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;40 38 } 41 39 42 40 DBChannel &DBChannel::operator=(const DBChannel &other) 43 41 { 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; 46 46 chanid = other.chanid; 47 47 major_chan = other.major_chan; 48 48 minor_chan = other.minor_chan; 49 49 mplexid = (other.mplexid == 32767) ? 0 : other.mplexid; 50 sourceid = other.sourceid; 51 cardid = other.cardid; 52 grpid = other.grpid; 50 53 visible = other.visible; 51 name = other.name; name.detach();52 icon = other.icon; icon.detach();53 54 54 55 return *this; 55 56 } -
libs/libmythtv/channelutil.h
148 148 static QString GetVideoFilters(uint sourceid, const QString &channum) 149 149 { return GetChannelValueStr("videofilters", sourceid, channum); } 150 150 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); 153 154 static vector<uint> GetChanIDs(int sourceid = -1); 154 155 static uint GetChannelCount(int sourceid = -1); 155 156 static void SortChannels(DBChanList &list, const QString &order, 156 157 bool eliminate_duplicates = false); 157 static void EliminateDuplicateChanNum(DBChanList &list);158 158 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); 163 165 164 166 static QString GetChannelValueStr(const QString &channel_field, 165 167 uint sourceid, -
libs/libmythtv/dbchannelinfo.h
25 25 DBChannel(const QString &_channum, const QString &_callsign, 26 26 uint _chanid, uint _major_chan, uint _minor_chan, 27 27 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); 29 30 DBChannel& operator=(const DBChannel&); 30 31 31 32 bool operator == (uint _chanid) const … … 34 35 public: 35 36 QString channum; 36 37 QString callsign; 38 QString name; 39 QString icon; 37 40 uint chanid; 38 41 uint major_chan; 39 42 uint minor_chan; 40 43 uint mplexid; 44 uint sourceid; 45 uint cardid; 46 uint grpid; 41 47 bool visible; 42 QString name;43 QString icon;44 48 }; 45 49 typedef vector<DBChannel> DBChanList; 46 50 -
libs/libmythtv/dbcheck.cpp
20 20 mythtv/bindings/perl/MythTV.pm 21 21 */ 22 22 /// This is the DB schema version expected by the running MythTV instance. 23 const QString currentDatabaseVersion = "126 4";23 const QString currentDatabaseVersion = "1265"; 24 24 25 25 static bool UpdateDBVersionNumber(const QString &newnumber, QString &dbver); 26 26 static bool performActualUpdate( … … 5502 5502 return false; 5503 5503 } 5504 5504 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;", 5523 NULL 5524 }; 5525 if (!performActualUpdate(updates, "1265", dbver)) 5526 return false; 5527 } 5528 5505 5529 return true; 5506 5530 } 5507 5531 -
libs/libmythtv/channelbase.cpp
840 840 m_allchannels.insert(m_allchannels.end(), 841 841 channels.begin(), channels.end()); 842 842 } 843 ChannelUtil::SortChannels(m_allchannels, order); 844 ChannelUtil::EliminateDuplicateChanNum(m_allchannels); 843 ChannelUtil::SortChannels(m_allchannels, order, true); 845 844 846 845 m_currentInputID = GetDefaultInput(cardid); 847 846 -
libs/libmythtv/tvbrowsehelper.h
4 4 #define _TV_BROWSE_HELPER_H_ 5 5 6 6 #include <QWaitCondition> 7 #include <QMultiMap> 7 8 #include <QThread> 8 9 #include <QString> 10 #include <QHash> 9 11 10 12 #include "dbchannelinfo.h" // for DBChanList 11 13 #include "programtypes.h" // for InfoMap … … 19 21 { 20 22 public: 21 23 BrowseInfo(BrowseDirection dir) : 22 m_dir(dir), m_chanid(0) 24 m_dir(dir), m_chanid(0), m_sourceid(0) 23 25 { 24 26 } 25 27 BrowseInfo(BrowseDirection dir, 26 28 const QString &channum, 27 29 uint chanid, 28 30 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) 31 34 { 32 35 } 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 } 33 42 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 34 56 BrowseDirection m_dir; 35 57 QString m_channum; 36 58 uint m_chanid; 37 59 QString m_starttime; 60 uint m_sourceid; 38 61 }; 39 62 40 63 … … 82 105 BrowseDispInfo(ctx, bi); 83 106 } 84 107 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); 90 109 91 110 BrowseInfo GetBrowsedInfo(void) const; 92 111 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; 94 114 95 115 protected: 96 116 void GetNextProgram(BrowseDirection direction, InfoMap &infoMap) const; … … 99 119 virtual void run(); 100 120 101 121 TV *m_tv; 102 DBChanList db_browse_all_channels; 122 DBChanList db_all_channels; 123 DBChanList db_all_visible_channels; 103 124 QString db_time_format; 104 125 QString db_short_date_format; 105 126 uint db_browse_max_forward; 106 127 bool db_browse_all_tuners; 107 128 bool db_use_channel_groups; 129 QHash<uint,QString> db_chanid_to_channum; 130 QMultiMap<QString,uint> db_channum_to_chanids; 108 131 109 132 mutable QMutex m_lock; // protects variables below 110 133 PlayerContext *m_ctx; -
libs/libmythtv/tvbrowsehelper.cpp
6 6 #include "playercontext.h" 7 7 #include "remoteencoder.h" 8 8 #include "recordinginfo.h" 9 #include "cardutil.h" 9 10 #include "tv_play.h" 10 11 12 #define LOC QString("BH: ") 13 #define LOC_WARN QString("BH Warning: ") 14 #define LOC_ERR QString("BH Error: ") 15 11 16 #define GetPlayer(X,Y) GetPlayerHaveLock(X, Y, __FILE__ , __LINE__) 12 17 #define GetOSDLock(X) GetOSDL(X, __FILE__, __LINE__) 13 18 … … 39 44 m_chanid(0), 40 45 m_run(true) 41 46 { 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) 43 54 { 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); 48 57 } 49 58 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 50 64 start(); 51 65 } 52 66 … … 140 154 141 155 void TVBrowseHelper::BrowseDispInfo(PlayerContext *ctx, BrowseInfo &bi) 142 156 { 143 VERBOSE(VB_IMPORTANT, "BrowseDispInfo()"); 157 VERBOSE(VB_IMPORTANT, QString("BrowseDispInfo(..%1)") 158 .arg(bi.toString())); 144 159 145 160 if (!gCoreContext->IsUIThread()) 146 161 return; … … 165 180 m_wait.wakeAll(); 166 181 } 167 182 183 void 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 168 210 BrowseInfo TVBrowseHelper::GetBrowsedInfo(void) const 169 211 { 170 212 QMutexLocker locker(&m_lock); … … 189 231 return m_ctx != NULL; 190 232 } 191 233 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 */ 241 uint TVBrowseHelper::GetChanId( 242 const QString &channum, uint pref_cardid, uint pref_sourceid) const 194 243 { 195 DBChanList::const_iterator it = db_browse_all_channels.begin(); 196 for (; it != db_browse_all_channels.end(); ++it) 244 if (pref_sourceid) 197 245 { 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 } 200 252 } 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 201 274 return 0; 202 275 } 203 276 … … 273 346 { 274 347 uint chanid = infoMap["chanid"].toUInt(); 275 348 if (!chanid) 276 chanid = BrowseAllGetChanId(infoMap["channum"]); 349 { 350 VERBOSE(VB_IMPORTANT, LOC_ERR + 351 "GetNextProgramDB() requires a chanid"); 352 return; 353 } 277 354 278 355 int chandir = -1; 279 356 switch (direction) … … 282 359 case BROWSE_DOWN: chandir = CHANNEL_DIRECTION_DOWN; break; 283 360 case BROWSE_FAVORITE: chandir = CHANNEL_DIRECTION_FAVORITE; break; 284 361 } 285 if ( direction != BROWSE_INVALID)362 if (chandir != -1) 286 363 { 287 364 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*/); 289 367 } 290 368 291 infoMap["chanid"] = QString::number(chanid); 369 infoMap["chanid"] = QString::number(chanid); 370 infoMap["channum"] = db_chanid_to_channum[chanid]; 292 371 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 305 372 QDateTime nowtime = QDateTime::currentDateTime(); 306 373 QDateTime latesttime = nowtime.addSecs(6*60*60); 307 374 QDateTime browsetime = QDateTime::fromString( … … 364 431 365 432 PlayerContext *ctx = m_ctx; 366 433 434 vector<uint> chanids; 367 435 if (BROWSE_SAME == bi.m_dir) 368 436 { 369 437 m_channum = bi.m_channum; 370 438 m_chanid = bi.m_chanid; 371 439 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 } 372 447 } 373 448 374 449 BrowseDirection direction = bi.m_dir; … … 438 513 } 439 514 else 440 515 { 516 // TODO handle browse_same... 517 uint orig_chanid = infoMap["chanid"].toUInt(); 441 518 GetNextProgramDB(direction, infoMap); 442 519 while (!m_tv->IsTunable(ctx, infoMap["chanid"].toUInt()) && 443 (infoMap["chan num"] != m_channum))520 (infoMap["chanid"].toUInt() != orig_chanid)) 444 521 { 445 522 GetNextProgramDB(direction, infoMap); 446 523 } -
libs/libmythtv/channelutil.cpp
1768 1768 dvb_transportid, dvb_networkid, dtv_si_std); 1769 1769 } 1770 1770 1771 DBChanList ChannelUtil::GetChannels(uint sourceid, bool vis_only, QString grp, int changrpid) 1771 DBChanList ChannelUtil::GetChannels( 1772 uint sourceid, bool vis_only, QString grp, uint changrpid) 1772 1773 { 1773 1774 DBChanList list; 1774 1775 … … 1777 1778 QString qstr = 1778 1779 "SELECT channum, callsign, channel.chanid, " 1779 1780 " 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 "; 1782 1787 1783 // Select only channels from the specified channel group 1784 if (changrpid > -1) 1785 qstr += QString(",channelgroup "); 1788 QString cond = " WHERE "; 1786 1789 1787 1790 if (sourceid) 1791 { 1788 1792 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 } 1793 1795 1794 if (changrpid > -1) 1796 // Select only channels from the specified channel group 1797 if (changrpid > 0) 1795 1798 { 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 "; 1798 1802 } 1799 1803 1800 1804 if (vis_only) 1801 qstr += "AND visible=1 "; 1805 { 1806 qstr += QString("%1 visible=1 ").arg(cond); 1807 cond = " AND "; 1808 } 1802 1809 1803 1810 if (!grp.isEmpty()) 1804 qstr += QString(" GROUP BY %1 ").arg(grp);1811 qstr += QString(" GROUP BY %1 ").arg(grp); 1805 1812 1806 1813 query.prepare(qstr); 1807 if (!query.exec() || !query.isActive())1814 if (!query.exec()) 1808 1815 { 1809 MythDB::DBError(" get channels -- sourceid", query);1816 MythDB::DBError("ChannelUtil::GetChannels()", query); 1810 1817 return list; 1811 1818 } 1812 1819 … … 1824 1831 query.value(7).toUInt(), /* mplexid */ 1825 1832 query.value(8).toBool(), /* visible */ 1826 1833 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 */ 1828 1838 1829 1839 list.push_back(chan); 1830 1840 } … … 1992 2002 } 1993 2003 } 1994 2004 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 else2009 it = list.erase(it);2010 }2011 }2012 2013 2005 uint ChannelUtil::GetNextChannel( 2014 2006 const DBChanList &sorted, 2015 2007 uint old_chanid, 2016 2008 uint mplexid_restriction, 2017 int direction) 2009 int direction, 2010 bool skip_non_visible, 2011 bool skip_same_channum_and_callsign) 2018 2012 { 2013 // TODO implement skip_same_channum_and_callsign 2014 2019 2015 DBChanList::const_iterator it = 2020 2016 find(sorted.begin(), sorted.end(), old_chanid); 2021 2017 … … 2026 2022 return 0; // no channels.. 2027 2023 2028 2024 DBChanList::const_iterator start = it; 2029 bool skip_non_visible = true; // TODO make DB selectable2030 2025 2031 2026 if (CHANNEL_DIRECTION_DOWN == direction) 2032 2027 { -
libs/libmythtv/tv_play.cpp
6916 6916 QString chaninput = GetQueuedInput(); 6917 6917 if (browsehelper->IsBrowsing()) 6918 6918 { 6919 uint sourceid = 0; 6920 ctx->LockPlayingInfo(__FILE__, __LINE__); 6921 if (ctx->playingInfo) 6922 sourceid = ctx->playingInfo->GetSourceID(); 6923 ctx->UnlockPlayingInfo(__FILE__, __LINE__); 6924 6919 6925 commited = true; 6920 6926 if (channum.isEmpty()) 6921 6927 channum = browsehelper->GetBrowsedInfo().m_channum; 6928 uint chanid = browsehelper->GetChanId( 6929 channum, ctx->GetCardID(), sourceid); 6930 if (chanid) 6931 browsehelper->BrowseChannel(ctx, channum); 6922 6932 6923 if ((ctx->recorder && ctx->recorder->CheckChannel(channum)) ||6924 (db_browse_all_tuners &&6925 browsehelper->BrowseAllGetChanId(channum)))6926 {6927 browsehelper->BrowseChannel(ctx, channum);6928 }6929 6933 HideOSDWindow(ctx, "osd_input"); 6930 6934 } 6931 6935 else if (GetQueuedChanID() || !channum.isEmpty()) … … 6957 6961 return; 6958 6962 } 6959 6963 // Collect channel info 6960 const ProgramInfo pginfo(*ctx->playingInfo); 6961 old_chanid = pginfo.GetChanID(); 6964 old_chanid = ctx->playingInfo->GetChanID(); 6962 6965 ctx->UnlockPlayingInfo(__FILE__, __LINE__); 6963 6966 } 6964 6967 -
libs/libmythdb/mythversion.h
30 30 * mythtv/bindings/python/MythTV/static.py (version number) 31 31 * mythtv/bindings/python/MythTV/mythproto.py (layout) 32 32 */ 33 #define MYTH_PROTO_VERSION "6 4"34 #define MYTH_PROTO_TOKEN " 8675309J"33 #define MYTH_PROTO_VERSION "63" 34 #define MYTH_PROTO_TOKEN "3875641D" 35 35 36 36 MPUBLIC const char *GetMythSourceVersion(); 37 37 -
programs/mythfrontend/guidegrid.cpp
172 172 changrpid = gCoreContext->GetNumSetting("ChannelGroupDefault", -1); 173 173 174 174 // 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); 176 177 if (!channels.size()) 177 178 { 178 179 QString message; … … 835 836 m_channelInfoIdx.clear(); 836 837 m_currentStartChannel = 0; 837 838 838 DBChanList channels = ChannelUtil::GetChannels(0, true, "", m_changrpid); 839 DBChanList channels = ChannelUtil::GetChannels( 840 0, true, "", (m_changrpid < 0) ? 0 : m_changrpid); 839 841 ChannelUtil::SortChannels(channels, m_channelOrdering, false); 840 842 841 843 typedef vector<uint> uint_list_t;