You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
advisor-less mode
This commit is contained in:
@@ -125,7 +125,7 @@ class ActiveModifier(BaseIMCModule):
|
||||
Called at start up with the program arguments
|
||||
"""
|
||||
pass
|
||||
def play(self, index: int, track: Track, next_track: Track | None) -> tuple[tuple[Track, None] | tuple[Track, Track], bool] | tuple[tuple[None, None], None]:
|
||||
def play(self, index: int, track: Track | None, next_track: Track | None) -> tuple[tuple[Track | None, Track | None], bool | None]:
|
||||
"""
|
||||
Returns a tuple, in the first case where a is the track and b is a bool, b corresponds to whether to extend the playlist, set to true when adding content instead of replacing it
|
||||
When None, None is returned then that is treated as a skip, meaning the core will skip this song
|
||||
|
||||
@@ -26,7 +26,10 @@ class Module(ActiveModifier):
|
||||
self.limit_tracks = not bool(self.limit_tracks)
|
||||
if self.limit_tracks: logger.info("Skipping tracks if they bleed into other times.")
|
||||
self.can_limit_tracks = self.limit_tracks
|
||||
def play(self, index: int, track: Track, next_track: Track | None):
|
||||
def play(self, index: int, track: Track | None, next_track: Track | None):
|
||||
if not track:
|
||||
raise NotImplementedError("This active modifer does not support advisor-less mode")
|
||||
|
||||
if not self.playlist: return (track, next_track), False
|
||||
|
||||
with self.file_lock:
|
||||
|
||||
@@ -12,4 +12,5 @@ Each module shall have a python script in the modules directory. Each of the mod
|
||||
- advisor ('PlaylistAdvisor')
|
||||
- activemod ('ActiveModifier')
|
||||
|
||||
NEW! The procman communicator allows you to get the track duration, but also STOP WHATEVER IS PLAYING! That means we can skip tracks WHILE THEY ARE PLAYING
|
||||
NEW! The procman communicator allows you to get the track duration, but also STOP WHATEVER IS PLAYING! That means we can skip tracks WHILE THEY ARE PLAYING
|
||||
Newer! You can run advisor-less, this however also remvoes the usage of any and all playlist modifiers, because there is no playlist in such case
|
||||
Reference in New Issue
Block a user