Epgdb » History » Revision 5
Revision 4 (Dave Chapman, 2012-11-13 00:20) → Revision 5/23 (Dave Chapman, 2012-11-13 00:47)
h1. EPG database structure
This page is a work-in-progress to document the internal EPG database structure in tvh.
The "HTSP" column indicates the name of the field in the HTSP event message.
The "Populated from" columns indicate which EPG grabbers can populate that field.
{{toc}}
h2. Brand object - epg_brand_t
[brandId is in HTSP]
h2. Season object - epg_season_t
[seasonId is in HTSP]
h2. Episode object - epg_episode_t
|\4=. |\3=. | |\4=.Populated from|
|_.Field|_.Type|_.Description|_.HTSP| |_.Field|_.Type|_.Description| |_.DVB EIT|_.OpenTV|_.XML TV|_.PyEPG|
|id|uint32_t|Internal ID|episodeId| ID| | | | | |
|uri|char*|Unique ID (from grabber)| | | | | | |
|title|lang_str_t*|Title|title| |title|lang_str_t*|Title| | | | | |
|subtitle|lang_str_t*|Sub-title| | | | | | |
|summary|lang_str_t*|Summary|summary*| |summary|lang_str_t*|Summary| | | | | |
|description|lang_str_t*|An extended description|description*| description| | | | | |
|image|char*|URL of episode image|image| image| | | | | |
|genre|epg_genre_list_t|Episode genre(s)| | | | | | |
|epnum|epg_episode_num_t|Episode numbering| | | | | | |
|is_bw|uint8_t|Is black and white| | | | | | |
|star_rating|uint8_t|Star rating|starRating| rating| | | | | |
|age_rating|uint8_t|Age certificate|ageRating| certificate| | | | | |
|first_aired|time_t|Original airdate|firstAired| airdate| | | | | |
|brand|epg_brand_t*|(Grand-)Parent brand| | | | | | |
|season|epg_season_t*|Parent season| | | | | | |
|broadcasts|epg_broadcast_list_t|Broadcast list| | | | | | |
* summary/description will be replaced with the versions in the specific broadcast, if they differ.
??? Where is HTSP "contentType" from?
h3. Episode numbering object - epg_episode_num_t:
This is for some back-compat and also to allow episode information to be "collated" into easy to use object
|\4=. |\3=. | |\4=.Populated from|
|_.Field|_.Type|_.Description|_.HTSP| |_.Field|_.Type|_.Description| |_.DVB EIT|_.OpenTV|_.XML TV|_.PyEPG|
|s_num|uint16_t|Series number|seasonNumber| number| | | | | |
|s_cnt|uint16_t|Series count|seasonCount| count| | | | | |
|e_num|uint16_t|Episode number|episodeNumber| number| | | | | |
|e_cnt|uint16_t|Episode count|episodeCount| count| | | | | |
|p_num|uint16_t|Part number|partNumber| number| | | | | |
|p_cnt|uint16_t|Part count|partCount| count| | | | | |
|text|char*|Arbitary text description of episode num|episodeOnscreen| num| | | | | |
h2. Broadcast object - epg_broadcast_t
This object contains the details of a specific airing (channel & time) of an episode.
|\3=. | |\4=.Populated from|
|_.Field|_.Type|_.Description|_.HTSP| |_.Field|_.Type|_.Description| |_.DVB EIT|_.OpenTV|_.XML TV|_.PyEPG|
|id|uint32_t|Internal ID|eventId| ID| | | | | |
|uri|char*|Unique ID (from grabber)| | | | | | |
|dvb_eit|uint16_t|DVB Event ID| | | | | | |
|start|time_t|Start time (UTC)|start| (UTC)| | | | | |
|stop|time_t|Stop time (UTC)|stop| (UTC)| | | | | |
|is_widescreen|uint8_t|Is widescreen| | | | | | |
|is_hd|uint8_t|Is HD| | | | | | |
|lines|uint16_t|Lines in image (quality)| | | | | | |
|aspect|uint16_t|Aspect ratio (*100)| | | | | | |
|is_deafsigned|uint8_t|In screen signing| | | | | | |
|is_subtitled|uint8_t|Teletext subtitles| | | | | | |
|is_new|uint8_t|New series / film premiere| | | | | | |
|is_repeat|uint8_t|Repeat screening| | | | | | |
|summary|lang_str_t*|Summary|summary*| |summary|lang_str_t*|Summary| | | | | |
|description|lang_str_t*|An extended description|description*| description| | | | | |
|episode|epg_episode_t*|Link to tvheadend episode object| | | | | | |
|serieslink|epg_serieslink_t*|SeriesLink|serieslinkid| |serieslink|epg_serieslink_t*|SeriesLink| | | | | |
|channel|struct channel*|Channel being broadcast on|channelId| on| | | | | |
* summary/description will override the versions in the episode object
This page is a work-in-progress to document the internal EPG database structure in tvh.
The "HTSP" column indicates the name of the field in the HTSP event message.
The "Populated from" columns indicate which EPG grabbers can populate that field.
{{toc}}
h2. Brand object - epg_brand_t
[brandId is in HTSP]
h2. Season object - epg_season_t
[seasonId is in HTSP]
h2. Episode object - epg_episode_t
|\4=. |\3=. | |\4=.Populated from|
|_.Field|_.Type|_.Description|_.HTSP| |_.Field|_.Type|_.Description| |_.DVB EIT|_.OpenTV|_.XML TV|_.PyEPG|
|id|uint32_t|Internal ID|episodeId| ID| | | | | |
|uri|char*|Unique ID (from grabber)| | | | | | |
|title|lang_str_t*|Title|title| |title|lang_str_t*|Title| | | | | |
|subtitle|lang_str_t*|Sub-title| | | | | | |
|summary|lang_str_t*|Summary|summary*| |summary|lang_str_t*|Summary| | | | | |
|description|lang_str_t*|An extended description|description*| description| | | | | |
|image|char*|URL of episode image|image| image| | | | | |
|genre|epg_genre_list_t|Episode genre(s)| | | | | | |
|epnum|epg_episode_num_t|Episode numbering| | | | | | |
|is_bw|uint8_t|Is black and white| | | | | | |
|star_rating|uint8_t|Star rating|starRating| rating| | | | | |
|age_rating|uint8_t|Age certificate|ageRating| certificate| | | | | |
|first_aired|time_t|Original airdate|firstAired| airdate| | | | | |
|brand|epg_brand_t*|(Grand-)Parent brand| | | | | | |
|season|epg_season_t*|Parent season| | | | | | |
|broadcasts|epg_broadcast_list_t|Broadcast list| | | | | | |
* summary/description will be replaced with the versions in the specific broadcast, if they differ.
??? Where is HTSP "contentType" from?
h3. Episode numbering object - epg_episode_num_t:
This is for some back-compat and also to allow episode information to be "collated" into easy to use object
|\4=. |\3=. | |\4=.Populated from|
|_.Field|_.Type|_.Description|_.HTSP| |_.Field|_.Type|_.Description| |_.DVB EIT|_.OpenTV|_.XML TV|_.PyEPG|
|s_num|uint16_t|Series number|seasonNumber| number| | | | | |
|s_cnt|uint16_t|Series count|seasonCount| count| | | | | |
|e_num|uint16_t|Episode number|episodeNumber| number| | | | | |
|e_cnt|uint16_t|Episode count|episodeCount| count| | | | | |
|p_num|uint16_t|Part number|partNumber| number| | | | | |
|p_cnt|uint16_t|Part count|partCount| count| | | | | |
|text|char*|Arbitary text description of episode num|episodeOnscreen| num| | | | | |
h2. Broadcast object - epg_broadcast_t
This object contains the details of a specific airing (channel & time) of an episode.
|\3=. | |\4=.Populated from|
|_.Field|_.Type|_.Description|_.HTSP| |_.Field|_.Type|_.Description| |_.DVB EIT|_.OpenTV|_.XML TV|_.PyEPG|
|id|uint32_t|Internal ID|eventId| ID| | | | | |
|uri|char*|Unique ID (from grabber)| | | | | | |
|dvb_eit|uint16_t|DVB Event ID| | | | | | |
|start|time_t|Start time (UTC)|start| (UTC)| | | | | |
|stop|time_t|Stop time (UTC)|stop| (UTC)| | | | | |
|is_widescreen|uint8_t|Is widescreen| | | | | | |
|is_hd|uint8_t|Is HD| | | | | | |
|lines|uint16_t|Lines in image (quality)| | | | | | |
|aspect|uint16_t|Aspect ratio (*100)| | | | | | |
|is_deafsigned|uint8_t|In screen signing| | | | | | |
|is_subtitled|uint8_t|Teletext subtitles| | | | | | |
|is_new|uint8_t|New series / film premiere| | | | | | |
|is_repeat|uint8_t|Repeat screening| | | | | | |
|summary|lang_str_t*|Summary|summary*| |summary|lang_str_t*|Summary| | | | | |
|description|lang_str_t*|An extended description|description*| description| | | | | |
|episode|epg_episode_t*|Link to tvheadend episode object| | | | | | |
|serieslink|epg_serieslink_t*|SeriesLink|serieslinkid| |serieslink|epg_serieslink_t*|SeriesLink| | | | | |
|channel|struct channel*|Channel being broadcast on|channelId| on| | | | | |
* summary/description will override the versions in the episode object