From 8a5db0dd33771b18a277d5078141899fe07c5961 Mon Sep 17 00:00:00 2001 From: vspader Date: Sat, 20 Oct 2007 19:14:12 +0000 Subject: [PATCH] Removed alternate file extension code so Cog does not encourage broken cuesheets. --- Cog.xcodeproj/project.pbxproj | 4 ++-- Playlist/PlaylistController.m | 1 - Playlist/PlaylistHeaderView.m | 2 +- Plugins/CueSheet/CueSheet.m | 43 +++++++---------------------------- 4 files changed, 11 insertions(+), 39 deletions(-) diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index bdc9ceed1..8b1db0fdf 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -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 */ = { diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index df3a05805..9add51136 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -368,7 +368,6 @@ { [[shuffleList objectAtIndex:i] setShuffleIndex:[NSNumber numberWithInt:i]]; } - } - (void)resetShuffleList diff --git a/Playlist/PlaylistHeaderView.m b/Playlist/PlaylistHeaderView.m index 5313c2736..5529dfa96 100644 --- a/Playlist/PlaylistHeaderView.m +++ b/Playlist/PlaylistHeaderView.m @@ -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; diff --git a/Plugins/CueSheet/CueSheet.m b/Plugins/CueSheet/CueSheet.m index 46628860e..54760d6e2 100644 --- a/Plugins/CueSheet/CueSheet.m +++ b/Plugins/CueSheet/CueSheet.m @@ -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"])