diff options
author | John Stebbins <[email protected]> | 2017-03-10 12:56:55 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2017-03-10 12:56:55 -0700 |
commit | bd22891d633e16d7aedddadd2e4dd716f615d847 (patch) | |
tree | 4194d0fd483759f8e8f5226ac479e5ad193a9ef9 /macosx/HBSubtitles.m | |
parent | 1f6c91c00be0f8f47de1d5c77b945ad6ecd50ec5 (diff) |
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
Diffstat (limited to 'macosx/HBSubtitles.m')
-rw-r--r-- | macosx/HBSubtitles.m | 23 |
1 files changed, 1 insertions, 22 deletions
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<NSString *> *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)}; |