GUI: prefs: don't include ISO 639-3-only languages for deriving track languages by default

Part of the fix of #3047.
This commit is contained in:
Moritz Bunkus 2021-03-03 13:07:30 +01:00
parent e66860cafe
commit 446c93b790
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View File

@ -475,7 +475,8 @@ Settings::setDefaults(std::optional<QVariant> enableMuxingTracksByTheseTypes) {
if (m_recognizedTrackLanguagesInFileNames.isEmpty())
for (auto const &language : mtx::iso639::g_languages)
m_recognizedTrackLanguagesInFileNames << Q(language.alpha_3_code);
if (!language.alpha_2_code.empty())
m_recognizedTrackLanguagesInFileNames << Q(language.alpha_3_code);
if (m_regexForDerivingTrackLanguagesFromFileNames.isEmpty())
m_regexForDerivingTrackLanguagesFromFileNames = mtx::gui::Merge::SourceFile::defaultRegexForDerivingLanguageFromFileName();