Considerable cleanup of Path column, added Filename column, both hidden by default, path now abbreviates home directory to ~ for cleaner look.

CQTexperiment
areff 2008-02-18 16:06:54 +00:00
parent 90a32bd646
commit d23b6b4ee5
3 changed files with 2233 additions and 2122 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,8 @@
@interface PlaylistEntry : NSObject {
NSURL *url;
NSString *relativePath;
NSString *base;
NSString *artist;
NSString *album;
@ -44,6 +46,11 @@
- (void)setCurrent:(NSNumber *) b;
- (NSNumber *)current;
- (NSString *)relativePath;
- (void)setRelativePath:(NSString *)rel;
- (NSString *)base;
- (void)setBase:(NSString *)newUrl;
- (void)setArtist:(NSString *)s;
- (NSString *)artist;
- (void)setAlbum:(NSString *)s;

View File

@ -29,6 +29,9 @@
title = nil;
genre = nil;
relativePath = nil;
base = nil;
year = nil;
track = nil;
totalFrames = nil;
@ -63,6 +66,8 @@
[current release];
[idx release];
[shuffleIndex release];
[relativePath release];
[base release];
[super dealloc];
}
@ -298,6 +303,30 @@
return seekable;
}
- (NSString *)relativePath
{
return relativePath;
}
- (void)setRelativePath:(NSString *)rel
{
[rel retain];
[relativePath release];
relativePath = rel;
}
- (NSString *)base
{
return base;
}
- (void)setBase:(NSString *)newUrl
{
[newUrl retain];
[base release];
base = newUrl;
}
- (void)setMetadata: (NSDictionary *)m
{
NSString *ti = [m objectForKey:@"title"];
@ -309,6 +338,9 @@
[self setTitle:ti];
}
[self setBase:[[url path] lastPathComponent]];
[self setRelativePath:[[url relativePath] stringByAbbreviatingWithTildeInPath]];
[self setArtist:[m objectForKey:@"artist"]];
[self setAlbum:[m objectForKey:@"album"]];
[self setGenre:[m objectForKey:@"genre"]];