Opened 16 years ago
Closed 16 years ago
#5339 closed defect (fixed)
[PATCH] Fix for missing icon import in 0.21
Reported by: | 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)
Change History (9)
Changed 16 years ago by
Attachment: | mythtv-0.21-importicons.patch added |
---|
comment:1 Changed 16 years ago by
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
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
Attachment: | mythtv-0.21-importicons.2.patch added |
---|
Improved patch that works with both automatic and manual icon searching/assignment
comment:3 Changed 16 years ago by
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
Milestone: | unknown → 0.21.1 |
---|---|
Owner: | changed from Isaac Richards to paulh |
Status: | new → assigned |
Didn't realize trac doesn't play nice with inline patches