Changeset 4a19225407971ebbbd26840072d62ededc782d0e
- Timestamp:
- 02/16/08 01:33:48
(5 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1203122028 +0000
- git-parent:
[c6f9a67d3f6741518abff10e1ea22f8dc984b7b1]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1203122028 +0000
- Message:
macosx/framework: Only fetch meta when needed.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r762b3db |
r4a19225 |
|
| 114 | 114 | NSMutableDictionary * metaDictionary; //< Meta data storage |
|---|
| 115 | 115 | id delegate; //< Delegate object |
|---|
| 116 | | BOOL preparsed; //< Value used to determine of the file has been preparsed |
|---|
| | 116 | BOOL artFetched; //< Value used to determine of the artwork has been preparsed |
|---|
| 117 | 117 | VLCMediaState state; |
|---|
| 118 | 118 | } |
|---|
| r762b3db |
r4a19225 |
|
| 431 | 431 | libvlc_exception_init( &ex ); |
|---|
| 432 | 432 | |
|---|
| | 433 | artFetched = NO; |
|---|
| | 434 | |
|---|
| 433 | 435 | char * p_url = libvlc_media_descriptor_get_mrl( p_md, &ex ); |
|---|
| 434 | 436 | catch_exception( &ex ); |
|---|
| … | … | |
| 464 | 466 | * And all the other meta will be added through the libvlc event system */ |
|---|
| 465 | 467 | [self fetchMetaInformationFromLibVLCWithType: VLCMetaInformationTitle]; |
|---|
| 466 | | |
|---|
| 467 | | /* Force VLCMetaInformationArtworkURL, that will trigger artwork fetching */ |
|---|
| 468 | | [self fetchMetaInformationFromLibVLCWithType: VLCMetaInformationArtworkURL]; |
|---|
| 469 | 468 | } |
|---|
| 470 | 469 | |
|---|
| … | … | |
| 546 | 545 | [self setState: [newStateAsNumber intValue]]; |
|---|
| 547 | 546 | } |
|---|
| | 547 | |
|---|
| | 548 | - (id)valueForKeyPath:(NSString *)keyPath |
|---|
| | 549 | { |
|---|
| | 550 | if( ![metaDictionary objectForKey:@"artwork"] && [keyPath isEqualToString:@"metaDictionary.artwork"]) |
|---|
| | 551 | { |
|---|
| | 552 | artFetched = YES; |
|---|
| | 553 | /* Force the retrieval of the artwork now that someone asked for it */ |
|---|
| | 554 | [self fetchMetaInformationFromLibVLCWithType: VLCMetaInformationArtworkURL]; |
|---|
| | 555 | } |
|---|
| | 556 | return [super valueForKeyPath:keyPath]; |
|---|
| | 557 | } |
|---|
| 548 | 558 | @end |
|---|
| 549 | 559 | |
|---|