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

check for refresh before new song

This commit is contained in:
Kuba
2025-10-24 22:20:18 +02:00
parent 170f38bcb8
commit b2cda9cb05

View File

@@ -200,6 +200,11 @@ def play_playlist(playlist_path):
procman.wait_all()
return
if playlist_advisor.new_playlist():
logger.info("Reloading now...")
return_pending = True
continue
old_track_tuple = playlist[song_i % len(playlist)]
if active_modifier:
track_tuple, extend = active_modifier.play(song_i, old_track_tuple)
@@ -215,13 +220,6 @@ def play_playlist(playlist_path):
track_path = os.path.abspath(os.path.expanduser(track))
track_name = os.path.basename(track_path)
refresh = playlist_advisor.new_playlist()
if refresh == True:
logger.info("Reloading now...")
return_pending = True
continue
for module in simple_modules: module.on_new_track(song_i, track_path, to_fade_in, to_fade_out, official)
logger.info(f"Now playing: {track_name}")