GUI: mux: derive track languages from file names case insensitively

Fixes #3068.
This commit is contained in:
Moritz Bunkus 2021-03-13 00:12:02 +01:00
parent f51d56ae29
commit 4e717815c7
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,9 @@
* mkvinfo: when compiled with newer versions of the `fmt` library, certain
numbers were not output correctly (e.g. a track's audio sampling frequency
of 48000 might be output as 48).
* MKVToolNix GUI: multiplexer: deriving the track language from the file name
will match languages case insensitively again (like versions prior to
v55). Fixes #3068.
## Build system changes

View File

@ -356,8 +356,8 @@ SourceFile::setupProgramMapFromProperties() {
mtx::bcp47::language_c
SourceFile::deriveLanguageFromFileName() {
auto &cfg = Util::Settings::get();
auto fileName = QFileInfo{m_fileName}.fileName();
auto matches = QRegularExpression{Q("s\\d+e\\d{2,}(.+)"), QRegularExpression::CaseInsensitiveOption}.match(fileName);
auto fileName = QFileInfo{m_fileName}.fileName().toLower();
auto matches = QRegularExpression{Q("s\\d+e\\d{2,}(.+)")}.match(fileName);
if (matches.hasMatch()) {
fileName = matches.captured(1);