From 9ef99ac79f9bddae0a27f4b774424fe2f9185dd2 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Thu, 14 Aug 2014 12:38:21 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20the=20=E2=80=9CSame=20as=20source?= =?UTF-8?q?=E2=80=9D=20destination=20for=20mpeg4=20files=20with=20differen?= =?UTF-8?q?t=20file=20extensions=20and=20added=20a=20file=20type=20options?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Classes/SBQueueController.m | 5 +++ English.lproj/Queue.xib | 6 ++-- English.lproj/QueueOptions.xib | 62 ++++++++++++++++++++++++---------- 3 files changed, 52 insertions(+), 21 deletions(-) diff --git a/Classes/SBQueueController.m b/Classes/SBQueueController.m index a00f455..d178882 100755 --- a/Classes/SBQueueController.m +++ b/Classes/SBQueueController.m @@ -253,10 +253,15 @@ static void *SBQueueContex = &SBQueueContex; [item addAction:[[[SBQueueSetAction alloc] initWithSet:[self.options objectForKey:SBQueueSet]] autorelease]]; } + id type; + [url getResourceValue:&type forKey:NSURLTypeIdentifierKey error:NULL]; + NSURL *destination = [self.options objectForKey:SBQueueDestination]; if (destination) { destination = [[[destination URLByAppendingPathComponent:[url lastPathComponent]] URLByDeletingPathExtension] URLByAppendingPathExtension:[self.options objectForKey:SBQueueFileType]]; + } else if (UTTypeConformsTo((__bridge CFStringRef)type, (__bridge CFStringRef)@"public.mpeg-4")) { + destination = [[url copy] autorelease]; } else { destination = [[url URLByDeletingPathExtension] URLByAppendingPathExtension:[self.options objectForKey:SBQueueFileType]]; diff --git a/English.lproj/Queue.xib b/English.lproj/Queue.xib index d3059a4..9994d2a 100755 --- a/English.lproj/Queue.xib +++ b/English.lproj/Queue.xib @@ -1,5 +1,5 @@ - + @@ -208,10 +208,10 @@ - + - + diff --git a/English.lproj/QueueOptions.xib b/English.lproj/QueueOptions.xib index 43b0ed9..0a16496 100644 --- a/English.lproj/QueueOptions.xib +++ b/English.lproj/QueueOptions.xib @@ -1,5 +1,5 @@ - + @@ -14,7 +14,7 @@ - + - + @@ -116,7 +116,7 @@ - + @@ -124,8 +124,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -134,7 +160,7 @@ - + @@ -146,7 +172,7 @@ - + @@ -167,7 +193,7 @@ - + @@ -176,7 +202,7 @@ - + @@ -205,7 +231,7 @@ - + @@ -229,7 +255,7 @@ - + @@ -253,7 +279,7 @@ - + @@ -265,7 +291,7 @@ - + @@ -289,7 +315,7 @@ - + @@ -301,7 +327,7 @@ - +