Fix regex for krpano numeric indices

This commit is contained in:
Kumi 2023-10-21 09:21:14 +02:00
parent af314b7511
commit e4f2a2a13b
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -130,15 +130,14 @@ def krpano_make_tiles(url):
try: try:
if re.search(r"\_[frblud].jpg", parts[-1]): if re.search(r"\_[frblud].jpg", parts[-1]):
return krpano_export_simple(url) return krpano_export_simple(url)
elif re.search(r"\d.jpg", parts[-1]): elif re.search(r"^\d.jpg", parts[-1]):
return krpano_export_simple(url, "012345") return krpano_export_simple(url, "012345")
else: else:
schema = krpano_normalize(url) schema = krpano_normalize(url)
images = krpano_export(schema) images = krpano_export(schema)
return multistitch(images) return multistitch(images)
except: except Exception as e:
raise
raise ValueError("%s does not seem to be a valid krpano URL." % url) raise ValueError("%s does not seem to be a valid krpano URL." % url)