]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/input_manager.cpp
Missing file.
[vlc] / modules / gui / qt4 / input_manager.cpp
index fd2381a4b9c82e901f2ce38ada85e1d3c7d7eb46..f0e57d05dbed44c2454068edeffc639e92079124 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "input_manager.hpp"
 #include <vlc_keys.h>
+#include <vlc_url.h>
 
 #include <QApplication>
 
@@ -590,12 +591,20 @@ void InputManager::UpdateArt()
     if( hasInput() )
     {
         char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) );
-        url = qfu( psz_art );
+        if( psz_art && !strncmp( psz_art, "file://", 7 ) &&
+                decode_URI( 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://", "" );
+        /* Taglib seems to define a attachment://, It won't work yet */
+        url = url.replace( "attachment://", "" );
     }
-    url = url.replace( "file://", QString("" ) );
-    /* Taglib seems to define a attachment://, It won't work yet */
-    url = url.replace( "attachment://", QString("" ) );
+
     /* Update Art meta */
     emit artChanged( url );
 }
@@ -692,7 +701,7 @@ void InputManager::sectionMenu()
             if( !strcmp( text.p_list->p_values[i].psz_string, "Title" ) )
                 root = i;
         }
-        var_Change( p_input, "title  0", VLC_VAR_FREELIST, &val, &text );
+        var_FreeList( &val, &text );
 
         var_SetInteger( p_input, "title  0", root );
     }
@@ -760,7 +769,7 @@ void InputManager::activateTeletext( bool b_enable )
                 i = 0;
             var_SetInteger( p_input, "spu-es", b_enable ? list.p_list->p_values[i].i_int : -1 );
         }
-        var_Change( p_input, "teletext-es", VLC_VAR_FREELIST, &list, &text );
+        var_FreeList( &list, &text );
     }
 }