Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: Do the autorec event checks after autorec create
  • Loading branch information
perexg committed Sep 9, 2014
1 parent 8fab744 commit 05783ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/api/api_dvr.c
Expand Up @@ -277,8 +277,10 @@ api_dvr_autorec_create

pthread_mutex_lock(&global_lock);
dae = dvr_autorec_create(NULL, conf);
if (dae)
if (dae) {
dvr_autorec_save(dae);
dvr_autorec_changed(dae, 1);
}
pthread_mutex_unlock(&global_lock);

return 0;
Expand Down Expand Up @@ -314,8 +316,10 @@ api_dvr_autorec_create_by_series
dae = dvr_autorec_add_series_link(api_dvr_config_name(perm, config_uuid),
e, perm->aa_representative,
"Created from EPG query");
if (dae)
if (dae) {
dvr_autorec_save(dae);
dvr_autorec_changed(dae, 1);
}
}
pthread_mutex_unlock(&global_lock);
count++;
Expand Down
2 changes: 2 additions & 0 deletions src/dvr/dvr.h
Expand Up @@ -443,6 +443,8 @@ dvr_autorec_add_series_link(const char *dvr_config_name,

void dvr_autorec_save(dvr_autorec_entry_t *dae);

void dvr_autorec_changed(dvr_autorec_entry_t *dae, int purge);

static inline dvr_autorec_entry_t *
dvr_autorec_find_by_uuid(const char *uuid)
{ return (dvr_autorec_entry_t*)idnode_find(uuid, &dvr_autorec_entry_class); }
Expand Down
4 changes: 1 addition & 3 deletions src/dvr/dvr_autorec.c
Expand Up @@ -38,8 +38,6 @@ static int dvr_autorec_in_init = 0;

struct dvr_autorec_entry_queue autorec_entries;

static void dvr_autorec_changed(dvr_autorec_entry_t *dae, int purge);

/**
* Unlink - and remove any unstarted
*/
Expand Down Expand Up @@ -910,7 +908,7 @@ void dvr_autorec_check_serieslink(epg_serieslink_t *s)
/**
*
*/
static void
void
dvr_autorec_changed(dvr_autorec_entry_t *dae, int purge)
{
channel_t *ch;
Expand Down

1 comment on commit 05783ac

@ksooo
Copy link
Contributor

@ksooo ksooo commented on 05783ac Sep 9, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tvh seems to fire "new recording scheduled" event for every autorec-based recording on every tvh startup again an again. See service.log. XBMC "Timers" dialog gets flooded...

Please sign in to comment.