diff options
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r-- | macosx/Controller.m | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index afd2e2b34..68b25b6ca 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -4197,8 +4197,20 @@ fWorkingCount = 0; hb_title_t *title = (hb_title_t *) hb_list_item(list, (int)[fSrcTitlePopUp indexOfSelectedItem]); + NSString *sourceName = nil; + // Get the file name + if ((title->type == HB_STREAM_TYPE || title->type == HB_FF_STREAM_TYPE) && + hb_list_count( list ) > 1 ) + { + sourceName = @(title->name); + } + else + { + sourceName = [browsedSourceDisplayName stringByDeletingPathExtension]; + } + // Generate a new file name - NSString *fileName = [HBUtilities automaticNameForSource:@(title->name) + NSString *fileName = [HBUtilities automaticNameForSource:sourceName title:title->index chapters:NSMakeRange([fSrcChapterStartPopUp indexOfSelectedItem] + 1, [fSrcChapterEndPopUp indexOfSelectedItem] + 1) quality:fVideoController.qualityType ? fVideoController.selectedQuality : 0 |