aboutsummaryrefslogtreecommitdiff
path: root/music_sampler/actions/unload_music.py
blob: b3de316debc1850bfd882366d7f8723b1a52f398 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
def run(action, music=None, **kwargs):
    for music in action.music_list(music):
        if music.is_unloadable():
            music.unload()

def description(action, music=None, **kwargs):
    if music is not None:
        return "unload music « {} » from memory".format(music.name)
    else:
        return "unload all music from memory"