whitelist is more sensible here than blacklist

This commit is contained in:
tassaron 2017-06-25 16:13:54 -04:00
parent f86c33d0e5
commit f284acbf19
1 changed files with 7 additions and 14 deletions

View File

@ -380,19 +380,12 @@ class Core():
def createProjectFile(self, filepath, window=None):
'''Create a project file (.avp) using the current program state'''
forbiddenSettingsKeys = [
'currentProject',
'outputAudioBitrate',
'outputAudioCodec',
'outputContainer',
'outputFormat',
'outputFrameRate',
'outputHeight',
'outputPreset',
'outputVideoBitrate',
'outputVideoCodec',
'outputVideoFormat',
'outputWidth',
settingsKeys = [
'componentDir',
'inputDir',
'outputDir',
'presetDir',
'projectDir',
]
try:
if not filepath.endswith(".avp"):
@ -411,7 +404,7 @@ class Core():
f.write('\n[Settings]\n')
for key in self.settings.allKeys():
if key not in forbiddenSettingsKeys:
if key in settingsKeys:
f.write('%s=%s\n' % (key, self.settings.value(key)))
if window: