source: trunk/SapphireMedia.m @ 278

Revision 278, 1.0 KB checked in by gbooker, 6 years ago (diff)

Previews now work in frontrow

Line 
1//
2//  SapphireMedia.m
3//  Sapphire
4//
5//  Created by Graham Booker on 6/25/07.
6//  Copyright 2007 www.nanopi.net. All rights reserved.
7//
8
9#import "SapphireMedia.h"
10#import "SapphireFrontRowCompat.h"
11
12@implementation SapphireMedia
13
14- (void)dealloc
15{
16        [imagePath release];
17        [super dealloc];
18}
19
20/*!
21 * @brief Set the resume time for the media
22 *
23 * @param time the time at which to resume
24 */
25- (void)setResumeTime:(unsigned int)time
26{
27        resumeTime = time;
28}
29
30/*!
31 * @brief Overrides the bookmark time
32 *
33 * @return The resume time if exists, otherwise the bookmark time
34 */
35- (unsigned int)bookmarkTimeInSeconds
36{
37        /*Check for resume time and if none, return bookmark time*/
38        if(time == 0)
39                return [super bookmarkTimeInSeconds];
40        /*return resume time*/
41        return resumeTime;
42}
43
44- (void)setImagePath:(NSString *)path
45{
46        [imagePath release];
47        imagePath = [path retain];
48}
49
50- (id)mediaType
51{
52        return [BRMediaType TVShow];
53}
54
55- (BOOL)hasCoverArt
56{
57        return YES;
58}
59
60- (id)coverArt
61{
62        return [SapphireFrontRowCompat imageAtPath:imagePath];
63}
64
65@end
Note: See TracBrowser for help on using the repository browser.