- duplicate handling fixes according to pull comments

This commit is contained in:
dero 2015-03-06 09:39:18 +01:00 committed by Jaroslav Kysela
parent ef799f9c24
commit bd06d3c79a
5 changed files with 15 additions and 19 deletions

View file

@ -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;

View file

@ -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)
{

View file

@ -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

View file

@ -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);

View file

@ -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 );