From 8fa1773807f44094520d330a619565a6139ea243 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sat, 24 Dec 2022 19:44:44 +0300 Subject: [PATCH] mpv player can count playlist itself --- src/fw_radios.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fw_radios.py b/src/fw_radios.py index 6e6dc48..d925f6e 100644 --- a/src/fw_radios.py +++ b/src/fw_radios.py @@ -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()