0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-27 14:13:55 +01:00

more prefetching

This commit is contained in:
KubaPro010
2025-11-09 10:17:35 +01:00
parent 02810f1598
commit c4f146fcde

View File

@@ -197,6 +197,8 @@ def play_playlist(playlist_path: Path, starting_index: int = 0):
if extend: max_iterator += 1
else: extend = False
prefetch(track.path)
logger.info(f"Now playing: {track.path.name}")
for module in simple_modules: module.on_new_track(song_i, track, next_track)
@@ -208,6 +210,8 @@ def play_playlist(playlist_path: Path, starting_index: int = 0):
end_time = pr.started_at + ttw
if next_track: prefetch(next_track.path)
while end_time >= time.monotonic() and pr.process.poll() is None:
start = time.monotonic()