mpv player can count playlist itself

This commit is contained in:
localhost_frssoft 2022-12-24 19:44:44 +03:00
parent 39f23c3135
commit 8fa1773807

View file

@ -123,8 +123,7 @@ def radio_load(id_radio=None, type_radio='custom', name=None, related_object=Non
select = fzf.prompt(player_items_menu,
f"--header=\'Radio {name} playing...\'")[0]
if select == 'Next':
playlist_remaining = len(
player.playlist) - player.playlist_current_pos
playlist_remaining = player.playlist_count - player.playlist_current_pos
if playlist_remaining <= 2:
threading.Thread(target=radio_get_track, args=(
radio_session_id,), daemon=True).start()