From ea6b9b422dfcf1c7816a8850ec548f404569d685 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Thu, 4 Dec 2014 11:23:29 +0100 Subject: [PATCH] Fixed chapters preview for file sent to queue. --- Classes/SBDocument.m | 2 +- Classes/SBQueueItem.m | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Classes/SBDocument.m b/Classes/SBDocument.m index 7e8086e..9c0ff4a 100755 --- a/Classes/SBDocument.m +++ b/Classes/SBDocument.m @@ -636,7 +636,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn [attributes setObject:@YES forKey:MP42GenerateChaptersPreviewTrack]; } - SBQueueItem *item = [SBQueueItem itemWithMP4:self.mp4 url:[panel URL] attributes:attributes]; + SBQueueItem *item = [SBQueueItem itemWithMP4:self.mp4 url:panel.URL attributes:attributes]; [queue addItem:item]; [attributes release]; diff --git a/Classes/SBQueueItem.m b/Classes/SBQueueItem.m index c99d459..f8cb212 100755 --- a/Classes/SBQueueItem.m +++ b/Classes/SBQueueItem.m @@ -83,6 +83,14 @@ _fileURL = [[NSURL fileURLWithPath:[MP4.URL path]] retain]; _destURL = [[NSURL fileURLWithPath:[MP4.URL path]] retain]; + + NSMutableDictionary *attributes = [NSMutableDictionary dictionary]; + + if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"chaptersPreviewTrack"] boolValue]) { + [attributes setObject:@YES forKey:MP42GenerateChaptersPreviewTrack]; + } + + _attributes = [attributes copy]; } return self;