Changeset 0020f8223ca647e68fa0f2d58cbe97fc9c149cdc
- Timestamp:
- 29/04/05 09:37:20
(4 years ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1114760240 +0000
- git-parent:
[40641a7b34709bb4de951d7a4114e85d9d3180fc]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1114760240 +0000
- Message:
- record: use add_directory (instead of add_string) + parse the name to
remove the uri/path part.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2078691 |
r0020f82 |
|
| 55 | 55 | add_shortcut( "record" ); |
|---|
| 56 | 56 | |
|---|
| 57 | | add_string( "record-path", NULL, NULL, |
|---|
| 58 | | RECORD_PATH_TXT, RECORD_PATH_LONGTXT, VLC_TRUE ); |
|---|
| | 57 | add_directory( "record-path", NULL, NULL, |
|---|
| | 58 | RECORD_PATH_TXT, RECORD_PATH_LONGTXT, VLC_TRUE ); |
|---|
| 59 | 59 | |
|---|
| 60 | 60 | set_callbacks( Open, Close ); |
|---|
| … | … | |
| 342 | 342 | { |
|---|
| 343 | 343 | vlc_mutex_lock( &p_input->input.p_item->lock ); |
|---|
| 344 | | if( p_input->input.p_item->psz_name && |
|---|
| 345 | | strlen( p_input->input.p_item->psz_name ) < 64 ) |
|---|
| 346 | | psz_name = strdup( p_input->input.p_item->psz_name ); |
|---|
| | 344 | if( p_input->input.p_item->psz_name ) |
|---|
| | 345 | { |
|---|
| | 346 | char *p = strrchr( p_input->input.p_item->psz_name, '/' ); |
|---|
| | 347 | if( p == NULL ) |
|---|
| | 348 | p = strrchr( p_input->input.p_item->psz_name, '\\' ); |
|---|
| | 349 | |
|---|
| | 350 | if( p == NULL ) |
|---|
| | 351 | psz_name = strdup( p_input->input.p_item->psz_name ); |
|---|
| | 352 | else if( p[1] != '\0' ) |
|---|
| | 353 | psz_name = strdup( &p[1] ); |
|---|
| | 354 | } |
|---|
| 347 | 355 | vlc_mutex_unlock( &p_input->input.p_item->lock ); |
|---|
| 348 | 356 | |
|---|
| 349 | 357 | vlc_object_release( p_input ); |
|---|
| 350 | 358 | } |
|---|
| | 359 | |
|---|
| 351 | 360 | if( psz_name == NULL ) |
|---|
| 352 | 361 | psz_name = strdup( "Unknown" ); |
|---|