[mythtv-commits] Ticket #6992: frontend caches wrong channel icon when filename is similar
MythTV
mythtv at cvs.mythtv.org
Sun Sep 6 16:10:23 UTC 2009
#6992: frontend caches wrong channel icon when filename is similar
------------------------------------------------+---------------------------
Reporter: Mike Rice <mikerice1969 at gmail.com> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Mlocked: 0
------------------------------------------------+---------------------------
Frontend requests icon:
{{{
2009-09-06 08:05:19.994 MythSocket(b2f2c40:35): write -> 35 83 ANN
FileTransfer mythfrontend2 0 0
0[]:[]//root/.mythtv/channels/discovery.jpg[]:[]
}}}
Backend sends wrong icon:
{{{
2009-09-06 07:37:40.447 MythSocket(ffffffff9bd6f080:61): read <- 61 83
ANN FileTransfer mythfrontend2 0 0
0[]:[]//root/.mythtv/channels/discovery.jpg[]:[]
2009-09-06 07:37:40.473
RingBuf(/root/.mythtv/channels/military_channel_discovery.jpg):
OpenFile(/root/.mythtv/channels/military_channel_discovery.jpg, 0)
}}}
Due to the following code in mainserver.cpp where the query could return
more than one filename:
{{{
QString file = lpath.section('/', -1);
lpath = "";
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("SELECT icon FROM channel WHERE icon LIKE :FILENAME
;");
query.bindValue(":FILENAME", QString("%") + file);
if (query.exec() && query.isActive() && query.size())
{
query.next();
lpath = query.value(0).toString();
}
}}}
Changing the query as so works for me:
query.bindValue(":FILENAME", QString("%/") + file);
patch attached.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6992>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list