]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
- duplicate handling fixes according to pull comments
authordero <de@ro>
Fri, 6 Mar 2015 08:39:18 +0000 (09:39 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 9 Mar 2015 15:18:54 +0000 (16:18 +0100)
src/dvr/dvr.h
src/dvr/dvr_db.c
src/epg.h
src/lang_str.c
src/lang_str.h

index dccf590d622a4ecc2944c259da3040d917006688..bf505540766a2634eb9a995807fe5630dc9ac789 100644 (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;
   
index 07139a2d7c47f568e1aa3dab45c75ddae4bbe3da..533bcc1a1cbefd68b639900358de563fbcb43ebe 100644 (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)
 {
index 63b443f5276ea15490bc608ce28efe9db9a3a51b..a93e64b6896f113543fc9b1c68670c140667cd3f 100644 (file)
--- 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
index ed9ee089b8dc09da2d33164b1475a390a812ee0a..fd06c4a593db15bfd15c0d0a640019f5dddf6778 100644 (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);
index ff901b8ba94d1af2245c343fb6a91de13476f54d..1048263e2541d8c160d35bcaba8732e880cc829d 100644 (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 );