Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using classes for Radio playlists and stations #1422

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

C0rn3j
Copy link
Collaborator

@C0rn3j C0rn3j commented Jan 29, 2025

Radio playlists used multinested list of dictionaries, converted it to classes instead.

radio_playlists: list[dict[str, int | str | list[dict[str, str]]]]

radio_playlists: list[RadioPlaylist] 
  • Exit if we fail to run migrations
  • Requires a database bump (now 70)
  • Corrects typing for RadioPlaylist variable in db_migrations
  • Fixes gensokyoradio.net fallback URL (I thought I did that ages ago??)
  • Stop setting scroll == 0 on Stations, it was there in one place in the code, makes no sense to me and seems like a mistake, should be set on Playlist instead?

TODO:

  • Editing seems to lose site URL - not fault of this PR, it gets nulled on edit by design for some reason - at least added a check there even though there's no way to set site URL manually, we should probably expose all parameters in a later PR
  • Needs testing

@C0rn3j C0rn3j marked this pull request as ready for review January 29, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant