#include <stdlib.h> /* malloc(), free() */
#include <vlc/vlc.h>
-#include <vlc/intf.h>
+#include <vlc_interface.h>
+#include <vlc_playlist.h>
#include <vlc_meta.h>
-#include <network.h>
+#include <vlc_network.h>
#include <errno.h>
#include <vlc_md5.h>
* Module descriptor
****************************************************************************/
-/// \bug [String] REmove all "Growl" in short desc
-
#define SERVER_DEFAULT "127.0.0.1"
-#define SERVER_TEXT N_("Growl server")
+#define SERVER_TEXT N_("Server")
#define SERVER_LONGTEXT N_("This is the host to which Growl notifications " \
"will be sent. By default, notifications are sent locally." )
#define PASS_DEFAULT ""
-#define PASS_TEXT N_("Growl password")
-/// \bug [String] Password on the Growl server.
-#define PASS_LONGTEXT N_("Growl password on the server.")
-#define PORT_TEXT N_("Growl UDP port")
-/// \bug [String] UDP port on the Growl server
-#define PORT_LONGTEXT N_("Growl UDP port on the server.")
+#define PASS_TEXT N_("Password")
+#define PASS_LONGTEXT N_("Growl password on the Growl server.")
+#define PORT_TEXT N_("UDP port")
+#define PORT_LONGTEXT N_("Growl UDP port on the Growl server.")
vlc_module_begin();
set_category( CAT_INTERFACE );
if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input );
- if( p_input->b_dead || !p_input->input.p_item->psz_name )
+ char *psz_name = input_item_GetName( input_GetItem( p_input ) );
+ if( p_input->b_dead || !psz_name )
{
/* Not playing anything ... */
+ free( psz_name );
vlc_object_release( p_input );
return VLC_SUCCESS;
}
+ free( psz_name );
/* Playing something ... */
- psz_artist = p_input->input.p_item->p_meta->psz_artist ?
- strdup( p_input->input.p_item->p_meta->psz_artist ) :
- strdup( "" );
- psz_album = p_input->input.p_item->p_meta->psz_album ?
- strdup( p_input->input.p_item->p_meta->psz_album ) :
- strdup( "" );
- psz_title = strdup( p_input->input.p_item->psz_name );
+ psz_artist = input_item_GetArtist( input_GetItem( p_input ) );
+ if( psz_artist == NULL ) psz_artist = strdup( "" );
+ psz_album = input_item_GetAlbum( input_GetItem( p_input ) ) ;
+ if( psz_album == NULL ) psz_album = strdup( "" );
+ psz_title = input_item_GetName( input_GetItem( p_input ) );
if( psz_title == NULL ) psz_title = strdup( N_("(no title)") );
- if( psz_artist == NULL ) psz_artist = strdup( N_("(no artist)") );
- if( psz_album == NULL ) psz_album = strdup( N_("(no album)") );
snprintf( psz_tmp, GROWL_MAX_LENGTH, "%s %s %s",
psz_title, psz_artist, psz_album );
free( psz_title );
return VLC_EGENERIC;
}
- net_StopRecv( i_handle );
+ shutdown( i_handle, SHUT_RD );
if( send( i_handle, p_data, i_offset, 0 )
== -1 )
{