Feature #3108

[EPG] Add programme icon support (when grabbing from xmlTV)

Added by Phil Tu over 7 years ago. Updated over 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I hop this has not been demanded yet :)
this is not a big feature, only for cosmetics.
XmlTV allow to specify an icon for each program :
<programme>...<icon... > (same format as a channel icon)
my XmlTV source provides those icons and after a quick search in source code, it appears it is not taken into account.

I would be nice to have personnalized icons for programs. If it is not provided, the channel icon would be displayed (as it is now in Tvheadend UI EPG over http).

Thanks !


image.png (453 KB) image.png Phil Tu, 2015-10-01 11:43



Updated by Hanspeter Müller over 7 years ago


are you talking about an icon of the program that currently running (i.e. a picture of Big Bang Theory Ep 47x11), something like the pictures on (upper row below the channel logo)?

What XMLTV grabbers do support that...? I don't think kodi supports this right now, but one side as to start, would be an awesome feature :)


Updated by Phil Tu over 7 years ago

Yes this is it. More details :

About XmlTv grabber/provider/format

My xmlTv provider grabs its own data from a Tv mag website who shows a picture for each program, and it is mapped in the xmlTv datas (most of the time, the picture is the same for any episodes of the same show). This provider is (only french channels sorry ^^) :

For tvheadend, I use a grabber I wrote (bash script), who fetches the file from this website, do some conversion (for channel icons), and then import it in xmltv.sock. In tvheadend GUI, all EPG grabbers are OFF, only xmltv.sock is activated.

I may provide an xmlTv example if you like. In the xmlTv file I use, those icons are http urls like this :

<programme ... >
   <icon src="" />

I don't kow if you must download those pictures on local network or leave them fetchable over internet. I plan to write a better custom xmltv grabber in Java (Java developper here ^^) who could download those icons and replace their paths with a local url, and do some more actions when a tvheadend API will be available.

About Kodi

I suppose Kodi can handle that : in Kodi source Github repository, file : xbmc/epg/EpgDatabase.cpp, I can see a sIconPath

REPLACE INTO epgtags (idEpg, iStartTime, " 
        "iEndTime, sTitle, sPlotOutline, sPlot, sOriginalTitle, sCast, sDirector, sWriter, iYear, sIMDBNumber, " 
        "sIconPath, iGenreType, iGenreSubType, sGenre, iFirstAired, iParentalRating, iStarRating, bNotify, iSeriesId, " 
        "iEpisodeId, iEpisodePart, sEpisodeName, iBroadcastUid) " 
        "VALUES (

I don't know if it is rendered. I may try this Week end to force a value directly in Kodi EPG database to see what happens in Kodi UI.

I also don't know how EPG is imported in Kodi and if the transfer format permits to set an icon for a program...


Updated by Phil Tu over 7 years ago

Good news every one !
Just tested in Kodi last evening:
I updated directly the Kodi Epg database, and put values in epg_tags.sIconPath.

UPDATE epg_tags SET sIconPath = '' WHERE [...]

And the result is in the attached file below.

tvheadend "just" needs to transmit the information when syncing the EPG. If it is possible.


Updated by Jaroslav Kysela over 7 years ago

  • Target version set to 4.2

Updated by Jaroslav Kysela over 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|4099b1e24aa8f81c7f67059e77d45afdeaa4c7b3.


Updated by Jaroslav Kysela over 7 years ago

Could you retest with latest v4.1-535-g4099b1e ?


Updated by Phil Tu over 7 years ago

Thanks, that was not a difficult one I suppose :)
Great job !
I will try this weekend, and tell you then.


Updated by Bing Ho over 6 years ago

I currently download my EPG data from Schedules Direct and <programme> tags have an icon source that is a URL rather than a locally cached image file. These do not appear to display correctly with the current tvheadend build 4.1.2195 web interface found in LibreElec alpha. An example below with the <icon src = >. They are viewable in the Kodi 17 beta interface.

<programme channel="" start="20160916230000" stop="20160917000000">
 <title>Walker, Texas Ranger</title>
 <sub-title>The Siege</sub-title>
 <episode-num system="dd_progid">EP00067264.0078</episode-num>
 <episode-num system="xmltv_ns">3.22.</episode-num>
 <desc>"The Siege" • Series; 1996-04-27; S4E23; TVPG • A vacation in the woods with Alex, Walker, Trivette and C.D. becomes a fight for their lives after Alex witnesses a drug deal.</desc>
 <previously-shown start="19960427" />
 <icon src="" />

Also available in: Atom PDF