Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (55 sloc) 2.65 KB
// SMFAssetPreviewController.m
// SMFramework
// Created by Thomas Cool on 2/8/11.
// Copyright 2011 All rights reserved.
#import "SMFAssetPreviewController.h"
static NSString * const kSMFMovieTitle = @"title";
static NSString * const kSMFMovieSubtitle = @"substitle";
static NSString * const kSMFMovieSummary = @"summary";
static NSString * const kSMFMoviePoster = @"poster";
static NSString * const kSMFMovieHeaders = @"headers";
static NSString * const kSMFMovieColumns = @"columns";
static NSString * const kSMFMovieRating = @"rating";
@implementation SMFAssetPreviewController
@synthesize asset;
-(NSMutableDictionary *)getInformation
NSMutableDictionary *d = [[NSMutableDictionary alloc]initWithObjectsAndKeys:
@"(no summary)",kSMFMovieSummary,
[NSArray array],kSMFMovieHeaders,
[NSArray array],kSMFMovieColumns,
[BRImage imageWithPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"colorAppleTVNameImage" ofType:@"png"]],kSMFMoviePoster,
if ([asset isKindOfClass:[BRBaseMediaAsset class]]) {
NSString *t = [self.asset title];
if (t!=nil) {[d setObject:t forKey:kSMFMovieTitle];}
t = [self.asset publisher];
if (t!=nil) {[d setObject:t forKey:kSMFMovieSubtitle];}
t = [self.asset mediaSummary];
if (t!=nil) {[d setObject:t forKey:kSMFMovieSummary];}
if ([asset respondsToSelector:@selector(coverArt)]) {
BRImage *i = [(BRPhotoMediaAsset *)self.asset coverArt];
if (i==nil) [d setObject:i forKey:kSMFMoviePoster];
NSArray *a = [NSArray arrayWithObjects:@"Details",@"Actors",@"Director",@"Producers",nil];
[d setObject:a forKey:kSMFMovieHeaders];
NSArray *cast = [self.asset cast];
if (cast==nil) cast=[NSArray array];
NSArray *directors = [self.asset directors];
if (directors==nil) directors=[NSArray array];
NSArray *producers = [self.asset producers];
if (producers==nil) producers=[NSArray array];
a=[NSArray arrayWithObjects:[NSArray array],cast,directors,producers,nil];
[d setObject:a forKey:kSMFMovieColumns];
t = [self.asset rating];
if (t!=nil) {[d setObject:t forKey:kSMFMovieRating];}
return [d autorelease];
Something went wrong with that request. Please try again.