]> git.sesse.net Git - vlc/blobdiff - modules/misc/notify/growl.m
Use var_Inherit* instead of var_CreateGet*.
[vlc] / modules / misc / notify / growl.m
index fa2376039900f2d7ed73d2930ec0f44fbe121d9e..71ecdd1033e078797f4c26102bf55b7b56210358 100644 (file)
@@ -134,13 +134,13 @@ static void Close( vlc_object_t *p_this )
 {
     intf_sys_t *p_sys = ((intf_thread_t*)p_this)->p_sys;
 
+    var_DelCallback( pl_Get( p_this ), "item-current", ItemChange, p_this );
+
     CFRelease( p_sys->default_icon );
     CFRelease( p_sys->app_name );
     CFRelease( p_sys->notification_type );
     [p_sys->p_pool release];
     free( p_sys );
-
-    var_DelCallback( pl_Get( p_this ), "item-current", ItemChange, p_this );
 }
 
 /*****************************************************************************
@@ -210,10 +210,15 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     }
 
     char *psz_arturl = input_item_GetArtURL( p_item );
+    if( psz_arturl )
+    {
+        char *psz = make_path( psz_arturl );
+        free( psz_arturl );
+        psz_arturl = psz;
+    }
     CFDataRef art = NULL;
-    if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) &&
-                    decode_URI( psz_arturl + 7 ) )
-        art = (CFDataRef) readFile( psz_arturl + 7 );
+    if( psz_arturl )
+        art = (CFDataRef) readFile( psz_arturl );
 
     free( psz_title );
     free( psz_artist );