From f9f0891f6c9a779f9cc145c7936d3a06bccd873c Mon Sep 17 00:00:00 2001 From: vasfed Date: Sun, 18 May 2008 08:04:46 +0000 Subject: [PATCH] Fixed a bug in APL plugin with image files containing # in name --- Playlist/PlaylistController.m | 2 ++ Plugins/APL/APLDecoder.m | 8 -------- Plugins/APL/APLFile.h | 7 ------- Plugins/APL/APLFile.m | 30 ++++-------------------------- Plugins/APL/APLMetadataReader.h | 7 ------- Plugins/APL/ApeTag.h | 8 -------- Plugins/APL/ApeTag.mm | 7 ------- 7 files changed, 6 insertions(+), 63 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index 8546d9842..84e98c4e9 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -755,6 +755,7 @@ bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0); + modifier1_pressed |= ((mods & kCGEventFlagMaskShift)!=0); bool should_clean = false; if (src >= OpenFinder_Related && src <= OpenFinder_Related_end) @@ -775,6 +776,7 @@ CFRelease(event); bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0); + modifier1_pressed |= ((mods & kCGEventFlagMaskShift)!=0); bool should_autoplay = false; if (src >= OpenFinder_Related && src <= OpenFinder_Related_end) diff --git a/Plugins/APL/APLDecoder.m b/Plugins/APL/APLDecoder.m index 97e7b7a94..5b5982a53 100644 --- a/Plugins/APL/APLDecoder.m +++ b/Plugins/APL/APLDecoder.m @@ -1,11 +1,3 @@ -// -// CueSheetDecoder.m -// CueSheet -// -// Created by Zaphod Beeblebrox on 10/8/07. -// Copyright 2007 __MyCompanyName__. All rights reserved. -// - #import "APLDecoder.h" #import "APLFile.h" diff --git a/Plugins/APL/APLFile.h b/Plugins/APL/APLFile.h index e2316a02f..e466b05ab 100644 --- a/Plugins/APL/APLFile.h +++ b/Plugins/APL/APLFile.h @@ -1,10 +1,3 @@ -// -// APLFile.h -// APL -// -// Created by ??????? ???????? on 10/18/07. -// Copyright 2007 __MyCompanyName__. All rights reserved. -// #import diff --git a/Plugins/APL/APLFile.m b/Plugins/APL/APLFile.m index 68eb60e37..33c5a9d90 100644 --- a/Plugins/APL/APLFile.m +++ b/Plugins/APL/APLFile.m @@ -1,10 +1,4 @@ -// -// APLFile.m -// APL -// -// Created by ??????? ???????? on 10/18/07. -// Copyright 2007 __MyCompanyName__. All rights reserved. -// + #import "APLFile.h" #import "ApeTag.h" @@ -33,33 +27,17 @@ { NSRange protocolRange = [path rangeOfString:@"://"]; if (protocolRange.location != NSNotFound) - { return [NSURL URLWithString:path]; - } NSMutableString *unixPath = [path mutableCopy]; - - NSString *fragment = @""; - NSRange fragmentRange = [path rangeOfString:@"#"]; - if (fragmentRange.location != NSNotFound) - { - fragmentRange = NSMakeRange(fragmentRange.location, [unixPath length] - fragmentRange.location); - - fragment = [unixPath substringWithRange:fragmentRange]; - [unixPath deleteCharactersInRange:fragmentRange]; - } - if (![unixPath hasPrefix:@"/"]) { //Only relative paths would have windows backslashes. [unixPath replaceOccurrencesOfString:@"\\" withString:@"/" options:0 range:NSMakeRange(0, [unixPath length])]; NSString *basePath = [[[baseFilename stringByStandardizingPath] stringByDeletingLastPathComponent] stringByAppendingString:@"/"]; - [unixPath insertString:basePath atIndex:0]; - } - - //Append the fragment - return [NSURL URLWithString:[[[NSURL fileURLWithPath:unixPath] absoluteString] stringByAppendingString: fragment]]; + } + return [NSURL URLWithString:[[NSURL fileURLWithPath:unixPath] absoluteString]]; } -initWithFile:(NSString*)filename { @@ -100,7 +78,7 @@ { [file release]; file = [self urlForPath:value relativeTo:filename]; - //NSLog(@"APL refers to file '%@'", file); + NSLog(@"APL refers to file '%@' read '%@'", file, value); continue; } if (![field compare:@"Start Block" options:NSCaseInsensitiveSearch]) diff --git a/Plugins/APL/APLMetadataReader.h b/Plugins/APL/APLMetadataReader.h index 2fd8b0e89..071ea84cb 100644 --- a/Plugins/APL/APLMetadataReader.h +++ b/Plugins/APL/APLMetadataReader.h @@ -1,10 +1,3 @@ -// -// CueSheetMetadataReader.h -// CueSheet -// -// Created by Vincent Spader on 10/12/07. -// Copyright 2007 __MyCompanyName__. All rights reserved. -// #import diff --git a/Plugins/APL/ApeTag.h b/Plugins/APL/ApeTag.h index 27ea57ec4..f9a1a3d6e 100644 --- a/Plugins/APL/ApeTag.h +++ b/Plugins/APL/ApeTag.h @@ -1,11 +1,3 @@ -// -// ApeTag.h -// MacApl -// -// Created by ??????? ???????? on 10/15/07. -// Copyright 2007 Vasfed. All rights reserved. -// - #import //not full support!! and even may have not enougth checks to find a non-supported data! diff --git a/Plugins/APL/ApeTag.mm b/Plugins/APL/ApeTag.mm index a760fdfa7..1dd253d39 100644 --- a/Plugins/APL/ApeTag.mm +++ b/Plugins/APL/ApeTag.mm @@ -1,10 +1,3 @@ -// -// ApeTag.mm -// MacApl -// -// Created by ??????? ???????? on 10/15/07. -// Copyright 2007 __MyCompanyName__. All rights reserved. -// // as simple as it can be - just write a readable tag, no options etc.