[vlc-commits] skins2: update current input if its associated item changes.
Erwan Tulou
git at videolan.org
Mon Jan 28 15:19:25 CET 2013
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Jan 28 12:54:47 2013 +0100| [da5751f2a262c11c6a1a55004a1b6de9f805d3a5] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da5751f2a262c11c6a1a55004a1b6de9f805d3a5
---
modules/gui/skins2/commands/cmd_vars.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/modules/gui/skins2/commands/cmd_vars.cpp b/modules/gui/skins2/commands/cmd_vars.cpp
index 423be4b..dfde4f3 100644
--- a/modules/gui/skins2/commands/cmd_vars.cpp
+++ b/modules/gui/skins2/commands/cmd_vars.cpp
@@ -33,6 +33,7 @@ void CmdItemUpdate::execute()
if( !m_pItem )
return;
+ // update playtree
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
playlist_Lock( pPlaylist );
playlist_item_t* p_plItem = playlist_ItemGetByInput( pPlaylist, m_pItem );
@@ -41,6 +42,15 @@ void CmdItemUpdate::execute()
if( 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
More information about the vlc-commits
mailing list