def load_selitems(loader: LoadScreen): """Load the selector items early, to correspond with the loadscreen order.""" for item in Music.all(): SEL_ITEMS[item.id] = SelItem.from_data( item.id, item.selitem_data, item.get_attrs() ) loader.step('IMG')
def for_channel(channel: MusicChannel) -> List[SelItem]: """Get the items needed for a specific channel.""" music_list = [] for music in Music.all(): if music.provides_channel(channel): selitem = SEL_ITEMS[music.id].copy() selitem.snd_sample = music.get_sample(channel) music_list.append(selitem) return music_list