Petr Vacek - FTP cleartext authentication
Philippe Van Hecke <philippe at belnet dot be> - SAP header hash patch
Pierre Marc Dumuid <pierre.dumuid at adelaide dot edu dot au> - Playlist patches
-Rafaël Carré <rafael -dot- carre -at- gmail -dot- com> - Audioscrobbler plugin
+Rafaël Carré <funman at videolan org> - Audioscrobbler plugin
Régis Duchesne <regis at via.ecp.fr> - original VLC code
Remco Poortinga <poortinga at telin.nl> - IPv6 multicast patch
Rene Gollent <rgollent at u.arizona.edu> - BeOS interface fix
char *psz_publisher;
char *psz_encodedby;
char *psz_arturl;
+ char *psz_trackid;
+ char *psz_artistid;
+ char *psz_albumid;
int i_status;
#if 0
#define vlc_meta_SetPublisher( meta, b ) vlc_meta_Set( meta, publisher, b );
#define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, encodedby, b );
#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b );
+#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b );
+#define vlc_meta_SetArtistID( meta, b ) vlc_meta_Set( meta, artistid, b );
+#define vlc_meta_SetAlbumID( meta, b ) vlc_meta_Set( meta, albumid, b );
+
static inline vlc_meta_t *vlc_meta_New( void )
{
m->psz_publisher = NULL;
m->psz_encodedby = NULL;
m->psz_arturl = NULL;
+ m->psz_trackid = NULL;
+ m->psz_artistid = NULL;
+ m->psz_albumid = NULL;
m->i_status = 0;
return m;
}
free( m->psz_nowplaying );
free( m->psz_publisher );
free( m->psz_encodedby );
+ free( m->psz_trackid );
+ free( m->psz_artistid );
+ free( m->psz_albumid );
free( m->psz_arturl );
free( m );
COPY_FIELD( nowplaying );
COPY_FIELD( publisher );
COPY_FIELD( encodedby );
+ COPY_FIELD( trackid );
+ COPY_FIELD( artistid );
+ COPY_FIELD( albumid );
COPY_FIELD( arturl );
}
/** \todo Track meta */
else if( !strcasecmp( psz_name, "title" ) )
{
vlc_meta_SetTitle( p_input->input.p_item->p_meta,
- psz_value );
+ psz_value );
p_input->input.p_item->psz_name = strdup( psz_value );
}
else if( !strcasecmp( psz_name, "album" ) )
{
vlc_meta_SetAlbum( p_input->input.p_item->p_meta,
- psz_value );
+ psz_value );
+ }
+ else if( !strcasecmp( psz_name, "musicbrainz_trackid" ) )
+ {
+ vlc_meta_SetTrackID( p_input->input.p_item->p_meta,
+ psz_value );
+ }
+ else if( !strcasecmp( psz_name, "musicbrainz_artistid" ) )
+ {
+ vlc_meta_SetArtistID( p_input->input.p_item->p_meta,
+ psz_value );
+ }
+ else if( !strcasecmp( psz_name, "musicbrainz_albumid" ) )
+ {
+ vlc_meta_SetAlbumID( p_input->input.p_item->p_meta,
+ psz_value );
}
}
/* FIXME */
* Copyright (C) 2006 the VideoLAN team
* $Id$
*
- * Authors: Rafaël Carré <rafael -dot- carre -at- gmail -dot- com>
+ * Authors: Rafaël Carré <funman at videolan org>
* Kenneth Ostby <kenneo -at- idi -dot- ntnu -dot- no>
*
* This program is free software; you can redistribute it and/or modify
char *psz_t; /* track title */
char *psz_b; /* track album */
int i_l; /* track length */
-/* vlc can't retrieve musicbrainz id, so let's ignore it */
-/* int i_m; */ /* musicbrainz id */
+ char *psz_m; /* musicbrainz id */
char *psz_i; /* date */
time_t time_playing; /* date (epoch) */
} audioscrobbler_song_t;
/* data to submit */
#define POST_DATA "u=%s&s=%s&a%%5B%d%%5D=%s&t%%5B%d%%5D=%s" \
- "&b%%5B%d%%5D=%s&m%%5B%d%%5D=&l%%5B%d%%5D=%d&i%%5B%d%%5D=%s"
+ "&b%%5B%d%%5D=%s&m%%5B%d%%5D=%s&l%%5B%d%%5D=%d&i%%5B%d%%5D=%s"
vlc_module_begin();
set_category( CAT_INTERFACE );
i_song, p_sys->p_first_queue->p_queue[i_song]->psz_a,
i_song, p_sys->p_first_queue->p_queue[i_song]->psz_t,
i_song, p_sys->p_first_queue->p_queue[i_song]->psz_b,
- i_song,
+ i_song, p_sys->p_first_queue->p_queue[i_song]->psz_m,
i_song, p_sys->p_first_queue->p_queue[i_song]->i_l,
i_song, p_sys->p_first_queue->p_queue[i_song]->psz_i
);
p_queue->p_queue[i_songs_nb]->psz_b =
strdup( p_sys->p_current_song->psz_b );
+ p_queue->p_queue[i_songs_nb]->psz_m =
+ strdup( p_sys->p_current_song->psz_m );
+
p_queue->p_queue[i_songs_nb]->psz_i =
strdup( p_sys->p_current_song->psz_i );
char *psz_title = NULL;
char *psz_artist = NULL;
char *psz_album = NULL;
+ char *psz_trackid = NULL;
int i_length = -1;
vlc_bool_t b_waiting;
int i_status;
}
}
+ if ( p_input->input.p_item->p_meta->psz_trackid )
+ {
+ psz_trackid = strdup( p_input->input.p_item->p_meta->psz_trackid );
+ if ( !psz_trackid )
+ {
+ goto error;
+ }
+ }
+ else
+ {
+ psz_trackid = calloc( 1, sizeof( char ) );
+ }
+
if ( p_input->input.p_item->p_meta->psz_album )
{
psz_album = encode_URI_component(
p_sys->p_current_song->psz_a = strdup( psz_artist );
p_sys->p_current_song->psz_t = strdup( psz_title );
p_sys->p_current_song->psz_b = strdup( psz_album );
+ p_sys->p_current_song->psz_m = strdup( psz_trackid );
p_sys->p_current_song->i_l = i_length;
p_sys->b_queued = VLC_FALSE;
p_sys->b_metadata_read = VLC_TRUE;
free( psz_title );
free( psz_artist );
free( psz_album );
+ free( psz_trackid );
return VLC_SUCCESS;
}
free( psz_artist );
free( psz_album );
free( psz_title );
+ free( psz_trackid );
return VLC_ENOMEM;
}