mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
86fabcd5e3
+ merge main.py and manage.py + move start logic to swingmusic/__main__.py + add a run.py on the project root
14 lines
290 B
Python
14 lines
290 B
Python
from dataclasses import asdict
|
|
from swingmusic.models.playlist import Playlist
|
|
|
|
|
|
def serialize_for_card(playlist: Playlist, to_remove=set()):
|
|
p_dict = asdict(playlist)
|
|
|
|
props = {"trackhashes"}.union(to_remove)
|
|
|
|
for key in props:
|
|
p_dict.pop(key, None)
|
|
|
|
return p_dict
|