Ticket #45: screen_grabs.diff
| File screen_grabs.diff, 22.1 KB (added by wazza, 3 years ago) |
|---|
-
SapphireFrappliance/Players/SapphireMedia.h
27 27 @interface SapphireMedia : BRXMLMediaAsset { 28 28 unsigned int resumeTime; /*!< @brief The resume time to use, 0 to use super*/ 29 29 NSString *imagePath; /*!< @brief The cover art path to use, nil to use super*/ 30 NSImage *coverart; /*!< @brief The cover art as image data */ 30 31 } 31 32 32 33 /*! … … 51 52 */ 52 53 - (void)setImagePath:(NSString *)path; 53 54 55 /*! 56 * @brief Sets the image for cover art so it can be displayed 57 * 58 * param[in] image The cover art as an NSImage object 59 */ 60 - (void)setImage:(NSImage *)image; 61 54 62 @end -
SapphireFrappliance/Players/SapphireMedia.m
19 19 */ 20 20 21 21 #import "SapphireMedia.h" 22 #import "NSImage-Extensions.h" 22 23 #import <SapphireCompatClasses/SapphireFrontRowCompat.h> 23 24 24 25 @implementation SapphireMedia … … 39 40 - (void)dealloc 40 41 { 41 42 [imagePath release]; 43 [coverart release]; 42 44 [super dealloc]; 43 45 } 44 46 … … 63 65 imagePath = [path retain]; 64 66 } 65 67 68 - (void)setImage:(NSImage *)image 69 { 70 [coverart release]; 71 coverart = [image retain]; 72 } 73 66 74 - (id)mediaType 67 75 { 68 76 if([SapphireFrontRowCompat usingFrontRow]) … … 78 86 79 87 - (id)coverArt 80 88 { 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; 82 96 } 83 97 84 98 @end -
SapphireFrappliance/Browser/SapphireMarkMenu.m
32 32 #import "SapphireWaitDisplay.h" 33 33 #import "SapphireConfirmPrompt.h" 34 34 #import "SapphireApplianceController.h" 35 #import "SapphirePosterChooser.h" 36 #import "NSImage-Extensions.h" 37 #import "NSFileManager-Extensions.h" 35 38 39 BOOL allowCoverArtChange( NSString * const path ) 40 { 41 if ( [[NSFileManager defaultManager] hasVIDEO_TS:path] ) 42 return NO; 43 44 const NSSet * const disallowedFormats = [[NSSet alloc] initWithObjects:@"mkv", @"flv", nil]; 45 46 return ![disallowedFormats containsObject:[path pathExtension]]; 47 } 48 36 49 @implementation SapphireMarkMenu 37 50 38 51 NSString *MARK_NAME = @"Name"; … … 50 63 COMMAND_RENAME_TO_PRETTY, 51 64 COMMAND_CUT_PATH, 52 65 COMMAND_DELETE_PATH, 66 COMMAND_CHANGE_ARTWORK, 53 67 //File Only Commands 54 68 COMMAND_MARK_TO_JOIN, 55 69 COMMAND_MARK_AND_JOIN, … … 364 378 BRLocalizedString(@"Deletes this file", @""), MARK_DESCRIPTION, 365 379 [NSNumber numberWithInt:COMMAND_DELETE_PATH], MARK_COMMAND, 366 380 nil]]; 381 // Allow cover art change for all formats except for DVD and .mkv 382 if ( allowCoverArtChange( [meta path] ) ) 383 { 384 [marks addObject: 385 [NSDictionary dictionaryWithObjectsAndKeys: 386 BRLocalizedString(@"Change artwork", @"Change artwork"), MARK_NAME, 387 BRLocalizedString(@"Select displayed artwork", @""), MARK_DESCRIPTION, 388 [NSNumber numberWithInt:COMMAND_CHANGE_ARTWORK], MARK_COMMAND, 389 nil]]; 390 } 367 391 } 368 392 else 369 393 { … … 383 407 [super dealloc]; 384 408 } 385 409 410 - (NSController *)doChangeArtwork:(SapphireFileMetaData *)fileMeta 411 { 412 SapphirePosterChooser *controller = [[SapphirePosterChooser alloc] initWithScene:[self scene]]; 413 414 [controller setListTitle:BRLocalizedString(@"Select cover art", @"Select cover art")]; 415 [controller setMovieTitle:@" "]; 416 [controller setFile:fileMeta]; 417 [controller setPosterImages:[NSImage imagesFromMovie:[fileMeta path] forArraySize:10]]; 418 [controller allowRefresh:YES]; 419 420 return [controller autorelease]; 421 } 422 386 423 - (NSController *)doJoin:(SapphireWaitDisplay *)wait 387 424 { 388 425 @try { … … 703 740 704 741 replaceController = [confirm autorelease]; 705 742 } 743 break; 744 case COMMAND_CHANGE_ARTWORK: 745 { 746 NSInvocation *invoke = [NSInvocation invocationWithMethodSignature: [self methodSignatureForSelector: @selector(doChangeArtwork:)]]; 747 [invoke setSelector: @selector(doChangeArtwork:)]; 748 [invoke setTarget: self]; 749 750 SapphireWaitDisplay *wait = [[SapphireWaitDisplay alloc] initWithScene: [self scene] 751 title: BRLocalizedString(@"Getting artwork selection", @"Getting artwork selection") 752 invokation: invoke]; 753 754 [invoke setArgument: &metaData atIndex: 2]; 755 756 replaceController = [wait autorelease]; 757 } 706 758 } 707 759 } 708 760 /*Save and exit*/ -
SapphireFrappliance/Sapphire.xcodeproj/project.pbxproj
53 53 38FAF9B60C0129E400853CFE /* BackRow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38FAF9B50C0129E400853CFE /* BackRow.framework */; }; 54 54 38FAFC320C012A7800853CFE /* SapphireAppliance.m in Sources */ = {isa = PBXBuildFile; fileRef = 38FAFC2F0C012A7800853CFE /* SapphireAppliance.m */; }; 55 55 38FAFC330C012A7800853CFE /* SapphireBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 38FAFC310C012A7800853CFE /* SapphireBrowser.m */; }; 56 805420AA0F94FA7E002D2DBF /* NSImage-Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 805420A90F94FA7E002D2DBF /* NSImage-Extensions.m */; }; 56 57 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 57 58 F500400B0D1998B4003FEA08 /* SapphireLeopardOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = F50040090D1998B4003FEA08 /* SapphireLeopardOnly.h */; }; 58 59 F500400C0D1998B4003FEA08 /* SapphireLeopardOnly.m in Sources */ = {isa = PBXBuildFile; fileRef = F500400A0D1998B4003FEA08 /* SapphireLeopardOnly.m */; }; … … 357 358 38FAFC2F0C012A7800853CFE /* SapphireAppliance.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SapphireAppliance.m; sourceTree = "<group>"; }; 358 359 38FAFC300C012A7800853CFE /* SapphireAppliance.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SapphireAppliance.h; sourceTree = "<group>"; }; 359 360 38FAFC310C012A7800853CFE /* SapphireBrowser.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SapphireBrowser.m; sourceTree = "<group>"; }; 361 805420A80F94FA7E002D2DBF /* NSImage-Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSImage-Extensions.h"; sourceTree = "<group>"; }; 362 805420A90F94FA7E002D2DBF /* NSImage-Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSImage-Extensions.m"; sourceTree = "<group>"; }; 360 363 8D5B49B6048680CD000E48DA /* Sapphire.frappliance */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Sapphire.frappliance; sourceTree = BUILT_PRODUCTS_DIR; }; 361 364 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 362 365 F5003FF90D19980B003FEA08 /* LeopardOnly.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LeopardOnly.framework; sourceTree = BUILT_PRODUCTS_DIR; }; … … 823 826 F571B7AD0E9C360500B7FD9D /* NSManagedObject-Extensions.m */, 824 827 F56B74D40C3753E300E934AA /* NSString-Extensions.h */, 825 828 F56B74D50C3753E300E934AA /* NSString-Extensions.m */, 829 805420A80F94FA7E002D2DBF /* NSImage-Extensions.h */, 830 805420A90F94FA7E002D2DBF /* NSImage-Extensions.m */, 826 831 ); 827 832 path = Extension; 828 833 sourceTree = "<group>"; … … 1353 1358 F58C52230F13B18F00DE7A65 /* SapphireTextEntryController.m in Sources */, 1354 1359 F52E4E2F0F4397D700AC6C52 /* SapphireWaitDisplay.m in Sources */, 1355 1360 F52E4EAA0F43B53F00AC6C52 /* SapphireConfirmPrompt.m in Sources */, 1361 805420AA0F94FA7E002D2DBF /* NSImage-Extensions.m in Sources */, 1356 1362 ); 1357 1363 runOnlyForDeploymentPostprocessing = 0; 1358 1364 }; -
SapphireFrappliance/MetaDataImporting/SapphirePosterChooser.h
41 41 BRMarchingIconLayer *posterMarch; /*!< @brief The icon march to display the posters*/ 42 42 BRBlurryImageLayer *defaultImage; /*!< @brief The image to use when the poster isn't loaded yet*/ 43 43 SapphireFileMetaData *meta; /*!< @brief The file's meta*/ 44 BOOL allowRefresh; /*!< @brief Should the chooser allow a refresh of the available cover art*/ 44 45 } 45 46 46 47 /*! 48 * @brief Set if this chooser should allow a refresh option 49 * 50 * @param[in] allow Yes or no flag 51 */ 52 - (void)allowRefresh: (BOOL)allow; 53 54 /*! 47 55 * @brief check ATV version & poster chooser opt out 48 56 * 49 57 * @return The YES if we can display … … 60 68 /*! 61 69 * @brief Sets the posters to choose from 62 70 * 63 * @param posterList The list of movies to choose from 71 * @param posterList The list of movies to choose from specified as paths 64 72 */ 65 73 - (void)setPosters:(NSArray *)posterList; 66 74 67 75 /*! 76 * @brief Sets the posters to choose from 77 * 78 * @param posterList The cover art to choose from specified as image objects 79 */ 80 - (void)setPosterImages:(const NSArray *)posterList; 81 82 /*! 68 83 * @brief Loads the posters from disk 69 84 */ 70 85 - (void)loadPosters; -
SapphireFrappliance/MetaDataImporting/SapphirePosterChooser.m
24 24 #import "SapphireMediaPreview.h" 25 25 #import "SapphireMedia.h" 26 26 #import "SapphireMetaData.h" 27 #import "SapphireWaitDisplay.h" 27 28 #import "SapphireDirectoryMetaData.h" 28 29 #import <SapphireCompatClasses/SapphireFrontRowCompat.h> 29 30 #import "SapphireApplianceController.h" 30 31 32 #import "NSImage-Extensions.h" 33 31 34 NSData *CreateBitmapDataFromImage(CGImageRef image, unsigned int width, unsigned int height); 32 35 33 36 @interface BRListControl (definedin1_1) … … 93 96 [super dealloc]; 94 97 } 95 98 99 - (void)allowRefresh: (BOOL)allow 100 { 101 allowRefresh = allow; 102 } 103 96 104 - (void) resetLayout 97 105 { 98 106 [super resetLayout]; … … 146 154 return listFrame; 147 155 } 148 156 157 - (NSController *)doChangeArtwork 158 { 159 SapphirePosterChooser *controller = [[SapphirePosterChooser alloc] initWithScene:[self scene]]; 160 161 [controller setListTitle:BRLocalizedString(@"Select cover art", @"Select cover art")]; 162 [controller setMovieTitle:@" "]; 163 [controller setFile:meta]; 164 [controller setPosterImages:[NSImage imagesFromMovie:[meta path] forArraySize:[posters count]]]; 165 [controller allowRefresh:YES]; 166 167 return [controller autorelease]; 168 } 169 149 170 - (void) itemSelected: (long) row 150 171 { 151 172 /*User made a selection*/ 152 // if(selection==0) 153 // { 154 /*User requested a menu refresh*/ 155 // [self resetLayout]; 156 // } 157 // else 158 // { 159 selectedPoster = row; 160 [[self stack] popController]; 161 // } 173 if ( allowRefresh && row == [posters count] ) 174 { 175 NSInvocation *invoke = [NSInvocation invocationWithMethodSignature: [self methodSignatureForSelector: @selector(doChangeArtwork)]]; 176 [invoke setSelector: @selector(doChangeArtwork)]; 177 [invoke setTarget: self]; 178 179 SapphireWaitDisplay *wait = [[SapphireWaitDisplay alloc] initWithScene: [self scene] 180 title: BRLocalizedString(@"Getting artwork selection", @"Getting artwork selection") 181 invokation: invoke]; 182 [[self stack] swapController:wait]; 183 } 184 else 185 { 186 selectedPoster = row; 187 if ( [[posters objectAtIndex:selectedPoster] isKindOfClass:[NSImage class]] ) 188 [[posters objectAtIndex:row] writeToFile:[meta coverArtPath] atomically:YES]; 189 [[self stack] popController]; 190 } 162 191 } 163 192 164 193 - (BOOL)okayToDisplay … … 187 216 [[self list] setDatasource:self]; 188 217 } 189 218 219 - (void)setPosterImages:(const NSArray *)posterList 220 { 221 posters = [posterList retain]; 222 223 [posterMarch release]; 224 posterMarch = nil; 225 226 [[self list] setDatasource: self]; 227 } 228 190 229 - (void)loadPosters 191 230 { 192 231 int i, count = [posters count]; … … 273 312 274 313 - (long) itemCount 275 314 { 315 if ( allowRefresh ) 316 return [posters count] + 1; 317 276 318 return [posters count]; 277 319 } 278 320 … … 280 322 - (id) itemForRow: (long) row 281 323 { 282 324 BRAdornedMenuItemLayer *result = [SapphireFrontRowCompat textMenuItemForScene:[self scene] folder:NO]; 283 // if(row==0)284 // [SapphireFrontRowCompat setTitle:BRLocalizedString(@"< Refresh Posters >", @"Reload posterimages") forMenu:result];285 //else286 [SapphireFrontRowCompat setTitle:[NSString stringWithFormat:@"Version %2d",row+1] forMenu:result];325 if ( allowRefresh && row == [posters count] ) 326 [SapphireFrontRowCompat setTitle:BRLocalizedString(@"Refresh", @"Reload images") forMenu:result]; 327 else 328 [SapphireFrontRowCompat setTitle:[NSString stringWithFormat:@"Version %2d",row+1] forMenu:result]; 287 329 return result; 288 330 } 289 331 … … 291 333 { 292 334 if(row > [posters count]) 293 335 return nil; 294 else 295 return [NSString stringWithFormat:@"Version %2d",row+1]; 336 337 if (allowRefresh && row == [posters count]) 338 return BRLocalizedString(@"Refresh", @"Reload images"); 339 340 return [NSString stringWithFormat:@"Version %2d",row+1]; 296 341 } 297 342 298 343 - (long) rowForTitle: (NSString *) title … … 437 482 { 438 483 if(posterMarch != nil) 439 484 return nil; 485 440 486 SapphireMediaPreview *preview = [[SapphireMediaPreview alloc] initWithScene:[self scene]]; 441 SapphireMedia *asset = [[SapphireMedia alloc] initWithMediaURL:[NSURL fileURLWithPath:@"none"]];442 NSString *poster = [posters objectAtIndex:row];443 NSString *posterDest=[NSString stringWithFormat:@"%@/%@",444 [applicationSupportDir() stringByAppendingPathComponent:@"Poster_Buffer"],445 [poster lastPathComponent]];446 [preview setShowsMetadataImmediately:NO];447 SapphireDirectoryMetaData *parent = [meta parent];448 [preview setMetaData:meta inMetaData:parent];449 487 [preview setShowsMetadataImmediately:YES]; 450 [asset setImagePath:posterDest];451 [preview setAsset:asset];452 [asset release];453 488 489 if ( row < [posters count] ) 490 { 491 [preview setMetaData:meta inMetaData:[meta parent]]; 492 493 SapphireMedia *asset = [[SapphireMedia alloc] initWithMediaURL:[NSURL fileURLWithPath:@"none"]]; 494 id poster = [posters objectAtIndex:row]; 495 496 if ( [poster isKindOfClass:[NSString class]] ) 497 { 498 NSString *posterDest = [NSString stringWithFormat:@"%@/%@", [applicationSupportDir() stringByAppendingPathComponent:@"Poster_Buffer"], 499 [poster lastPathComponent]]; 500 [asset setImagePath: posterDest]; 501 } 502 else 503 { 504 [asset setImage: poster]; 505 } 506 507 [preview setAsset:asset]; 508 [asset release]; 509 } 510 else if ( row == [posters count] ) 511 { 512 NSMutableDictionary *refreshMeta = [[NSMutableDictionary alloc] init]; 513 [refreshMeta setObject: BRLocalizedString( @"Refresh the artwork selection", @"Refresh the artwork selection" ) forKey: META_TITLE_KEY]; 514 [preview setUtilityData: refreshMeta]; 515 } 516 454 517 return [preview autorelease]; 455 518 } 456 519 -
SapphireFrappliance/MetaDataImporting/SapphireMovieImporter.m
706 706 lookupName = [[path stringByDeletingLastPathComponent] lastPathComponent]; 707 707 else 708 708 lookupName = fileName; 709 710 709 /*Get the movie title*/ 711 710 NSString *movieDataLink = nil ; 712 711 /*Check to see if we know this movie*/ -
SapphireFrappliance/MetaDataImporting/SapphireTVShowImporter.m
28 28 #import "SapphireTVTranslation.h" 29 29 #import "SapphireEpisode.h" 30 30 #import "SapphireSettings.h" 31 #import "NSImage-Extensions.h" 31 32 33 32 34 /* TVRage XPATHS */ 33 35 #define TVRAGE_SHOWNAME_XPATH @".//font[@size=2][@color=\"white\"]/b/text()" 34 36 #define TVRAGE_EPLIST_XPATH @"//*[@class='b']" … … 630 632 SapphireLog(SAPPHIRE_LOG_IMPORT, SAPPHIRE_LOG_LEVEL_DETAIL, @"Import info is %@", info); 631 633 632 634 /* 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]]; 637 636 638 637 [[NSFileManager defaultManager] constructPath:previewArtPath]; 639 638 /*Check for screen cap locally and on server*/ … … 655 654 [[[NSURLDownload alloc] initWithRequest:request delegate:myDelegate] autorelease]; 656 655 [myDelegate release]; 657 656 } 657 else if( !imageExists ) 658 { 659 if ( [metaData fileContainerTypeValue ] == FILE_CONTAINER_TYPE_QT_MOVIE ) 660 [[NSImage imageFromMovie:path] writeToFile:imageDestination atomically:YES]; 661 } 658 662 659 663 /*Import the info*/ 660 664 [info removeObjectForKey:LINK_KEY]; -
SapphireFrappliance/MetaDataImporting/SapphireXMLFileDataImporter.m
22 22 #import "SapphireFileMetaData.h" 23 23 #import "SapphireMediaPreview.h" 24 24 #import "SapphireXMLData.h" 25 #import "NSImage-Extensions.h" 25 26 #include <sys/types.h> 26 27 #include <sys/stat.h> 27 28 … … 45 46 #define SEARCH_SEC_EPISODE_XML_QUERY @"/media/searchSecondEpisode/text()" 46 47 #define SEARCH_EPISODE_XML_QUERY @"/media/searchEpisode/text()" 47 48 #define SEARCH_IMDB_XML_QUERY @"/media/searchIMDB/text()" 49 #define SCREENCAP_XML_QUERY @"/media/imageTime/text()" 50 48 51 //Multi Attributes 49 52 #define TITLE_XML_QUERY @"/media/title/text()" 50 53 #define GENRES_XML_QUERY @"/media/genres/genre/text()" … … 176 179 [newMetaData setObject:newData forKey:[xmlMultiAttributes objectForKey:key]] ; 177 180 } 178 181 /*Special cases*/ 182 /* Screen Cap */ 183 NSArray *imageCaps = [root objectsForXQuery:SCREENCAP_XML_QUERY error:&error]; 184 if ( [imageCaps count] && [metaData fileContainerType] == FILE_CONTAINER_TYPE_QT_MOVIE ) 185 { 186 unsigned int hour; 187 unsigned int minute; 188 unsigned int second; 189 190 sscanf( [[[imageCaps objectAtIndex:0] stringValue] cString], "%u:%u:%u", &hour, &minute, &second ); 191 const NSData * image = [NSImage imageFromMovie: [metaData path] atTime: ((60*60*hour) + (60*minute) + second)]; 192 [image writeToFile:[metaData coverArtPath] atomically:YES]; 193 } 194 179 195 /*The air date*/ 180 196 NSString *value = [newMetaData objectForKey:META_SHOW_AIR_DATE]; 181 197 if(value != nil) -
SapphireFrappliance/Extension/NSFileManager-Extensions.m
19 19 */ 20 20 21 21 #import "NSFileManager-Extensions.h" 22 #import "SapphireMetaDataSupport.h" 22 23 23 24 @implementation NSFileManager (SapphireExtensions) 24 25 - (BOOL)constructPath:(NSString *)proposedPath … … 122 123 return ([self isDirectory:path] || [self hasVIDEO_TS:path] || [allExtensions containsObject:[path pathExtension]]); 123 124 } 124 125 126 + (NSString *)previewArtPathForTV:(NSString *)show season:(unsigned int)seasonNum 127 { 128 return [NSString stringWithFormat:@"%@/@TV/%@/%@", [SapphireMetaDataSupport collectionArtPath], 129 show, 130 [NSString stringWithFormat:@"Season %d", seasonNum]]; 131 } 125 132 @end -
SapphireFrappliance/Extension/NSFileManager-Extensions.h
71 71 */ 72 72 - (BOOL)acceptFilePath:(NSString *)path; 73 73 74 /*! 75 * @brief Returns the cover art path for a TV show & season 76 * 77 * @param[in] show TV Show name 78 * @param[in] seasonNum Season number 79 * 80 * @return cover art path 81 */ 82 + (NSString *)previewArtPathForTV:(NSString *)show season:(unsigned int)seasonNum; 74 83 @end -
SapphireCompatibilityClasses/SapphireFrontRowCompat.h
87 87 + (id)imageAtPath:(NSString *)path scene:(BRRenderScene *)scene; 88 88 89 89 /*! 90 * @brief Load an image from an Image Ref 91 * 92 * This returns a CGImageRef or a BRImage, depending on platform. 93 * 94 * @param[in] imageRef CGImageRef 95 * @return BRImage on FrontRow of CGImageRef on ATV 96 */ 97 + (id)coverartAsImage: (CGImageRef)imageRef; 98 99 /*! 90 100 * @brief Get a menu text menu item 91 101 * 92 102 * Menu items are of different classes on the ATV and in frontrow. -
SapphireCompatibilityClasses/SapphireFrontRowCompat.m
168 168 } 169 169 } 170 170 171 + (id)coverartAsImage: (CGImageRef)imageRef 172 { 173 // Non-FR - return CGImageRef 174 if (!usingFrontRow) 175 return (id)imageRef; 176 177 // FR - return BRImage 178 Class cls = NSClassFromString(@"BRImage"); 179 return (id)[cls imageWithCGImageRef:imageRef]; 180 } 181 171 182 + (BRAdornedMenuItemLayer *)textMenuItemForScene:(BRRenderScene *)scene folder:(BOOL)folder 172 183 { 173 184 if(usingFrontRow)
