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

This commit is contained in:
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 { @interface FilePlaylistEntry : PlaylistEntry {
FSRef fileRef; FSRef fileRef;
NSString *fragment;
} }
@property(retain) NSString *fragment;
@end @end

View file

@ -11,9 +11,12 @@
@implementation FilePlaylistEntry @implementation FilePlaylistEntry
@synthesize fragment;
- (void)setURL:(NSURL *)url - (void)setURL:(NSURL *)url
{ {
FSPathMakeRef((UInt8 *)[[url path] fileSystemRepresentation], &fileRef, NULL); FSPathMakeRef((UInt8 *)[[url path] fileSystemRepresentation], &fileRef, NULL);
self.fragment = [url fragment];
} }
- (NSURL *)URL - (NSURL *)URL
@ -24,7 +27,7 @@
if (status != noErr) if (status != noErr)
return nil; 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 @end