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

top 100 lol

This commit is contained in:
2025-12-23 22:37:22 +01:00
parent c0aa1c8346
commit b40d96f5ce

View File

@@ -41,8 +41,10 @@ class PopularitySorterModule(PlaylistModifierModule):
sorted_by_play_count = sorted(play_counts.items(), key=lambda item: item[1], reverse=True)
top_paths = {path for path, count in sorted_by_play_count[:10]}
least_top_paths = {path for path, count in sorted_by_play_count[-10:]}
SORT_LEN = 100
if len(playlist) >= SORT_LEN:
top_paths = {path for path, count in sorted_by_play_count[:SORT_LEN]}
least_top_paths = {path for path, count in sorted_by_play_count[-SORT_LEN:]}
for a,b in zip(top_paths, least_top_paths):
a_track = b_track = None
a_i = b_i = 0