LAMEXP_MAKE_ID(dropBoxWidgetEnabled, "Flags/EnableDropBoxWidget");
LAMEXP_MAKE_ID(shellIntegrationEnabled, "Flags/EnableShellIntegration");
LAMEXP_MAKE_ID(currentLanguage, "Localization/Language");
+LAMEXP_MAKE_ID(currentLanguageFile, "Localization/UseQMFile");
LAMEXP_MAKE_ID(lameAlgoQuality, "AdvancedOptions/LAME/AlgorithmQuality");
LAMEXP_MAKE_ID(lameChannelMode, "AdvancedOptions/LAME/ChannelMode");
LAMEXP_MAKE_ID(forceStereoDownmix, "AdvancedOptions/StereoDownmix/Force");
LAMEXP_MAKE_ID(opusOptimizeFor, "AdvancedOptions/Opus/OptimizeForSignalType");
LAMEXP_MAKE_ID(opusComplexity, "AdvancedOptions/Opus/EncodingComplexity");
LAMEXP_MAKE_ID(opusFramesize, "AdvancedOptions/Opus/FrameSize");
-LAMEXP_MAKE_ID(opusExpAnalysis, "AdvancedOptions/Opus/EnableExpAnalysis");
LAMEXP_MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
LAMEXP_MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
LAMEXP_MAKE_ID(normalizationFilterEqualizationMode, "AdvancedOptions/VolumeNormalization/EqualizationMode");
LAMEXP_MAKE_ID(customParametersAacEnc, "AdvancedOptions/CustomParameters/AacEnc");
LAMEXP_MAKE_ID(customParametersAften, "AdvancedOptions/CustomParameters/Aften");
LAMEXP_MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
+LAMEXP_MAKE_ID(customParametersOpus, "AdvancedOptions/CustomParameters/OpusEnc");
LAMEXP_MAKE_ID(renameOutputFilesEnabled, "AdvancedOptions/RenameOutputFiles/Enabled");
LAMEXP_MAKE_ID(renameOutputFilesPattern, "AdvancedOptions/RenameOutputFiles/Pattern");
+LAMEXP_MAKE_ID(overwriteMode, "AdvancedOptions/OverwriteMode");
LAMEXP_MAKE_ID(hibernateComputer, "AdvancedOptions/HibernateComputerOnShutdown");
LAMEXP_MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
LAMEXP_MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
this->outputDir(musicLocation.isEmpty() ? QDesktopServices::storageLocation(QDesktopServices::HomeLocation) : musicLocation);
}
+ if(!this->currentLanguageFile().isEmpty())
+ {
+ const QString qmPath = QFileInfo(this->currentLanguageFile()).canonicalFilePath();
+ if(qmPath.isEmpty() || (!(QFileInfo(qmPath).exists() && QFileInfo(qmPath).isFile() && (QFileInfo(qmPath).suffix().compare("qm", Qt::CaseInsensitive) == 0))))
+ {
+ qWarning("Current language file missing, reverting to built-in translator!");
+ this->currentLanguageFile(QString());
+ }
+ }
+
if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive))
{
qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
this->hibernateComputer(false);
}
}
+
+ if(this->overwriteMode() < SettingsModel::Overwrite_KeepBoth || this->overwriteMode() > SettingsModel::Overwrite_Replaces)
+ {
+ this->overwriteMode(SettingsModel::Overwrite_KeepBoth);
+ }
+
+}
+
+void SettingsModel::syncNow(void)
+{
+ m_settings->sync();
}
////////////////////////////////////////////////////////////
LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled, true)
LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_portable_mode())
LAMEXP_MAKE_OPTION_S(currentLanguage, defaultLanguage())
+LAMEXP_MAKE_OPTION_S(currentLanguageFile, QString())
LAMEXP_MAKE_OPTION_I(lameAlgoQuality, 3)
LAMEXP_MAKE_OPTION_I(lameChannelMode, 0)
LAMEXP_MAKE_OPTION_B(forceStereoDownmix, false)
LAMEXP_MAKE_OPTION_I(opusOptimizeFor, 0);
LAMEXP_MAKE_OPTION_I(opusComplexity, 10);
LAMEXP_MAKE_OPTION_I(opusFramesize, 3);
-LAMEXP_MAKE_OPTION_B(opusExpAnalysis, true);
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled, false)
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume, -50)
LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode, 0);
LAMEXP_MAKE_OPTION_S(customParametersAacEnc, QString());
LAMEXP_MAKE_OPTION_S(customParametersAften, QString());
LAMEXP_MAKE_OPTION_S(customParametersFLAC, QString());
+LAMEXP_MAKE_OPTION_S(customParametersOpus, QString());
LAMEXP_MAKE_OPTION_B(renameOutputFilesEnabled, false);
LAMEXP_MAKE_OPTION_S(renameOutputFilesPattern, "[<TrackNo>] <Artist> - <Title>");
+LAMEXP_MAKE_OPTION_I(overwriteMode, Overwrite_KeepBoth);
LAMEXP_MAKE_OPTION_U(metaInfoPosition, UINT_MAX);
LAMEXP_MAKE_OPTION_U(maximumInstances, 0);
LAMEXP_MAKE_OPTION_S(customTempPath, QDesktopServices::storageLocation(QDesktopServices::TempLocation));