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 {
|
||||
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;
|
||||
|
|
|
@ -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"]];
|
||||
|
|
Loading…
Reference in New Issue