After adding "__comment" to the backgrounds.json file code crashed because it treated "__comment" as one of the backgrounds.
pull/1158/head
RiveN 2 years ago committed by GitHub
parent a6324af2e0
commit b92386629a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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":

Loading…
Cancel
Save