Nova pàgina de llistes
This commit is contained in:
@@ -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]),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user