Commit da5751f2 authored by Erwan Tulou's avatar Erwan Tulou

skins2: update current input if its associated item changes.

This is the right place to make sure an art file that was not available at
input launch time gets a chance to be displayed as soon as it becomes available.
parent 29c75ea7
...@@ -33,6 +33,7 @@ void CmdItemUpdate::execute() ...@@ -33,6 +33,7 @@ void CmdItemUpdate::execute()
if( !m_pItem ) if( !m_pItem )
return; return;
// update playtree
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist; playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
playlist_Lock( pPlaylist ); playlist_Lock( pPlaylist );
playlist_item_t* p_plItem = playlist_ItemGetByInput( pPlaylist, m_pItem ); playlist_item_t* p_plItem = playlist_ItemGetByInput( pPlaylist, m_pItem );
...@@ -41,6 +42,15 @@ void CmdItemUpdate::execute() ...@@ -41,6 +42,15 @@ void CmdItemUpdate::execute()
if( id ) if( id )
VlcProc::instance( getIntf() )->getPlaytreeVar().onUpdateItem( id ); VlcProc::instance( getIntf() )->getPlaytreeVar().onUpdateItem( id );
// update current input if needed
input_item_t* p_current = NULL;
input_thread_t* pInput = getIntf()->p_sys->p_input;
if( pInput )
p_current = input_GetItem( pInput );
if( p_current == m_pItem )
VlcProc::instance( getIntf() )->update_current_input();
} }
bool CmdItemUpdate::checkRemove( CmdGeneric *pQueuedCommand ) const bool CmdItemUpdate::checkRemove( CmdGeneric *pQueuedCommand ) const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment