uint8_t is_new; ///< New series / file premiere
uint8_t is_repeat; ///< Repeat screening
- RB_ENTRY(epg_broadcast) slink; ///< Schedule link
RB_ENTRY(epg_broadcast) elink; ///< Episode link
epg_episode_t *episode; ///< Episode shown
epg_channel_t *channel; ///< Channel being broadcast on
* Compatibility code
* ***********************************************************************/
+#ifndef TODO_REMOVE_EPG_COMPAT
+
typedef struct _epg_episode {
uint16_t ee_season;
_epg_episode_t e_episode;
} event_t;
-#if 0
-
-void epg_event_updated(event_t *e);
-
-event_t *epg_event_create(channel_t *ch, time_t start, time_t stop,
- int dvb_id, int *created);
-
-event_t *epg_event_find_by_time(channel_t *ch, time_t t);
-
-event_t *epg_event_find_by_id(int eventid);
-
-void epg_unlink_from_channel(channel_t *ch);
-
-
-/**
- *
- */
-uint8_t epg_content_group_find_by_name(const char *name);
-
-const char *epg_content_group_get_name(uint8_t type);
-
-/**
- *
- */
-typedef struct epg_query_result {
- event_t **eqr_array;
- int eqr_entries;
- int eqr_alloced;
-} epg_query_result_t;
-
-void epg_query0(epg_query_result_t *eqr, channel_t *ch, channel_tag_t *ct,
- uint8_t type, const char *title);
-void epg_query(epg_query_result_t *eqr, const char *channel, const char *tag,
- const char *contentgroup, const char *title);
-void epg_query_free(epg_query_result_t *eqr);
-void epg_query_sort(epg_query_result_t *eqr);
#endif
#endif /* EPG_H */
channel_tag_t *ct;
service_t *t;
epg_broadcast_t *now, *next = NULL;
+ printf("htsp_build_channel(%s)\n", ch->ch_name);
htsmsg_t *out = htsmsg_create_map();
htsmsg_t *tags = htsmsg_create_list();
if (ch->ch_epg_channel) {
now = ch->ch_epg_channel->now;
next = ch->ch_epg_channel->next;
+ printf(" now = %p, next = %p\n", now, next);
htsmsg_add_u32(out, "eventId", now ? now->_.id : 0);
htsmsg_add_u32(out, "nextEventId", next ? next->_.id : 0);
}
#if TODO_DVR
dvr_entry_t *de;
#endif
+ printf("htsp_build_event(%p, %lu)\n", e, e->_.id);
out = htsmsg_create_map();
htsmsg_add_u32(out, "eventId", e->_.id);
-#if TODO_EPG_CHANNEL
- htsmsg_add_u32(out, "channelId", e->e_channel->ch_id);
-#endif
+ htsmsg_add_u32(out, "channelId", e->channel->channel->ch_id);
htsmsg_add_u32(out, "start", e->start);
htsmsg_add_u32(out, "stop", e->stop);
if(e->episode->title != NULL)
if(htsmsg_get_u32(in, "numFollowing", &numFollowing))
return htsp_error("Missing argument 'numFollowing'");
+ printf("htsp_method_getEvents(%d, %d)\n", eventid, numFollowing);
if((e = epg_broadcast_find_by_id(eventid, NULL)) == NULL) {
return htsp_error("Event does not exist");
if(htsmsg_get_u32(in, "eventId", &eventid))
return htsp_error("Missing argument 'eventId'");
+ printf("htsp_method_getEvent(%d)", eventid);
if((e = epg_broadcast_find_by_id(eventid, NULL)) == NULL)
return htsp_error("Event does not exist");