]> git.sesse.net Git - vlc/blobdiff - modules/misc/notify/msn.c
svg module: fix memleak.
[vlc] / modules / misc / notify / msn.c
index 796907d951ef8d2127ea1c1c026ad512e7dc75ef..5b23e54cf6a49f42fcc94c84fae173399df5a40d 100644 (file)
  * Preamble
  *****************************************************************************/
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_interface.h>
 #include <vlc_meta.h>
 #include <vlc_playlist.h>
@@ -67,10 +72,10 @@ vlc_module_begin();
     set_category( CAT_INTERFACE );
     set_subcategory( SUBCAT_INTERFACE_CONTROL );
     set_shortname( "MSN" );
-    set_description( _("MSN Now-Playing") );
+    set_description( N_("MSN Now-Playing") );
 
     add_string( "msn-format", FORMAT_DEFAULT, NULL,
-                FORMAT_TEXT, FORMAT_LONGTEXT, VLC_FALSE );
+                FORMAT_TEXT, FORMAT_LONGTEXT, false );
 
     set_capability( "interface", 0 );
     set_callbacks( Open, Close );
@@ -153,13 +158,13 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     }
 
     /* Playing something ... */
-    psz_artist = input_item_GetArtist( input_GetItem(p_input) );
-    psz_album = input_item_GetAlbum( input_GetItem(p_input) );
-    psz_title = input_item_GetTitle( input_GetItem(p_input) );
+    psz_artist = input_item_GetArtist( input_GetItem( p_input ) );
+    psz_album = input_item_GetAlbum( input_GetItem( p_input ) );
+    psz_title = input_item_GetTitle( input_GetItem( p_input ) );
     if( !psz_artist ) psz_artist = strdup( "" );
     if( !psz_album ) psz_artist = strdup( "" );
-    if( !strcmp( psz_title, NULL ) )
-        psz_title = strdup( N_("(no title)") );
+    if( !psz_title )
+        psz_title = input_item_GetName( input_GetItem( p_input ) );
 
     psz_buf = str_format_meta( p_this, p_intf->p_sys->psz_format );