Changeset 0e10f5faae3872fc5f93895c9a040b6464c26585

Show
Ignore:
Timestamp:
10/11/07 01:45:47 (1 year ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1192059947 +0000
git-parent:

[d3b42e438a49b7df4912c9f0db365b9355b93462]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1192059947 +0000
Message:

services_discovery/hal.c: Get rid of the playlist code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/services_discovery/hal.c

    r83a9495 r0e10f5f  
    245245{ 
    246246    services_discovery_sys_t    *p_sys  = p_sd->p_sys; 
    247     playlist_item_t             *p_pl_item; 
    248  
    249     playlist_t *p_playlist = pl_Yield( p_sd ); 
    250     if( !p_playlist ) 
    251     { 
    252         msg_Err( p_sd, "playlist not found" ); 
    253         return; 
    254     } 
    255247 
    256248    int i; 
     
    258250    { /*  looks for a matching udi */ 
    259251        if( strcmp( psz_udi, p_sys->pp_devices[i]->psz_udi ) == 0 ) 
    260         { /* delete the corresponding item */ 
    261             p_pl_item = playlist_ItemGetByInputId( p_playlist, 
    262                 p_sys->pp_devices[i]->p_item->i_id, p_sd->p_cat ); 
    263             if( p_pl_item ) 
    264             { 
    265                 while( p_pl_item->i_children > 0 ) 
    266                 { /* delete all childs */ 
    267                     playlist_DeleteFromInput( p_playlist, 
    268                         p_pl_item->pp_children[0]->p_input->i_id, VLC_FALSE ); 
    269                 } 
    270                 /* HACK: if i_children == 0 the item won't be deleted 
    271                  * That means that it _had_ children but they were deleted */ 
    272                 if( p_pl_item->i_children == 0 ) 
    273                     p_pl_item->i_children = -1; 
    274             } 
     252        { /* delete the corresponding item */     
    275253            services_discovery_RemoveItem( p_sd, p_sys->pp_devices[i]->p_item ); 
    276  
    277254            if( p_sys->pp_devices[i]->psz_udi ) 
    278255                free( p_sys->pp_devices[i]->psz_udi ); 
     
    281258        } 
    282259    } 
    283  
    284     pl_Release( p_playlist ); 
    285260} 
    286261#endif 
     
    300275    if( asprintf( &psz_uri, "cdda://%s", psz_blockdevice ) == -1 ) 
    301276        return; 
    302     /* Create the playlist item here */ 
     277    /* Create the item here */ 
    303278    p_input = input_ItemNew( p_sd, psz_uri, "Audio CD" ); 
    304279    free( psz_uri );