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;