mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-11-11 22:53:51 -05:00
Fix track info with new format
This commit is contained in:
@@ -41,7 +41,7 @@ def draw_svg(track: dict, progress: int, model_id: str) -> str | None:
|
||||
if progress is not None:
|
||||
svg_content = decrypt_svg_content(svg_content)
|
||||
paths = svg_content.split("L")
|
||||
total = track.get("reduced_svg_content", {}).get(model_id, len(paths))
|
||||
total = track.get("reduced_svg_content_new", 0) or len(paths)
|
||||
percent = min((100 * progress) / total, 100)
|
||||
progress = math.floor((percent / 100) * (len(paths) - 1))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user