From 7e0337f8a65f68e0a526fad61655aabaf395ad1b Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Thu, 19 Nov 2020 11:52:53 -0500 Subject: [PATCH] Davinci Resolve beta updates --- scripts/installers/blackmagic-parser.py | 9 ++++++++- scripts/installers/resolve-install.sh | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/installers/blackmagic-parser.py b/scripts/installers/blackmagic-parser.py index baa9da1..595c4eb 100644 --- a/scripts/installers/blackmagic-parser.py +++ b/scripts/installers/blackmagic-parser.py @@ -1,5 +1,6 @@ import json import os +import re import urllib.request # getJSONData returns JSON data from Blackmagic Design's website. @@ -31,7 +32,13 @@ def getURLId(url): # getURLVersion() returns the url version number. def getURLVersion(url): - return '{}.{}.{}'.format(url['major'], url['minor'], url['releaseNum']) + if 'Beta' in url['downloadTitle']: + beta = re.search('Beta \d+', url['downloadTitle']) + if beta: + beta = re.search('\d+', beta.group()).group() + else: + beta = '99' + return '{}.{}.{}.{}'.format(url['major'], url['minor'], url['releaseNum'], beta) # getDownloadId() returns downlaod id hash. def getDownloadId(download): diff --git a/scripts/installers/resolve-install.sh b/scripts/installers/resolve-install.sh index 2182e4d..01aee6f 100644 --- a/scripts/installers/resolve-install.sh +++ b/scripts/installers/resolve-install.sh @@ -52,9 +52,6 @@ zipUrl="$(curl \ --compressed \ "$downloadUrl")" -echo $url -exit - # Setting up and downloading package downloadPackage resolve $zipUrl $packageName