diff --git a/src/dvr/dvr_autorec.c b/src/dvr/dvr_autorec.c index 447cbcba..e4902d92 100644 --- a/src/dvr/dvr_autorec.c +++ b/src/dvr/dvr_autorec.c @@ -520,10 +520,8 @@ _dvr_autorec_add(const char *config_name, htsmsg_destroy(m); /* Notify web clients that we have messed with the tables */ - - m = htsmsg_create_map(); - htsmsg_add_u32(m, "reload", 1); - notify_by_msg("autorec", m); + + notify_reload("autorec"); dvr_autorec_changed(dae); } diff --git a/src/notify.c b/src/notify.c index bdad26ef..b2d8701a 100644 --- a/src/notify.c +++ b/src/notify.c @@ -33,3 +33,12 @@ notify_by_msg(const char *class, htsmsg_t *m) comet_mailbox_add_message(m, 0); htsmsg_destroy(m); } + + +void +notify_reload(const char *class) +{ + htsmsg_t *m = htsmsg_create_map(); + htsmsg_add_u32(m, "reload", 1); + notify_by_msg(class, m); +} diff --git a/src/notify.h b/src/notify.h index cf278393..1a41a43a 100644 --- a/src/notify.h +++ b/src/notify.h @@ -23,4 +23,6 @@ void notify_by_msg(const char *class, htsmsg_t *m); +void notify_reload(const char *class); + #endif /* NOTIFY_H_ */