Fix some mistakes spotted on live system and permanently enable EIT parsing for test purposes.
This commit is contained in:
parent
43d516464a
commit
2a30767ca8
4 changed files with 25 additions and 13 deletions
|
@ -504,8 +504,10 @@ dvb_eit_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
|
|||
if(t == NULL || !t->s_enabled || (ch = t->s_ch) == NULL)
|
||||
return 0;
|
||||
|
||||
#ifdef TODO_REENABLE_THIS
|
||||
if(!t->s_dvb_eit_enable)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
while(len >= 12) {
|
||||
ok = 1;
|
||||
|
|
|
@ -979,8 +979,8 @@ static void _epg_channel_timer_callback ( void *p )
|
|||
break;
|
||||
}
|
||||
tvhlog(LOG_DEBUG, "epg", "now/next %lu/%lu set on %s",
|
||||
ch->ch_epg_now ?: 0,
|
||||
ch->ch_epg_next ?: 0,
|
||||
ch->ch_epg_now ? ch->ch_epg_now->_.id : 0,
|
||||
ch->ch_epg_next ? ch->ch_epg_next->_.id : 0,
|
||||
ch->ch_name);
|
||||
|
||||
/* re-arm */
|
||||
|
|
20
src/epg.h
20
src/epg.h
|
@ -74,7 +74,7 @@ typedef enum epg_object_type
|
|||
} epg_object_type_t;
|
||||
|
||||
/* Object */
|
||||
typedef struct epg_object
|
||||
struct epg_object
|
||||
{
|
||||
RB_ENTRY(epg_object) glink; ///< Global (URI) list link
|
||||
LIST_ENTRY(epg_object) hlink; ///< Global (ID) hash link
|
||||
|
@ -88,7 +88,7 @@ typedef struct epg_object
|
|||
void (*getref) ( epg_object_t* ); ///< Get a reference
|
||||
void (*putref) ( epg_object_t* ); ///< Release a reference
|
||||
void (*destroy) ( epg_object_t* ); ///< Delete the object
|
||||
} epg_object_t;
|
||||
};
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
|
@ -97,7 +97,7 @@ typedef struct epg_object
|
|||
* ***********************************************************************/
|
||||
|
||||
/* Object */
|
||||
typedef struct epg_brand
|
||||
struct epg_brand
|
||||
{
|
||||
epg_object_t _; ///< Base object
|
||||
|
||||
|
@ -107,7 +107,7 @@ typedef struct epg_brand
|
|||
|
||||
epg_season_tree_t seasons; ///< Season list
|
||||
epg_episode_tree_t episodes; ///< Episode list
|
||||
} epg_brand_t;
|
||||
};
|
||||
|
||||
/* Lookup */
|
||||
epg_brand_t *epg_brand_find_by_uri
|
||||
|
@ -131,7 +131,7 @@ epg_brand_t *epg_brand_deserialize ( htsmsg_t *m, int create, int *save );
|
|||
* ***********************************************************************/
|
||||
|
||||
/* Object */
|
||||
typedef struct epg_season
|
||||
struct epg_season
|
||||
{
|
||||
epg_object_t _; ///< Parent object
|
||||
|
||||
|
@ -143,7 +143,7 @@ typedef struct epg_season
|
|||
epg_brand_t *brand; ///< Parent brand
|
||||
epg_episode_tree_t episodes; ///< Episode list
|
||||
|
||||
} epg_season_t;
|
||||
};
|
||||
|
||||
/* Lookup */
|
||||
epg_season_t *epg_season_find_by_uri
|
||||
|
@ -169,7 +169,7 @@ epg_season_t *epg_season_deserialize ( htsmsg_t *m, int create, int *save );
|
|||
* ***********************************************************************/
|
||||
|
||||
/* Object */
|
||||
typedef struct epg_episode
|
||||
struct epg_episode
|
||||
{
|
||||
epg_object_t _; ///< Parent object
|
||||
|
||||
|
@ -188,7 +188,7 @@ typedef struct epg_episode
|
|||
epg_season_t *season; ///< Parent season
|
||||
epg_broadcast_tree_t broadcasts; ///< Broadcast list
|
||||
|
||||
} epg_episode_t;
|
||||
};
|
||||
|
||||
/* Lookup */
|
||||
epg_episode_t *epg_episode_find_by_uri
|
||||
|
@ -250,7 +250,7 @@ epg_episode_t *epg_episode_deserialize ( htsmsg_t *m, int create, int *save );
|
|||
* ***********************************************************************/
|
||||
|
||||
/* Object */
|
||||
typedef struct epg_broadcast
|
||||
struct epg_broadcast
|
||||
{
|
||||
epg_object_t _; ///< Parent object
|
||||
|
||||
|
@ -276,7 +276,7 @@ typedef struct epg_broadcast
|
|||
epg_episode_t *episode; ///< Episode shown
|
||||
struct channel *channel; ///< Channel being broadcast on
|
||||
|
||||
} epg_broadcast_t;
|
||||
};
|
||||
|
||||
/* Lookup */
|
||||
epg_broadcast_t *epg_broadcast_find_by_time
|
||||
|
|
|
@ -35,6 +35,8 @@ static const char* _eit_name ( void )
|
|||
static void _eit_episode_uri
|
||||
( char *uri, const char *title, const char *summary )
|
||||
{
|
||||
// TODO: do something better
|
||||
snprintf(uri, 1023, "%s::%s", title, summary);
|
||||
}
|
||||
|
||||
// called from dvb_tables.c
|
||||
|
@ -49,13 +51,21 @@ void eit_callback ( channel_t *ch, int id, time_t start, time_t stop,
|
|||
const char *description = NULL;
|
||||
char uri[1024];
|
||||
|
||||
/* Ignore */
|
||||
if (!ch || !ch->ch_name || !ch->ch_name[0]) return;
|
||||
|
||||
/* Disabled? */
|
||||
//if (epggrab_eit_disabled) return;
|
||||
#if TODO_REENABLE_THIS
|
||||
if (epggrab_eit_disabled) return;
|
||||
#endif
|
||||
|
||||
/* Find broadcast */
|
||||
ebc = epg_channel_get_broadcast(ch, start, stop, 1, &save);
|
||||
if (!ebc) return;
|
||||
|
||||
/* TODO: Determine summary */
|
||||
summary = desc;
|
||||
|
||||
/* Create episode URI */
|
||||
_eit_episode_uri(uri, title, summary);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue