You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
unidecode
This commit is contained in:
@@ -180,9 +180,6 @@ def process_for_rds(track_name: str):
|
|||||||
title = name
|
title = name
|
||||||
if not has_name: logger.warning(f"File does not have a alias in the name table ({track_name})")
|
if not has_name: logger.warning(f"File does not have a alias in the name table ({track_name})")
|
||||||
|
|
||||||
title = unidecode.unidecode(title)
|
|
||||||
artist = unidecode.unidecode(artist)
|
|
||||||
|
|
||||||
title = re.sub(r'\s*[\(\[][^\(\)\[\]]*[\)\]]', '', title) # there might be junk
|
title = re.sub(r'\s*[\(\[][^\(\)\[\]]*[\)\]]', '', title) # there might be junk
|
||||||
|
|
||||||
prt = rds_base.format(artist, title)
|
prt = rds_base.format(artist, title)
|
||||||
@@ -204,7 +201,7 @@ def update_rds(prt: str, rtp: str):
|
|||||||
|
|
||||||
def load_filelines(path):
|
def load_filelines(path):
|
||||||
try:
|
try:
|
||||||
with open(path, 'r') as f: return [line.strip() for line in f.readlines() if line.strip()]
|
with open(path, 'r') as f: return [unidecode.unidecode(line.strip()) for line in f.readlines() if unidecode.unidecode(line.strip())]
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.error(f"Playlist not found: {path}")
|
logger.error(f"Playlist not found: {path}")
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user