Changeset 0e10f5faae3872fc5f93895c9a040b6464c26585
- 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
| r83a9495 |
r0e10f5f |
|
| 245 | 245 | { |
|---|
| 246 | 246 | 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 | | } |
|---|
| 255 | 247 | |
|---|
| 256 | 248 | int i; |
|---|
| … | … | |
| 258 | 250 | { /* looks for a matching udi */ |
|---|
| 259 | 251 | 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 */ |
|---|
| 275 | 253 | services_discovery_RemoveItem( p_sd, p_sys->pp_devices[i]->p_item ); |
|---|
| 276 | | |
|---|
| 277 | 254 | if( p_sys->pp_devices[i]->psz_udi ) |
|---|
| 278 | 255 | free( p_sys->pp_devices[i]->psz_udi ); |
|---|
| … | … | |
| 281 | 258 | } |
|---|
| 282 | 259 | } |
|---|
| 283 | | |
|---|
| 284 | | pl_Release( p_playlist ); |
|---|
| 285 | 260 | } |
|---|
| 286 | 261 | #endif |
|---|
| … | … | |
| 300 | 275 | if( asprintf( &psz_uri, "cdda://%s", psz_blockdevice ) == -1 ) |
|---|
| 301 | 276 | return; |
|---|
| 302 | | /* Create the playlist item here */ |
|---|
| | 277 | /* Create the item here */ |
|---|
| 303 | 278 | p_input = input_ItemNew( p_sd, psz_uri, "Audio CD" ); |
|---|
| 304 | 279 | free( psz_uri ); |
|---|