mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
GUI: mux: derive track languages from file names case insensitively
Fixes #3068.
This commit is contained in:
parent
f51d56ae29
commit
4e717815c7
3
NEWS.md
3
NEWS.md
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user