Fixed bug
After adding "__comment" to the backgrounds.json file code crashed because it treated "__comment" as one of the backgrounds.
This commit is contained in:
1 parent
a6324af2e0
commit
b92386629a
1 file changed
+6
-1
@@ -18,7 +18,12 @@ with open("utils/backgrounds.json") as json_file:
|
||||
|
||||
# Add position lambda function
|
||||
# (https://zulko.github.io/moviepy/ref/VideoClip/VideoClip.html#moviepy.video.VideoClip.VideoClip.set_position)
|
||||
for name in list(background_options.keys()):
|
||||
backgrounds = list(background_options.keys())
|
||||
|
||||
if "__comment" in backgrounds:
|
||||
backgrounds.remove("__comment")
|
||||
|
||||
for name in backgrounds:
|
||||
pos = background_options[name][3]
|
||||
|
||||
if pos != "center":
|
||||
|
||||
Reference in new issue
Block a user