Opened 15 years ago
Closed 14 years ago
#6992 closed defect (fixed)
frontend caches wrong channel icon when filename is similar
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - General | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
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.
Attachments (1)
Change History (2)
Changed 15 years ago by
Attachment: | wrong_icon.patch added |
---|
comment:1 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
(In [24637]) Fix channel icon selection when different channels have similar-ending file names.
Fixes #6992 with patch from Mike Rice.