[EPG] Add programme icon support (when grabbing from xmlTV)
|Assignee:||Adam Sutton||% Done:|
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).
#1 Updated by Hanspeter Müller about 2 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 http://www.tvtv.de/senderlistings.php?sgrp=b215 (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
#2 Updated by Phil Tu about 2 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 ^^) : http://kevinpato.free.fr/
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="http://guidetv-iphone.telerama.fr/verytv/procedures/images/2015-09-26_12_09:55.jpg" /> ... </programme>
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.
I suppose Kodi can handle that : in Kodi source Github repository, file : xbmc/epg/EpgDatabase.cpp, I can see a
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...
#3 Updated by Phil Tu about 2 years ago
- File image.png added
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 = 'http://guidetv-iphone.telerama.fr/verytv/procedures/images/2015-09-26_12_09:55.jpg' WHERE [...]
And the result is in the attached file below.
IT WORKS !
tvheadend "just" needs to transmit the information when syncing the EPG. If it is possible.
#5 Updated by Jaroslav Kysela about 2 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset tvheadend|4099b1e24aa8f81c7f67059e77d45afdeaa4c7b3.
#8 Updated by Bing Ho over 1 year 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="I66.3.90168.schedulesdirect.org" 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="https://s3.amazonaws.com/schedulesdirect/assets/p184128_b_v3_aa.jpg" /> </programme>