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

Merged
merged 12 commits into from
Feb 3, 2025

Conversation

C0rn3j
Copy link
Collaborator

@C0rn3j C0rn3j commented Jan 29, 2025

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

# From
radio_playlists: list[dict[str, int | str | list[dict[str, str]]]]
# To
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?

@C0rn3j C0rn3j marked this pull request as ready for review January 29, 2025 18:44
@Taiko2k Taiko2k merged commit 5536d7b into Taiko2k:master Feb 3, 2025
3 of 4 checks passed
@C0rn3j C0rn3j deleted the radio_refactorv2 branch February 3, 2025 22:22
C0rn3j added a commit to C0rn3j/Tauon that referenced this pull request Feb 7, 2025
* Radio changes WIP

* Fix ups to get it running

* Add migrations

* Convert more code

* Fix broken buttons

* Do not wipe website URL if stream URL hasn't changed

* Handle radio websocket better

* Fix indent

* Add the default station fallback URL back

* Fix up adding radio and m3u radio

* Fix if

* Fix comma
C0rn3j added a commit to C0rn3j/Tauon that referenced this pull request Feb 8, 2025
Somewhat arrange to current upstream state

Small Prefs fix up

Bootstrap: Use dataclass

t_main reworks

Move classes on top of main

More reworking

GuiVar: Remove duplicated macOS detection

More rework

More rework, create class Formats, remove global formats

Fix colon convention

Remove empty rework file

More refactoring

Add more typing

More rework

Remove old comment

Refactor

Refactor fixups

Moar refactor

Refactor class Tauon

Fix up asset_loader()

Moar refactor

More reworks

Remove doubled ctypes import

More refactor

Further refactor and add accidentally deleted classes back

Premove touchups

Add Bag to Tauon and continue refactoring

pctl reworks

Move some things around and rename devance func to "previous"

further reworks

Further reworks

Further reworks

More refactoring, convert Prefs to a dataclass, to be merged with Bag

Small refactor

Small refactor + adapt some upstream changes

fix lastfm url

Start using classes for Radio playlists and stations (Taiko2k#1422)

* Radio changes WIP

* Fix ups to get it running

* Add migrations

* Convert more code

* Fix broken buttons

* Do not wipe website URL if stream URL hasn't changed

* Handle radio websocket better

* Fix indent

* Add the default station fallback URL back

* Fix up adding radio and m3u radio

* Fix if

* Fix comma

Fix merge issues

Start up more refactors

Further reworks and global eliminations

More reworks

More reworks, just kill me already

Theme refactor

Shoot me noooow, this is a call for heeeelp

MORE REWORKS

Probably enough for today

More input refactors

Fix get_track_in_playlist()

Stash some more reworks

Further refactors

Simplify Menu

Moar Reeefactor

More refactor
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.

2 participants