diff options
author | ritsuka <[email protected]> | 2014-08-22 17:52:41 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-22 17:52:41 +0000 |
commit | 7e22c9f782914792c38323081844f972fcdf63a7 (patch) | |
tree | 94ea1bc0ec2e4170c2d2a22d136f754dde342e2f | |
parent | f2cd123b342a1bfe45000fddee9fe58e78f8b8c9 (diff) |
MacGui: fixed auto naming for dvd sources.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6346 b64f7644-9d1e-0410-96f1-a4d463321fa5
-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 |