static void ReadDir ( intf_thread_t * );
static void start_color_and_pairs ( intf_thread_t * );
+static playlist_t *pl_Get( intf_thread_t *p_intf )
+{
+ return p_intf->p_sys->p_playlist;
+}
/*****************************************************************************
* Module descriptor
struct intf_sys_t
{
input_thread_t *p_input;
+ playlist_t *p_playlist;
bool b_color;
bool b_color_started;
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
intf_sys_t *p_sys = p_intf->p_sys;
- playlist_t *p_playlist = pl_Get( p_intf );
int i;
- var_DelCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
- var_DelCallback( p_playlist, "item-append", PlaylistChanged, p_intf );
-
PlaylistDestroy( p_intf );
for( i = 0; i < p_sys->i_dir_entries; i++ )
{
intf_sys_t *p_sys = p_intf->p_sys;
playlist_t *p_playlist = pl_Yield( p_intf );
+ p_sys->p_playlist = p_playlist;
int i_key;
time_t t_last_refresh;
* force building of the playlist array
*/
PlaylistRebuild( p_intf );
+ var_AddCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
+ var_AddCallback( p_playlist, "item-append", PlaylistChanged, p_intf );
while( !intf_ShouldDie( p_intf ) )
{
msleep( INTF_IDLE_SLEEP );
/* Update the input */
- var_AddCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
- var_AddCallback( p_playlist, "item-append", PlaylistChanged, p_intf );
-
PL_LOCK;
if( p_sys->p_input == NULL )
{
Redraw( p_intf, &t_last_refresh );
}
}
+ var_DelCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
+ var_DelCallback( p_playlist, "item-append", PlaylistChanged, p_intf );
}
/* following functions are local */