Considerable cleanup of Path column, added Filename column, both hidden by default, path now abbreviates home directory to ~ for cleaner look.
parent
90a32bd646
commit
d23b6b4ee5
File diff suppressed because it is too large
Load Diff
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
@interface PlaylistEntry : NSObject {
|
@interface PlaylistEntry : NSObject {
|
||||||
NSURL *url;
|
NSURL *url;
|
||||||
|
NSString *relativePath;
|
||||||
|
NSString *base;
|
||||||
|
|
||||||
NSString *artist;
|
NSString *artist;
|
||||||
NSString *album;
|
NSString *album;
|
||||||
|
@ -44,6 +46,11 @@
|
||||||
- (void)setCurrent:(NSNumber *) b;
|
- (void)setCurrent:(NSNumber *) b;
|
||||||
- (NSNumber *)current;
|
- (NSNumber *)current;
|
||||||
|
|
||||||
|
- (NSString *)relativePath;
|
||||||
|
- (void)setRelativePath:(NSString *)rel;
|
||||||
|
- (NSString *)base;
|
||||||
|
- (void)setBase:(NSString *)newUrl;
|
||||||
|
|
||||||
- (void)setArtist:(NSString *)s;
|
- (void)setArtist:(NSString *)s;
|
||||||
- (NSString *)artist;
|
- (NSString *)artist;
|
||||||
- (void)setAlbum:(NSString *)s;
|
- (void)setAlbum:(NSString *)s;
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
title = nil;
|
title = nil;
|
||||||
genre = nil;
|
genre = nil;
|
||||||
|
|
||||||
|
relativePath = nil;
|
||||||
|
base = nil;
|
||||||
|
|
||||||
year = nil;
|
year = nil;
|
||||||
track = nil;
|
track = nil;
|
||||||
totalFrames = nil;
|
totalFrames = nil;
|
||||||
|
@ -63,6 +66,8 @@
|
||||||
[current release];
|
[current release];
|
||||||
[idx release];
|
[idx release];
|
||||||
[shuffleIndex release];
|
[shuffleIndex release];
|
||||||
|
[relativePath release];
|
||||||
|
[base release];
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
@ -298,6 +303,30 @@
|
||||||
return seekable;
|
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
|
- (void)setMetadata: (NSDictionary *)m
|
||||||
{
|
{
|
||||||
NSString *ti = [m objectForKey:@"title"];
|
NSString *ti = [m objectForKey:@"title"];
|
||||||
|
@ -309,6 +338,9 @@
|
||||||
[self setTitle:ti];
|
[self setTitle:ti];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[self setBase:[[url path] lastPathComponent]];
|
||||||
|
[self setRelativePath:[[url relativePath] stringByAbbreviatingWithTildeInPath]];
|
||||||
|
|
||||||
[self setArtist:[m objectForKey:@"artist"]];
|
[self setArtist:[m objectForKey:@"artist"]];
|
||||||
[self setAlbum:[m objectForKey:@"album"]];
|
[self setAlbum:[m objectForKey:@"album"]];
|
||||||
[self setGenre:[m objectForKey:@"genre"]];
|
[self setGenre:[m objectForKey:@"genre"]];
|
||||||
|
|
Loading…
Reference in New Issue