mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 06:59:11 +00:00
Fixed execution problem
Fixed an execution problem where the 2x executable path is not as the first argument resulting in an error.
This commit is contained in:
parent
7fd8228a1b
commit
1364ed507a
@ -61,18 +61,14 @@ class Waifu2xCaffe:
|
||||
# list to be executed
|
||||
execute = []
|
||||
|
||||
execute.append(self.waifu2x_settings['waifu2x_caffe_path'])
|
||||
for key in self.waifu2x_settings.keys():
|
||||
|
||||
value = self.waifu2x_settings[key]
|
||||
|
||||
# the key doesn't need to be passed in this case
|
||||
if key == 'waifu2x_caffe_path':
|
||||
execute.append(str(value))
|
||||
|
||||
# null or None means that leave this option out (keep default)
|
||||
elif value is None or value is False:
|
||||
#is executable key or null or None means that leave this option out (keep default)
|
||||
if key == 'waifu2x_caffe_path' or value is None or value is False:
|
||||
continue
|
||||
|
||||
else:
|
||||
if len(key) == 1:
|
||||
execute.append('-{}'.format(key))
|
||||
|
Loading…
Reference in New Issue
Block a user