diff --git a/src/dvr/dvr.h b/src/dvr/dvr.h index dccf590d..bf505540 100644 --- a/src/dvr/dvr.h +++ b/src/dvr/dvr.h @@ -302,7 +302,7 @@ typedef struct dvr_autorec_entry { int dae_minduration; int dae_maxduration; int dae_retention; - + time_t dae_start_extra; time_t dae_stop_extra; diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 07139a2d..533bcc1a 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -608,15 +608,6 @@ dvr_entry_create_by_event(const char *config_uuid, comment); } -static inline int strempty(const char* c) { - return !c || c[0] == 0; -} - -static inline int lang_str_empty(lang_str_t* str) { - return strempty(lang_str_get(str, NULL)); -} - - /** * */ @@ -715,7 +706,8 @@ dvr_entry_create_by_autorec(epg_broadcast_t *e, dvr_autorec_entry_t *dae) { char buf[200]; - /* Dup detection */ + /* Identical duplicate detection + NOTE: Semantic duplicate detection is deferred to the start time of recording and then done using _dvr_duplicate_event by dvr_timer_start_recording. */ dvr_entry_t* de; LIST_FOREACH(de, &dvrentries, de_global_link) { if (de->de_bcast == e || (de->de_bcast && de->de_bcast->episode == e->episode)) @@ -730,8 +722,6 @@ dvr_entry_create_by_autorec(epg_broadcast_t *e, dvr_autorec_entry_t *dae) dae->dae_start_extra, dae->dae_stop_extra, dae->dae_owner, buf, dae, dae->dae_pri, dae->dae_retention, dae->dae_comment); - - } /** @@ -1633,7 +1623,6 @@ dvr_entry_class_disp_title_get(void *o) return &s; } - static int dvr_entry_class_disp_subtitle_set(void *o, const void *v) { @@ -1790,7 +1779,6 @@ dvr_entry_class_duplicate_get(void *o) return de ? &de->de_start : &null; } - htsmsg_t * dvr_entry_class_duration_list(void *o, const char *not_set, int max, int step) { diff --git a/src/epg.h b/src/epg.h index 63b443f5..a93e64b6 100644 --- a/src/epg.h +++ b/src/epg.h @@ -290,8 +290,6 @@ const char *epg_episode_get_title ( const epg_episode_t *e, const char *lang ); const char *epg_episode_get_subtitle ( const epg_episode_t *e, const char *lang ); -lang_str_t *epg_episode_get_subtitle2 - ( const epg_episode_t *e ); const char *epg_episode_get_summary ( const epg_episode_t *e, const char *lang ); const char *epg_episode_get_description @@ -513,8 +511,6 @@ const char *epg_broadcast_get_title ( epg_broadcast_t *b, const char *lang ); const char *epg_broadcast_get_subtitle ( epg_broadcast_t *b, const char *lang ); -lang_str_t *epg_broadcast_get_subtitle2 - ( epg_broadcast_t *b ); const char *epg_broadcast_get_summary ( epg_broadcast_t *b, const char *lang ); const char *epg_broadcast_get_description diff --git a/src/lang_str.c b/src/lang_str.c index ed9ee089..fd06c4a5 100644 --- a/src/lang_str.c +++ b/src/lang_str.c @@ -251,6 +251,14 @@ int lang_str_compare( lang_str_t *ls1, lang_str_t *ls2 ) return 0; } +int strempty(const char* c) { + return !c || c[0] == 0; +} + +int lang_str_empty(lang_str_t* str) { + return strempty(lang_str_get(str, NULL)); +} + void lang_str_done( void ) { SKEL_FREE(lang_str_ele_skel); diff --git a/src/lang_str.h b/src/lang_str.h index ff901b8b..1048263e 100644 --- a/src/lang_str.h +++ b/src/lang_str.h @@ -59,6 +59,10 @@ lang_str_t *lang_str_deserialize /* Compare */ int lang_str_compare ( lang_str_t *ls1, lang_str_t *ls2 ); +/* Empty */ +int strempty(const char* c); +int lang_str_empty(lang_str_t* str); + /* Init/Done */ void lang_str_done( void );