Skip to content

Commit

Permalink
MacGui: show the tracks titles on the popup menu to make it easier to…
Browse files Browse the repository at this point in the history
… find the right track.
  • Loading branch information
galad87 committed Aug 17, 2023
1 parent b356ed1 commit 8bdc834
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 8 additions & 1 deletion macosx/HBAudio.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ - (HBTitleAudioTrack *)sourceTrackAtIndex:(NSUInteger)idx

for (HBTitleAudioTrack *track in self.sourceTracks)
{
[sourceNames addObject:track.displayName];
if (track.title.length)
{
[sourceNames addObject:[NSString stringWithFormat:@"%@ - %@", track.displayName, track.title]];
}
else
{
[sourceNames addObject:track.displayName];
}
}

return sourceNames;
Expand Down
2 changes: 1 addition & 1 deletion macosx/HBJob+UIAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ - (NSString *)audioShortDescription
{
if (audioTrack.isEnabled)
{
[info appendFormat: @"%lu: ", (unsigned long)audioTrack.sourceTrackIdx];
[info appendFormat: @"%lu: ", (unsigned long)audioTrack.sourceTrackIdx - 1];
const char *encoder = hb_audio_encoder_get_name(audioTrack.encoder);
if (encoder)
{
Expand Down
9 changes: 8 additions & 1 deletion macosx/HBSubtitles.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ - (HBTitleSubtitlesTrack *)sourceTrackAtIndex:(NSUInteger)idx

for (HBTitleSubtitlesTrack *track in self.sourceTracks)
{
[sourceNames addObject:track.displayName];
if (track.title.length)
{
[sourceNames addObject:[NSString stringWithFormat:@"%@ - %@", track.displayName, track.title]];
}
else
{
[sourceNames addObject:track.displayName];
}
}

return sourceNames;
Expand Down

0 comments on commit 8bdc834

Please sign in to comment.