You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
actual fix
This commit is contained in:
@@ -39,9 +39,9 @@ class Module(ActiveModifier):
|
|||||||
|
|
||||||
logger.info(f"Playing {song} instead, as instructed by toplay")
|
logger.info(f"Playing {song} instead, as instructed by toplay")
|
||||||
|
|
||||||
return (song, last_track_to_fade_out, next_track_to_fade_in, True, {}), True
|
return song, last_track_to_fade_out, next_track_to_fade_in, True, {}
|
||||||
elif len(self.originals):
|
elif len(self.originals):
|
||||||
return self.originals.pop(0), False
|
return self.originals.pop(0)
|
||||||
return track
|
return track
|
||||||
|
|
||||||
activemod = Module()
|
activemod = Module()
|
||||||
@@ -35,7 +35,7 @@ class ActiveModifier:
|
|||||||
"""
|
"""
|
||||||
This changes the next song to be played live, which means that this picks the next song, not the playlist, but this is affected by the playlist
|
This changes the next song to be played live, which means that this picks the next song, not the playlist, but this is affected by the playlist
|
||||||
"""
|
"""
|
||||||
def play(self, index:int, track: tuple[str, bool, bool, bool, dict[str, str]]): return track, False
|
def play(self, index:int, track: tuple[str, bool, bool, bool, dict[str, str]]): return track
|
||||||
def on_new_playlist(self, playlist: list[tuple[str, bool, bool, bool, dict[str, str]]]): pass
|
def on_new_playlist(self, playlist: list[tuple[str, bool, bool, bool, dict[str, str]]]): pass
|
||||||
|
|
||||||
simple_modules: list[PlayerModule] = []
|
simple_modules: list[PlayerModule] = []
|
||||||
@@ -227,11 +227,13 @@ def play_playlist(playlist_path):
|
|||||||
procman.wait_all()
|
procman.wait_all()
|
||||||
return
|
return
|
||||||
|
|
||||||
track_tuple = playlist[i]
|
old_track_tuple = playlist[i]
|
||||||
if active_modifier:
|
if active_modifier:
|
||||||
track_tuple, to_max = active_modifier.play(i, track_tuple)
|
track_tuple = active_modifier.play(i, old_track_tuple)
|
||||||
modified = True
|
modified = True
|
||||||
if to_max: max_iterator += 1
|
if old_track_tuple != track_tuple:
|
||||||
|
max_iterator += 1
|
||||||
|
modified = True
|
||||||
else: modified = False
|
else: modified = False
|
||||||
track, to_fade_in, to_fade_out, official, args = track_tuple
|
track, to_fade_in, to_fade_out, official, args = track_tuple
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user