From bd22891d633e16d7aedddadd2e4dd716f615d847 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 10 Mar 2017 12:56:55 -0700 Subject: subtitles: simplify and shorten subtitle descriptions (#591) * subtitles: simplify and shorten subtitle descriptions Generally, it eliminates parens to make things more readable. I.e. it turns this: English (Closed Caption)(Wide Screen)(Bitmap)(VOBSUB) Into this: English, Closed Caption [Wide Screen, VOBSUB] * Revise punctuation per BradleyS request * fix subtitle description formatting * incorporate suggestions from PR --- macosx/HBSubtitles.m | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'macosx/HBSubtitles.m') diff --git a/macosx/HBSubtitles.m b/macosx/HBSubtitles.m index 7a0ca3828..a45643c32 100644 --- a/macosx/HBSubtitles.m +++ b/macosx/HBSubtitles.m @@ -60,31 +60,10 @@ extern NSString *keySubTrackSrtFileURLBookmark; NSMutableArray *sourceTracks = [job.title.subtitlesTracks mutableCopy]; - NSMutableSet *forcedSourceNamesArray = [NSMutableSet set]; int foreignAudioType = VOBSUB; - for (NSDictionary *dict in _sourceTracks) - { - enum subsource source = [dict[keySubTrackType] intValue]; - NSString *name = @(hb_subsource_name(source)); - // if the subtitle track can be forced, add its source name to the array - if (hb_subtitle_can_force(source) && name.length) - { - [forcedSourceNamesArray addObject:name]; - } - } // now set the name of the Foreign Audio Search track - NSMutableString *foreignAudioSearchTrackName = [@"Foreign Audio Search (Bitmap)" mutableCopy]; - if (forcedSourceNamesArray.count) - { - [foreignAudioSearchTrackName appendFormat:@" ("]; - for (NSString *name in forcedSourceNamesArray) - { - [foreignAudioSearchTrackName appendFormat:@"%@, ", name]; - } - [foreignAudioSearchTrackName deleteCharactersInRange:NSMakeRange(foreignAudioSearchTrackName.length - 2, 2)]; - [foreignAudioSearchTrackName appendFormat:@")"]; - } + NSMutableString *foreignAudioSearchTrackName = [@"Foreign Audio Search" mutableCopy]; // Add the none and foreign track to the source array NSDictionary *none = @{ keySubTrackName: NSLocalizedString(@"None", nil)}; -- cgit v1.2.3