Rendering code refactor

This commit is contained in:
marc
2025-04-26 19:09:59 +02:00
parent 7a823a98ab
commit d132e6fd60
33 changed files with 638 additions and 188 deletions

View File

@@ -3,8 +3,8 @@ from collections.abc import Iterable
from typing import TypedDict
from folkugat_web.dal.sql import Connection, get_connection
from folkugat_web.model import lilypond as lilypond_model
from folkugat_web.model import temes as model
from folkugat_web.model.lilypond.processing import RenderError
ScoreRowTuple = tuple[int, int, str, str, str, str | None, str | None, bool]
@@ -40,7 +40,7 @@ def row_to_score(row: ScoreRowTuple) -> model.Score:
tema_id=row[1],
title=row[2],
source=row[3],
errors=list(map(lilypond_model.RenderError.from_dict, errors_dicts)),
errors=list(map(RenderError.from_dict, errors_dicts)),
img_url=row[5],
pdf_url=row[6],
hidden=bool(row[7]),