From: Antonio Ospite Date: Fri, 15 Jan 2016 19:15:40 +0000 (+0100) Subject: smooth-dl.py: support using a local path for the Manifest file X-Git-Url: https://git.ao2.it/smooth-dl.git/commitdiff_plain/ec7067e85004c582a0e77c4c55fd9ce24c4bfdfb smooth-dl.py: support using a local path for the Manifest file --- diff --git a/smooth-dl.py b/smooth-dl.py index 44ef722..39785a4 100755 --- a/smooth-dl.py +++ b/smooth-dl.py @@ -118,11 +118,11 @@ def get_manifest(url, dest_dir): if not manifest_url.lower().endswith(('/manifest', '.ismc', '.csm')): manifest_url += '/Manifest' - if manifest_url.startswith('http://'): + if os.path.exists(url): + local_manifest_path = url + else: local_manifest_path = os.path.join(dest_dir, 'Manifest') download_file(manifest_url, local_manifest_path, "w") - else: - local_manifest_path = url manifest = etree.parse(local_manifest_path)