Skip to content

Commit

Permalink
Fix broken buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Jan 29, 2025
1 parent 2d4cc53 commit 5c5003e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/tauon/t_modules/t_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37278,19 +37278,19 @@ def line_render(n_track: TrackClass, p_track: TrackClass, y, this_line_playing,
# return "website_url" in prefs.radio_urls[p] and prefs.radio_urls[p].["website_url"]

def visit_radio_site_deco(station: RadioStation):
if station.website_url is not None:
if station.website_url:
return [colours.menu_text, colours.menu_background, None]
return [colours.menu_text_disabled, colours.menu_background, None]

def visit_radio_station_site_deco(station: RadioStation):
return visit_radio_site_deco(station.stream_url)
def visit_radio_station_site_deco(item: tuple[int, RadioStation]):
return visit_radio_site_deco(item[1])

def visit_radio_site(station: RadioStation):
if station.website_url is not None:
if station.website_url:
webbrowser.open(station.website_url, new=2, autoraise=True)

def visit_radio_station(station: RadioStation):
visit_radio_site(station.stream_url)
def visit_radio_station(item: tuple[int, RadioStation]):
visit_radio_site(item[1])

def radio_saved_panel_test(_):
return radiobox.tab == 0
Expand Down Expand Up @@ -37567,7 +37567,7 @@ def add_station():
radiobox.station_editing = None
radiobox.center = True

def rename_station(station: list[RadioStation]):
def rename_station(item: tuple[int, RadioStation]):
station = item[1]
radiobox.active = True
radiobox.center = False
Expand All @@ -37577,8 +37577,8 @@ def rename_station(station: list[RadioStation]):
radiobox.radio_field_title.text = station.title if station.title is not None else ""
radiobox.station_editing = station

def remove_station(stations: list[RadioStation]):
index = station[0]
def remove_station(item: tuple[int, RadioStation]):
index = item[0]
del pctl.radio_playlists[pctl.radio_playlist_viewing].stations[index]

def dismiss_dl():
Expand Down

0 comments on commit 5c5003e

Please sign in to comment.