You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
how about this?
This commit is contained in:
@@ -214,13 +214,14 @@ def draw_interface(audio_files: list, playlists: dict, selected_idx: int, curren
|
|||||||
category_bar += f"{category[:4].capitalize()}: {percent:.1f}% (P:{polskie_percent:.1f}%) | "
|
category_bar += f"{category[:4].capitalize()}: {percent:.1f}% (P:{polskie_percent:.1f}%) | "
|
||||||
category_bar += f"TP:{total_pl:0.1f}% | "
|
category_bar += f"TP:{total_pl:0.1f}% | "
|
||||||
|
|
||||||
unassigned = len(audio_files)
|
assigned = 0
|
||||||
categories = ['late_night', 'morning', 'day', 'night']
|
categories = ['late_night', 'morning', 'day', 'night']
|
||||||
for category in categories:
|
for category in categories:
|
||||||
for day in get_days_of_week():
|
for day in get_days_of_week():
|
||||||
for file in playlists[day][category]:
|
for file in playlists[day][category]:
|
||||||
unassigned -= 1
|
assigned += 1
|
||||||
unassigned = (unassigned / len(audio_files))*100
|
assigned /= len(get_days_of_week())
|
||||||
|
unassigned = ((len(audio_files)-assigned) / len(audio_files))*100
|
||||||
category_bar += f"UA:{unassigned:0.1f}%"
|
category_bar += f"UA:{unassigned:0.1f}%"
|
||||||
|
|
||||||
if len(category_bar) > term_width - 2:
|
if len(category_bar) > term_width - 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user