Commit c3f5011d authored by Clément Stenac's avatar Clément Stenac

* DAAP : really include meta information, and don't crash on new hosts

parent c4ddb48c
......@@ -511,6 +511,7 @@ static int EnumerateCallback( DAAP_SClient *p_client,
p_vlchost->p_host = p_host;
p_vlchost->psz_name = psz_buffer;
p_vlchost->b_new = VLC_TRUE;
p_vlchost->b_updated = VLC_TRUE;
INSERT_ELEM( p_sys->p_db->pp_hosts, p_sys->p_db->i_hosts,
p_sys->p_db->i_hosts, p_vlchost );
}
......@@ -565,6 +566,7 @@ static void ProcessHost( services_discovery_t *p_sd, host_t *p_host )
DAAP_ClientHost_Database *p_database = malloc( i_dbsize );
DAAP_ClientHost_GetDatabases( p_host->p_host, p_database, &i_db, i_dbsize );
if( !i_db || !p_database )
{
msg_Warn( p_sd, "no database on DAAP host %s", p_host->psz_name );
......@@ -601,9 +603,9 @@ static void ProcessHost( services_discovery_t *p_sd, host_t *p_host )
p_host->p_songs[i].id );
p_item = playlist_ItemNew( p_sd, psz_buff,
p_host->p_songs[i].itemname );
vlc_input_item_AddInfo( &p_item->input, _("Meta-Information"),
vlc_input_item_AddInfo( &p_item->input, _("Meta-information"),
_("Artist"), p_host->p_songs[i].songartist );
vlc_input_item_AddInfo( &p_item->input, _("Meta-Information"),
vlc_input_item_AddInfo( &p_item->input, _("Meta-information"),
_("Album"), p_host->p_songs[i].songalbum );
playlist_NodeAddItem( p_playlist, p_item, VIEW_CATEGORY,
......
......@@ -623,7 +623,6 @@ int playlist_Replace( playlist_t *p_playlist, playlist_item_t *p_olditem,
*/
int playlist_Delete( playlist_t * p_playlist, int i_id )
{
vlc_value_t val;
int i;
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id );
......@@ -682,7 +681,6 @@ int playlist_LockDelete( playlist_t * p_playlist, int i_id )
int playlist_Clear( playlist_t * p_playlist )
{
int i;
playlist_view_t *p_view;
for( i = p_playlist->i_size; i > 0 ; i-- )
{
playlist_Delete( p_playlist, p_playlist->pp_items[0]->input.i_id );
......
......@@ -689,7 +689,7 @@ static void RunThread ( playlist_t *p_playlist )
/* Queue for items to preparse */
static void RunPreparse ( playlist_preparse_t *p_obj )
{
playlist_t *p_playlist = p_obj->p_parent;
playlist_t *p_playlist = (playlist_t *)p_obj->p_parent;
vlc_bool_t b_sleep;
/* Tell above that we're ready */
......@@ -1075,7 +1075,6 @@ static int ItemChange( vlc_object_t *p_obj, const char *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *param )
{
playlist_t *p_playlist = (playlist_t *)param;
int i_index;
//p_playlist->b_need_update = VLC_TRUE;
var_SetInteger( p_playlist, "item-change", newval.i_int );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment