cog/Plugins/CueSheet/CueSheetTrack.m

93 lines
1.3 KiB
Matlab
Raw Normal View History

2007-10-09 02:25:40 +00:00
//
// CueSheetTrack.m
// CueSheet
//
// Created by Zaphod Beeblebrox on 10/8/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "CueSheetTrack.h"
@implementation CueSheetTrack
2007-10-13 01:07:19 +00:00
+ (id)trackWithURL:(NSURL *)u track:(NSString *)t time:(double)s artist:(NSString *)a album:(NSString *)b title:(NSString *)l genre:(NSString *)g year:(NSString *)y
{
2007-10-13 01:07:19 +00:00
return [[[CueSheetTrack alloc] initWithURL:u track:t time:s artist:a album:b title:l genre:g year:y] autorelease];
}
2007-10-13 01:07:19 +00:00
- (id)initWithURL:(NSURL *)u track:(NSString *)t time:(double)s artist:(NSString *)a album:(NSString *)b title:(NSString *)l genre:(NSString *)g year:(NSString *)y
2007-10-09 02:25:40 +00:00
{
self = [super init];
if (self)
{
track = [t copy];
url = [u copy];
2007-10-13 01:07:19 +00:00
artist = [a copy];
album = [b copy];
title = [l copy];
genre = [g copy];
year = [y copy];
time = s;
2007-10-09 02:25:40 +00:00
}
return self;
}
2009-03-08 20:17:45 +00:00
- (void)dealloc
{
[track release];
[url release];
[artist release];
[album release];
[title release];
[genre release];
[year release];
2009-03-08 20:19:25 +00:00
[super dealloc];
2009-03-08 20:17:45 +00:00
}
2007-10-09 02:25:40 +00:00
- (NSString *)track
{
return track;
}
- (NSURL *)url
2007-10-09 02:25:40 +00:00
{
return url;
2007-10-09 02:25:40 +00:00
}
- (double)time
2007-10-09 02:25:40 +00:00
{
return time;
2007-10-09 02:25:40 +00:00
}
2007-10-13 01:07:19 +00:00
- (NSString *)artist
{
return artist;
}
- (NSString *)album
{
return album;
}
- (NSString *)title
{
return title;
}
- (NSString *)genre
{
return genre;
}
- (NSString *)year
{
return year;
}
2007-10-09 02:25:40 +00:00
@end