Show
Ignore:
Timestamp:
04/26/09 17:24:48 (3 years ago)
Author:
gbooker
Message:

Added screen capture ability thanks to patch by wazza. Does not work on ATV since ATV is broken.
Fixes #45

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/CoreData/SapphireFrappliance/MetaDataImporting/SapphireTVShowImporter.m

    r795 r827  
    2929#import "SapphireEpisode.h" 
    3030#import "SapphireSettings.h" 
     31#import "NSImage-Extensions.h" 
     32 
    3133 
    3234/* TVRage XPATHS  */ 
     
    631633                 
    632634        /* Lets process the cover art directory structure */ 
    633         NSString * previewArtPath=[NSString stringWithFormat:@"%@/@TV/%@/%@", 
    634                                                                         [SapphireMetaDataSupport collectionArtPath], 
    635                                                                         [info objectForKey:META_SHOW_NAME_KEY], 
    636                                                                         [NSString stringWithFormat:@"Season %d",[[info objectForKey:META_SEASON_NUMBER_KEY] intValue]]]; 
     635        NSString * previewArtPath = [NSFileManager previewArtPathForTV:[info objectForKey:META_SHOW_NAME_KEY] season:[[info objectForKey:META_SEASON_NUMBER_KEY] intValue]]; 
    637636                                                 
    638637        [[NSFileManager defaultManager] constructPath:previewArtPath]; 
     
    656655                [myDelegate release]; 
    657656        } 
     657        else if(!imageExists) 
     658        { 
     659                //QTMovie is broken on ATV, don't fetch images there 
     660                if ([SapphireFrontRowCompat usingFrontRow] && ![SapphireFrontRowCompat usingTakeTwo] && [metaData fileContainerType] == FILE_CONTAINER_TYPE_QT_MOVIE) 
     661                { 
     662                        // NSImage-Extensions 
     663                        [[NSImage imageFromMovie:path] writeToFile:imageDestination atomically:YES]; 
     664                } 
     665        } 
    658666         
    659667        /*Import the info*/