]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Ignore empty video URLs.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:37:20 +0000 (15:37 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:37:20 +0000 (15:37 +0200)
bots/sledrun_wikitext_to_json.py

index ba898e9ad711d63ff7e21bc54cb4c0e3b6137c98..3bc293e9f4c965ea1475fd2fbd181b62ed5cdca1 100644 (file)
@@ -226,7 +226,7 @@ class SledrunWikiTextToJsonBot(
             bb = next(bb_iter, None)
             if bb is not None:
                 video = bb.get('video', None)
             bb = next(bb_iter, None)
             if bb is not None:
                 video = bb.get('video', None)
-                if isinstance(video, Parameter):
+                if isinstance(video, Parameter) and video.value != "":
                     sledrun_json['videos'] = [{'url': str(video.value)}]
         _button_bar()
 
                     sledrun_json['videos'] = [{'url': str(video.value)}]
         _button_bar()