Modify

Ticket #10659 (new Bug Report - General)

Opened 13 months ago

Last modified 13 months ago

mfdb put icons from xmltv grabbers into local storage instead of the SG

Reported by: dekarl@… Owned by: stuartm
Priority: minor Milestone: unknown
Component: MythTV - Mythfilldatabase Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

mythfilldatabase was not converted to store the channel icons in the storage group in [cda7871]

The database update should just store the filename instead of the absolute path in IconData::Save in mythtv/programs/mythfilldatabase/icondata.cpp https://github.com/MythTV/mythtv/blob/master/mythtv/programs/mythfilldatabase/icondata.cpp#L291

MSqlQuery update(MSqlQuery::InitCon());
update.prepare(
    "UPDATE channel SET icon = :ICON "
    "WHERE chanid = :CHANID");

update.bindValue(":ICON", fi.filename);
update.bindValue(":CHANID", fi.chanid);

fi.filename is the absolute path where the icon gets stored. Its the same location where the storage group points to.

the Qt API suggests that this might strip the directory off the filename

update.bindValue(":ICON", QFileInfo(fi.filename).fileName());

notice the subtle difference between http://qt-project.org/doc/qt-4.8/qfile.html#fileName and http://qt-project.org/doc/qt-4.8/qfileinfo.html#fileName

Attachments

Change History

comment:1 Changed 13 months ago by dekarl@…

Looking further into it, now that I'm at home I notice the following.

The SG is named "ChannelIcons?" in the definition but the lookup goes to "ChannelIcon?" without "s" in many places (see [cda7871]) In limited testing on master, from some days ago, both mfdb and setup write the absolute path instead of just the filename into the "icon" column of the "channel" table.

View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.