continue;
pthread_mutex_lock(&global_lock);
- if ((e = epg_broadcast_find_by_id(atoi(s), NULL))) {
+ if ((e = epg_broadcast_find_by_id(strtoll(s, NULL, 10)))) {
de = dvr_entry_create_by_event(api_dvr_config_name(perm, config_uuid),
e, 0, 0, perm->aa_representative,
NULL, DVR_PRIO_NORMAL, 0);
continue;
pthread_mutex_lock(&global_lock);
- if ((e = epg_broadcast_find_by_id(atoi(s), NULL))) {
+ if ((e = epg_broadcast_find_by_id(strtoll(s, NULL, 10)))) {
dae = dvr_autorec_add_series_link(api_dvr_config_name(perm, config_uuid),
e, perm->aa_representative,
"Created from EPG query");
/* Main Job */
pthread_mutex_lock(&global_lock);
- e = epg_broadcast_find_by_id(id, NULL);
+ e = epg_broadcast_find_by_id(id);
if (e && e->episode)
api_epg_episode_broadcasts(l, lang, e->episode, &entries, e);
pthread_mutex_unlock(&global_lock);
/* Main Job */
pthread_mutex_lock(&global_lock);
- e = epg_broadcast_find_by_id(id, NULL);
+ e = epg_broadcast_find_by_id(id);
ep = e ? e->episode : NULL;
if (ep && ep->brand) {
LIST_FOREACH(ep2, &ep->brand->episodes, blink) {
epg_broadcast_t *bcast;
if (!dvr_entry_is_editable(de))
return 0;
- bcast = epg_broadcast_find_by_id(id, de->de_channel);
+ bcast = epg_broadcast_find_by_id(id);
if (bcast == NULL) {
if (de->de_bcast) {
de->de_bcast->putref((epg_object_t*)de->de_bcast);
{
.type = PT_U32,
.id = "broadcast",
- .name = "Broadcast Type",
+ .name = "Broadcast",
.set = dvr_entry_class_broadcast_set,
.get = dvr_entry_class_broadcast_get,
.opts = PO_RDONLY,
return _epg_channel_add_broadcast(channel, ebc, create, save);
}
-epg_broadcast_t *epg_broadcast_find_by_id ( uint32_t id, channel_t *ch )
+epg_broadcast_t *epg_broadcast_find_by_id ( uint32_t id )
{
- // Note: I have left channel_t param, just in case I decide to change
- // to use it for shorter search
return (epg_broadcast_t*)epg_object_find_by_id(id, EPG_BROADCAST);
}
( struct channel *ch, time_t start, time_t stop,
uint16_t eid, int create, int *save );
epg_broadcast_t *epg_broadcast_find_by_eid ( struct channel *ch, uint16_t eid );
-epg_broadcast_t *epg_broadcast_find_by_id ( uint32_t id, struct channel *ch );
+epg_broadcast_t *epg_broadcast_find_by_id ( uint32_t id );
/* Mutators */
int epg_broadcast_set_episode
return htsp_error("Missing argument 'eventId'");
lang = htsmsg_get_str(in, "language") ?: htsp->htsp_language;
- if((e = epg_broadcast_find_by_id(eventId, NULL)) == NULL)
+ if((e = epg_broadcast_find_by_id(eventId)) == NULL)
return htsp_error("Event does not exist");
return htsp_build_event(e, NULL, lang, 0, htsp);
if (!(ch = channel_find_by_id(u32)))
return htsp_error("Channel does not exist");
if (!htsmsg_get_u32(in, "eventId", &u32))
- if (!(e = epg_broadcast_find_by_id(u32, ch)))
+ if (!(e = epg_broadcast_find_by_id(u32)))
return htsp_error("Event does not exist");
/* Check access */
if(!htsmsg_get_u32(in, "channelId", &u32))
ch = channel_find_by_id(u32);
if(!htsmsg_get_u32(in, "eventId", &eventid))
- e = epg_broadcast_find_by_id(eventid, ch);
+ e = epg_broadcast_find_by_id(eventid);
if(htsmsg_get_u32(in, "priority", &priority))
priority = DVR_PRIO_NORMAL;
if(htsmsg_get_u32(in, "retention", &retention))
pthread_mutex_lock(&global_lock);
- if(remain == NULL || (e = epg_broadcast_find_by_id(atoi(remain), NULL)) == NULL) {
+ if(remain == NULL || (e = epg_broadcast_find_by_id(strtoll(remain, NULL, 10))) == NULL) {
pthread_mutex_unlock(&global_lock);
return 404;
}