42 const QString &FieldName )
44 DTC::ChannelIconList *pChannelIcons =
new DTC::ChannelIconList();
45 LOG(VB_GENERAL, LOG_ERR,
46 QString(
"ChannelIcon::LookupChannelIcon - Unexpected FieldName '%1'").arg(FieldName));
48 if (FieldName !=
"callsign" || FieldName !=
"xmltv")
56 QString lookupUrl = QString(
"http://services.mythtv.org/channel-icon/lookup?%1=%2").arg(FieldName).arg(Query);
67 QString response = QString(data.constData());
68 QStringList lines = response.split(
'\n');
70 for (
int x = 0; x < lines.count(); x++)
72 QString line = lines.at(x);
73 QStringList fields = line.split(
',');
75 if (fields.size() >= 4)
77 QString
id = fields.at(2);
78 QString name = fields.at(3);
79 QString url = fields.at(1);
81 DTC::ChannelIcon *pChannelIcon = pChannelIcons->AddNewChannelIcon();
82 pChannelIcon->setChannelIconId(
id.toUInt());
83 pChannelIcon->setIconName(name);
84 pChannelIcon->setURL(url);
98 DTC::ChannelIconList *pChannelIcons =
new DTC::ChannelIconList();
102 QString searchUrl = QString(
"http://services.mythtv.org/channel-icon/search?s=%1").arg(Query);
104 return pChannelIcons;
110 QString response = QString(data.constData());
111 QStringList lines = response.split(
'\n');
113 for (
int x = 0; x < lines.count(); x++)
115 QString line = lines.at(x);
116 QStringList fields = line.split(
',');
118 if (fields.size() >= 3)
120 QString
id = fields.at(0);
121 QString name = fields.at(1);
122 QString url = fields.at(2);
124 DTC::ChannelIcon *pChannelIcon = pChannelIcons->AddNewChannelIcon();
125 pChannelIcon->setChannelIconId(
id.toUInt());
126 pChannelIcon->setIconName(name);
127 pChannelIcon->setURL(url);
131 return pChannelIcons;