Removed alternate file extension code so Cog does not encourage broken cuesheets.

CQTexperiment
vspader 2007-10-20 19:14:12 +00:00
parent d376d2e3ca
commit 8a5db0dd33
4 changed files with 11 additions and 39 deletions

View File

@ -136,14 +136,14 @@
isa = PBXContainerItemProxy;
containerPortal = 171D09220CCA5FE1009FF3AB /* APL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 99B989F40CC7E10400C256E9 /* APL.bundle */;
remoteGlobalIDString = 99B989F40CC7E10400C256E9;
remoteInfo = "APL Plugin";
};
171D09410CCA6027009FF3AB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 171D09220CCA5FE1009FF3AB /* APL.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 99B989F30CC7E10400C256E9 /* APL Plugin */;
remoteGlobalIDString = 99B989F30CC7E10400C256E9;
remoteInfo = "APL Plugin";
};
17C808780C3BD167005707C4 /* PBXContainerItemProxy */ = {

View File

@ -368,7 +368,6 @@
{
[[shuffleList objectAtIndex:i] setShuffleIndex:[NSNumber numberWithInt:i]];
}
}
- (void)resetShuffleList

View File

@ -18,7 +18,7 @@
int column = [self columnAtPoint:local_point];
if ([theEvent clickCount]==2 && column!=-1) {
if ([theEvent clickCount] == 2 && column != -1) {
// compute whether the clickpoint is a column separator or not
BOOL clickedSeperator = NO;

View File

@ -170,43 +170,16 @@
track = @"01";
}
//Sometimes cue sheets will contain .wav tracks when they were actually reencoded.
NSFileManager *fm = [NSFileManager defaultManager];
NSURL *url = [self urlForPath:path relativeTo:filename];
if ([url isFileURL] && ![fm fileExistsAtPath:[url absoluteString]] && [[[url absoluteString] pathExtension] isEqualToString:@"wav"]) {
//creator fogot to edit cue... happens
NSString* originalURL = [url path];
NSString *ext;
NSEnumerator *e = [[[[NSClassFromString(@"PluginController") sharedPluginController] decodersByExtension] allKeys] objectEnumerator];
while (ext = [e nextObject])
{
if ([ext isEqualToString:@"cue"])
continue;
NSMutableString* newURL = [originalURL mutableCopy];
[newURL replaceOccurrencesOfString:@"wav" withString:ext options:(NSAnchoredSearch | NSBackwardsSearch) range:NSMakeRange(0, [newURL length])];
if ([fm fileExistsAtPath:newURL])
{
url = [NSURL fileURLWithPath:newURL];
[newURL release];
break;
}
[newURL release];
}
}
//Need to add basePath, and convert to URL
[entries addObject:
[CueSheetTrack trackWithURL:url
track: track
time: seconds
artist:artist
album:album
title:title
genre:genre
year:year]];
[CueSheetTrack trackWithURL:[self urlForPath:path relativeTo:filename];
track: track
time: seconds
artist:artist
album:album
title:title
genre:genre
year:year]];
trackAdded = YES;
}
else if ([command isEqualToString:@"PERFORMER"])