Skip to content

Commit

Permalink
[bestsource] Add track language and title in the selection track menu
Browse files Browse the repository at this point in the history
  • Loading branch information
moi15moi committed Dec 5, 2024
1 parent ab3c2f8 commit 6ed57a0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/bestsource_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,18 @@ std::pair<TrackSelection, bool> SelectTrack(agi::fs::path const& filename, bool

if (info.MediaType == type) {
TrackNumbers.push_back(i);
Choices.Add(agi::wxformat(_("Track %02d: %s"), i, info.CodecString));
std::map<std::string, std::string> metadata = tracklist.GetTrackMetadata(i);
wxString description = agi::wxformat(_("Track %02d: %s"), i, info.CodecString);

if (metadata.count("language") > 0) {
description += agi::wxformat(_(" - [%s]"), metadata["language"]);
}

if (metadata.count("title") > 0) {
description += agi::wxformat(_(" - %s"), metadata["title"]);
}

Choices.Add(description);
}
}

Expand Down

0 comments on commit 6ed57a0

Please sign in to comment.