Opened 16 years ago

Closed 16 years ago

#5339 closed defect (fixed)

[PATCH] Fix for missing icon import in 0.21

Reported by: mythtv@… Owned by: paulh
Priority: minor Milestone: 0.21.1
Component: mythtv Version: 0.21-fixes
Severity: medium Keywords: icons importicons
Cc: Ticket locked: no

Description

The manual icon search/import functionality in 0.21-fixes (17294) is broken. You can search the icon, select it, update it, and even submit it, but the data never gets put into your DB because the wrong iterator is checked inside of ImportIconsWizard::checkAndDownload()

The following diff seems to fix things for me:

Index: libs/libmythtv/importicons.cpp =================================================================== --- libs/libmythtv/importicons.cpp (revision 17294) +++ libs/libmythtv/importicons.cpp (working copy) @@ -481,7 +481,7 @@

query.prepare(qstr); query.bindValue(":ICON", m_strChannelDir+str2);

  • query.bindValue(":CHANID", (*m_iter).strChanId);

+ query.bindValue(":CHANID", (*m_missingIter).strChanId);

if (!query.exec()) {

Attachments (3)

mythtv-0.21-importicons.patch (481 bytes) - added by mythtv@… 16 years ago.
Didn't realize trac doesn't play nice with inline patches
mythtv-0.21-importicons.2.patch (487 bytes) - added by mythtv@… 16 years ago.
Improved patch that works with both automatic and manual icon searching/assignment
importicons-dbinsertfix-svn17293.patch (2.6 KB) - added by Matthew Wire <devel@…> 16 years ago.
Improved fix

Download all attachments as: .zip

Change History (9)

Changed 16 years ago by mythtv@…

Didn't realize trac doesn't play nice with inline patches

comment:1 Changed 16 years ago by mythtv@…

Hrmm, that actually only seems to work for actually manually entering icons. With this change, the automatic scanning seems to segfault mythtv-setup. The issue remains, but the fix isn't that simple. :-/

comment:2 Changed 16 years ago by mythtv@…

Added a newer patch that works with both automatic scanning and manual assignment. From what I can tell, during automatic scanning, the iterator to check is m_iter, while during manual scanning, it's m_missingIter. This patch is really just a hack, and someone who actually knows what they're doing can probably fix it better. (I'm just assigning m_missingIter to m_iter when doing the manual stuff)

Changed 16 years ago by mythtv@…

Improved patch that works with both automatic and manual icon searching/assignment

Changed 16 years ago by Matthew Wire <devel@…>

Improved fix

comment:3 Changed 16 years ago by Matthew Wire <devel@…>

Thanks for spotting this. I've attached an improved fix which passed the local channel ID as a variable to checkAndDownload instead of relying on the global iterator variable. This is cleaner and works for both methods without resorting to copying iterators. It also means the global iterator is no longer used within checkAndDownload.
Patch against trunk but should apply cleanly to fixes as well. Please test this.
Note: there is also a couple of small code indentation fixes in the patch.

comment:4 Changed 16 years ago by paulh

Milestone: unknown0.21.1
Owner: changed from Isaac Richards to paulh
Status: newassigned

comment:5 Changed 16 years ago by paulh

(In [17371]) Fix the manual channel icon import not saving the icons filename back to the DB properly.

Patch from Matthew Wire. Refs #5339.

comment:6 Changed 16 years ago by paulh

Resolution: fixed
Status: assignedclosed

(In [17372]) Merge [17371] from trunk.

Fix the manual channel icon import not saving the icons filename back to the DB properly.

Patch from Matthew Wire. Closes #5339.

Note: See TracTickets for help on using tickets.