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/Players/SapphireMedia.m

    r696 r827  
    2020 
    2121#import "SapphireMedia.h" 
     22#import "NSImage-Extensions.h" 
    2223#import <SapphireCompatClasses/SapphireFrontRowCompat.h> 
    2324 
     
    4041{ 
    4142        [imagePath release]; 
     43        [coverart release]; 
    4244        [super dealloc]; 
    4345} 
     
    6466} 
    6567 
     68- (void)setImage:(NSImage *)image 
     69{ 
     70        [coverart release]; 
     71        coverart = [image retain]; 
     72} 
     73 
    6674- (id)mediaType 
    6775{ 
     
    7987- (id)coverArt 
    8088{ 
    81         return [SapphireFrontRowCompat imageAtPath:imagePath]; 
     89        if (imagePath) 
     90                return [SapphireFrontRowCompat imageAtPath:imagePath]; 
     91         
     92        if (coverart) 
     93                return [SapphireFrontRowCompat coverartAsImage:[coverart asImageRef]]; 
     94 
     95        return nil; 
    8296} 
    8397