Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- duplicate handling fixes according to pull comments
  • Loading branch information
dero authored and perexg committed Mar 9, 2015
1 parent ef799f9 commit bd06d3c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/dvr/dvr.h
Expand Up @@ -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;

Expand Down
16 changes: 2 additions & 14 deletions src/dvr/dvr_db.c
Expand Up @@ -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));
}


/**
*
*/
Expand Down Expand Up @@ -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))
Expand All @@ -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);


}

/**
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 0 additions & 4 deletions src/epg.h
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/lang_str.c
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions src/lang_str.h
Expand Up @@ -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 );

Expand Down

2 comments on commit bd06d3c

@cleanrock
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can now remove everything related to the recording config episode-duplicate-detection which was added when my pull request was merged.

@cleanrock
Copy link
Contributor

Choose a reason for hiding this comment

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

Correction, perhaps all my stuff (#301) is already removed/replaced but i don't think the episode-duplicate-detection/dvr_episode_duplicate is used any longer so it should probably be removed.

Please sign in to comment.