[vlc-commits] skins2: fix art display misfunctioning in latest git vlc

Erwan Tulou git at videolan.org
Sun Jan 27 17:53:11 CET 2013


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sun Jan 27 17:23:15 2013 +0100| [e7e6eaee2e2bfb92e36dc4e58f9d73f1d3997ff7] | committer: Erwan Tulou

skins2: fix art display misfunctioning in latest git vlc

Art display used to rely on an event issued by vlc core which has been renamed into "activity" lately. The issue was that it seems no longer fired when a new
 input is launched.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7e6eaee2e2bfb92e36dc4e58f9d73f1d3997ff7
---

 modules/gui/skins2/src/vlcproc.cpp |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index e19c61b..d69b98b 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -490,6 +490,28 @@ void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
 
         getIntf()->p_sys->p_input = pInput;
         vlc_object_hold( pInput );
+
+        input_item_t *p_item = input_GetItem( pInput );
+        if( p_item )
+        {
+            // Update short name
+            char *psz_name = input_item_GetName( p_item );
+            SET_TEXT( m_cVarStreamName, UString( getIntf(), psz_name ) );
+            free( psz_name );
+
+            // Update local path (if possible) or full uri
+            char *psz_uri = input_item_GetURI( p_item );
+            char *psz_path = make_path( psz_uri );
+            char *psz_save = psz_path ? psz_path : psz_uri;
+            SET_TEXT( m_cVarStreamURI, UString( getIntf(), psz_save ) );
+            free( psz_path );
+            free( psz_uri );
+
+            // Update art uri
+            char *psz_art = input_item_GetArtURL( p_item );
+            SET_STRING( m_cVarStreamArt, string( psz_art ? psz_art : "" ) );
+            free( psz_art );
+        }
     }
 
     switch( newVal.i_int )



More information about the vlc-commits mailing list