mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-07-30 07:49:18 +02:00
modularize playlist change
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import random
|
||||
|
||||
class PlaylistModifierModule:
|
||||
def modify(self, global_args: dict, playlist: list[tuple[str, bool, bool, bool, dict]]):
|
||||
return playlist
|
||||
|
||||
class Module(PlaylistModifierModule):
|
||||
def modify(self, global_args: dict, playlist: list[tuple[str, bool, bool, bool, dict]]):
|
||||
if int(global_args.get("no_shuffle", 0)) == 0:
|
||||
random.shuffle(playlist)
|
||||
return playlist
|
||||
|
||||
playlistmod = (Module(), 0)
|
||||
Reference in New Issue
Block a user