Fix for multi-track files and the file move watching.

CQTexperiment
vspader 2008-03-15 04:45:37 +00:00
parent ae469a43ec
commit 0a1630db7e
2 changed files with 7 additions and 1 deletions

View File

@ -13,6 +13,9 @@
@interface FilePlaylistEntry : PlaylistEntry {
FSRef fileRef;
NSString *fragment;
}
@property(retain) NSString *fragment;
@end

View File

@ -11,9 +11,12 @@
@implementation FilePlaylistEntry
@synthesize fragment;
- (void)setURL:(NSURL *)url
{
FSPathMakeRef((UInt8 *)[[url path] fileSystemRepresentation], &fileRef, NULL);
self.fragment = [url fragment];
}
- (NSURL *)URL
@ -24,7 +27,7 @@
if (status != noErr)
return nil;
return [NSURL fileURLWithPath: [NSString stringWithUTF8String:(const char *)path]];
return [NSURL URLWithString:[[[NSURL fileURLWithPath: [NSString stringWithUTF8String:(const char *)path]] absoluteString] stringByAppendingFormat:@"#%@", self.fragment]];
}
@end