You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
right
This commit is contained in:
@@ -249,7 +249,8 @@ class RadioPlayer:
|
|||||||
extend = False
|
extend = False
|
||||||
return track, next_track, extend
|
return track, next_track, extend
|
||||||
|
|
||||||
while i < max_iterator:
|
def check_conditions():
|
||||||
|
nonlocal return_pending
|
||||||
if self.exit_pending:
|
if self.exit_pending:
|
||||||
self.logger.info("Quit received, waiting for song end.")
|
self.logger.info("Quit received, waiting for song end.")
|
||||||
self.procman.wait_all()
|
self.procman.wait_all()
|
||||||
@@ -257,11 +258,14 @@ class RadioPlayer:
|
|||||||
elif return_pending:
|
elif return_pending:
|
||||||
self.logger.info("Return reached, next song will reload the playlist.")
|
self.logger.info("Return reached, next song will reload the playlist.")
|
||||||
self.procman.wait_all()
|
self.procman.wait_all()
|
||||||
return
|
return True
|
||||||
if self.playlist_advisor and self.playlist_advisor.new_playlist():
|
if self.playlist_advisor and self.playlist_advisor.new_playlist():
|
||||||
self.logger.info("Reloading now...")
|
self.logger.info("Reloading now...")
|
||||||
return_pending = True
|
return True
|
||||||
continue
|
return False
|
||||||
|
|
||||||
|
while i < max_iterator:
|
||||||
|
if check_conditions(): return
|
||||||
|
|
||||||
if not track: track, next_track, extend = get_track()
|
if not track: track, next_track, extend = get_track()
|
||||||
|
|
||||||
@@ -284,6 +288,7 @@ class RadioPlayer:
|
|||||||
i += 1
|
i += 1
|
||||||
if not extend: song_i += 1
|
if not extend: song_i += 1
|
||||||
|
|
||||||
|
if check_conditions(): return
|
||||||
track, next_track, extend = get_track()
|
track, next_track, extend = get_track()
|
||||||
prefetch(track.path)
|
prefetch(track.path)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user