Skip to content

Commit 7c351e4

Browse files
committed
[bestsource] Add track language and title in the selection track menu
1 parent ba888ef commit 7c351e4

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/bestsource_common.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,18 @@ std::pair<TrackSelection, bool> SelectTrack(agi::fs::path const& filename, bool
5656

5757
if (info.MediaType == type) {
5858
TrackNumbers.push_back(i);
59-
Choices.Add(agi::wxformat(_("Track %02d: %s"), i, info.CodecString));
59+
std::map<std::string, std::string> metadata = tracklist.GetTrackMetadata(i);
60+
wxString description = agi::wxformat(_("Track %02d: %s"), i, info.CodecString);
61+
62+
if (metadata.count("language") > 0) {
63+
description += agi::wxformat(_(" - [%s]"), metadata["language"]);
64+
}
65+
66+
if (metadata.count("title") > 0) {
67+
description += agi::wxformat(_(" - %s"), metadata["title"]);
68+
}
69+
70+
Choices.Add(description);
6071
}
6172
}
6273

0 commit comments

Comments
 (0)