Nova pàgina de llistes

This commit is contained in:
marc
2025-12-21 17:09:59 +01:00
parent ac79785cf0
commit fdcda1b566
37 changed files with 323 additions and 33 deletions

View File

@@ -2,7 +2,7 @@ from typing import TypedDict
from folkugat_web.model import playlists as model
PlaylistRowTuple = tuple[int, str | None]
PlaylistRowTuple = tuple[int, str | None, int]
PlaylistEntryRowTuple = tuple[int, int, int, int | None]
@@ -29,3 +29,12 @@ def row_to_playlist_entry(row: PlaylistEntryRowTuple) -> model.PlaylistEntry:
set_id=row[2],
tema_id=row[3],
)
def row_to_playlist(row: PlaylistRowTuple) -> model.Playlist:
return model.Playlist(
id=row[0],
name=row[1],
sets=[], # Empty for list view
hidden=bool(row[2]),
)