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