0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 13:52:00 +01:00

massive clean ups (i wonder if it starts)

This commit is contained in:
Kuba
2025-10-31 18:04:37 +01:00
parent 2247e7996c
commit 1f4a184418
8 changed files with 130 additions and 84 deletions

View File

@@ -1,4 +1,4 @@
from . import PlayerModule, log95
from . import PlayerModule, log95, Track
import socket, re, os
DEBUG = False
@@ -72,9 +72,9 @@ def update_rds(track_name: str):
return prt, ','.join(list(map(str, rtp)))
class Module(PlayerModule):
def on_new_track(self, index: int, track: str, to_fade_in: bool, to_fade_out: bool, official: bool):
if official:
rds_rt, rds_rtp = update_rds(os.path.basename(track))
def on_new_track(self, index: int, track: Track):
if track.official:
rds_rt, rds_rtp = update_rds(os.path.basename(track.path))
logger.info(f"RT set to '{rds_rt}'")
logger.debug(f"{rds_rtp=}")