-
Notifications
You must be signed in to change notification settings - Fork 0
/
BMBFConfig.py
42 lines (34 loc) · 1.33 KB
/
BMBFConfig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from BMBFPlaylists import BMBFPlaylists
class BMBFConfig(object):
def __init__(self, playlists, saber, left_color, right_color, text_changes):
self.playlists = playlists
self.saber = saber
self.left_color = left_color
self.right_color = right_color
self.text_changes = text_changes
@classmethod
def load(cls, data):
return cls(
BMBFPlaylists.load(data['Playlists']),
data['Saber'],
data['LeftColor'],
data['RightColor'],
data['TextChanges'],
)
@classmethod
def dump(cls, data):
return {
'Playlists': BMBFPlaylists.dump(data.playlists),
'Saber': data.saber,
'LeftColor': data.left_color,
'RightColor': data.right_color,
'TextChanges': data.text_changes,
}
def get_song_authors(self, playlist_filter):
return self.playlists.get_song_authors(playlist_filter)
def get_playlists(self):
return self.playlists.get_playlists()
def get_new_playlists(self, new_pre_defined_playlists, new_playlists, cover_image):
self.playlists = self.playlists.get_new_playlists(new_pre_defined_playlists, new_playlists, cover_image)
def get_songs(self, playlist_filter):
return self.playlists.get_songs(playlist_filter)