diff --git a/epg.c b/epg.c index d7fdb205..010042c6 100644 --- a/epg.c +++ b/epg.c @@ -487,6 +487,20 @@ epg_transfer_events(th_channel_t *ch, struct event_queue *src, epg_unlock(); } +static const char *groupnames[16] = { + [1] = "Movie / Drama", + [2] = "News / Current affairs", + [3] = "Show / Games", + [4] = "Sports", + [5] = "Children's/Youth", + [6] = "Music", + [7] = "Art/Culture", + [8] = "Social/Political issues/Economics", + [9] = "Education/Science/Factual topics", + [10] = "Leisure hobbies", + [11] = "Special characteristics", +}; + /** * Find a content type */ @@ -502,8 +516,7 @@ epg_content_type_find_by_dvbcode(uint8_t dvbcode) ecg = epg_content_groups[group]; if(ecg == NULL) { ecg = epg_content_groups[group] = calloc(1, sizeof(epg_content_group_t)); - snprintf(buf, sizeof(buf), "group%d", group); - ecg->ecg_name = strdup(buf); + ecg->ecg_name = groupnames[group] ?: "Unknown"; } ect = ecg->ecg_types[type]; diff --git a/epg.h b/epg.h index 48a2660d..ec27a1a9 100644 --- a/epg.h +++ b/epg.h @@ -19,6 +19,8 @@ #ifndef EPG_H #define EPG_H +extern epg_content_group_t *epg_content_groups[16]; + void epg_init(void); void epg_lock(void); diff --git a/htmlui.c b/htmlui.c index 6a0bf1a2..eedd22cd 100644 --- a/htmlui.c +++ b/htmlui.c @@ -40,6 +40,8 @@ #include "iptv_input.h" #include "transports.h" +#define MAIN_WIDTH 800 + static struct strtab recstatustxt[] = { { "Recording scheduled",HTSTV_PVR_STATUS_SCHEDULED }, { "Recording", HTSTV_PVR_STATUS_RECORDING }, @@ -265,7 +267,7 @@ box_bottom(tcp_queue_t *tq) static void top_menu(http_connection_t *hc, tcp_queue_t *tq) { - tcp_qprintf(tq, "