Bug #1453 ยป a.patch
src/dvr/dvr.h | ||
---|---|---|
280 | 280 | |
281 | 281 |
void dvr_autorec_init(void); |
282 | 282 | |
283 |
void dvr_autorec_update(void); |
|
284 | ||
283 | 285 |
void dvr_destroy_by_channel(channel_t *ch); |
284 | 286 | |
285 | 287 |
void dvr_rec_subscribe(dvr_entry_t *de); |
src/dvr/dvr_autorec.c | ||
---|---|---|
38 | 38 | |
39 | 39 |
TAILQ_HEAD(dvr_autorec_entry_queue, dvr_autorec_entry); |
40 | 40 | |
41 |
static int dvr_autorec_in_init = 0; |
|
42 | ||
41 | 43 |
struct dvr_autorec_entry_queue autorec_entries; |
42 | 44 | |
43 | 45 |
static void dvr_autorec_changed(dvr_autorec_entry_t *dae); |
... | ... | |
496 | 498 |
if (dae->dae_serieslink) |
497 | 499 |
dae->dae_serieslink->getref(dae->dae_serieslink); |
498 | 500 |
} |
499 |
dvr_autorec_changed(dae); |
|
501 |
if (!dvr_autorec_in_init) |
|
502 |
dvr_autorec_changed(dae); |
|
500 | 503 | |
501 | 504 |
return autorec_record_build(dae); |
502 | 505 |
} |
... | ... | |
539 | 542 |
{ |
540 | 543 |
TAILQ_INIT(&autorec_entries); |
541 | 544 |
autorec_dt = dtable_create(&autorec_dtc, "autorec", NULL); |
545 |
dvr_autorec_in_init = 1; |
|
542 | 546 |
dtable_load(autorec_dt); |
547 |
dvr_autorec_in_init = 0; |
|
548 |
} |
|
549 | ||
550 |
void |
|
551 |
dvr_autorec_update(void) |
|
552 |
{ |
|
553 |
dvr_autorec_entry_t *dae; |
|
554 |
TAILQ_FOREACH(dae, &autorec_entries, dae_link) { |
|
555 |
dvr_autorec_changed(dae); |
|
556 |
} |
|
543 | 557 |
} |
544 | 558 | |
545 | 559 |
static void |
src/dvr/dvr_db.c | ||
---|---|---|
1104 | 1104 | |
1105 | 1105 |
dvr_autorec_init(); |
1106 | 1106 |
dvr_db_load(); |
1107 |
dvr_autorec_update(); |
|
1107 | 1108 |
} |
1108 | 1109 | |
1109 | 1110 |
/** |
1110 |
- |