int i_type = event->type();
IMEvent *ple = static_cast<IMEvent *>(event);
+ if( i_type == ItemChanged_Type )
+ UpdateMeta( ple->p_item );
+
if( !hasInput() )
return;
-#ifndef NDEBUG
- if( i_type != PositionUpdate_Type &&
- i_type != StatisticsUpdate_Type &&
- i_type != ItemChanged_Type )
- msg_Dbg( p_intf, "New Event: type %i", i_type );
-#endif
-
/* Actions */
switch( i_type )
{
UpdateArt();
/* Update duration of file */
}
- UpdateMeta( ple->p_item->i_id );
break;
case ItemStateChanged_Type:
// TODO: Fusion with above state
char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) );
if( psz_art && !strncmp( psz_art, "file://", 7 ) &&
decode_URI( psz_art + 7 ) )
- url = qfu( psz_art + 7);
+#ifdef WIN32
+ url = qfu( psz_art + 8 ); // Remove extra / starting on Win32.
+#else
+ url = qfu( psz_art + 7 );
+#endif
free( psz_art );
url = url.replace( "file://", "" );
emit statisticsUpdated( input_GetItem( p_input ) );
}
-inline void InputManager::UpdateMeta( int id )
+inline void InputManager::UpdateMeta( input_item_t *p_item )
{
- emit metaChanged( id );
+ emit metaChanged( p_item );
}
inline void InputManager::UpdateMeta()
if( hasInput() )
{
int i_type = var_Type( p_input, "next-chapter" );
- var_SetVoid( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
- "prev-chapter":"prev-title" );
+ var_TriggerCallback( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
+ "prev-chapter":"prev-title" );
}
}
if( hasInput() )
{
int i_type = var_Type( p_input, "next-chapter" );
- var_SetVoid( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
- "next-chapter":"next-title" );
+ var_TriggerCallback( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
+ "next-chapter":"next-title" );
}
}
void InputManager::slower()
{
if( hasInput() )
- var_SetVoid( p_input, "rate-slower" );
+ var_TriggerCallback( p_input, "rate-slower" );
}
void InputManager::faster()
{
if( hasInput() )
- var_SetVoid( p_input, "rate-faster" );
+ var_TriggerCallback( p_input, "rate-faster" );
}
void InputManager::littlefaster()