Pause after in local variable
The pause after current track plugin should store its variables in something local to the plugin and not in the libsaria.vars map.
This commit is contained in:
parent
6124296f70
commit
edd5d2b39b
|
@ -2,21 +2,19 @@
|
|||
|
||||
import ocarina
|
||||
libsaria = ocarina.libsaria
|
||||
vars = ocarina.libsaria.vars
|
||||
menu = ocarina.menu
|
||||
do_pause = False
|
||||
|
||||
def check_pause(*args):
|
||||
if vars["PAUSEAFTER"] == True:
|
||||
if do_pause == True:
|
||||
libsaria.audio.pause()
|
||||
vars["PAUSEAFTER"] = False
|
||||
do_pause = False
|
||||
|
||||
def set_pause(*args):
|
||||
vars["PAUSEAFTER"] = True
|
||||
do_pause = True
|
||||
|
||||
def start():
|
||||
text = "Pause after current song"
|
||||
libsaria.init_var("PAUSEAFTER", False)
|
||||
|
||||
menu.add_common_menu_item(text, set_pause)
|
||||
libsaria.event.invite("POSTNEXT", check_pause)
|
||||
|
||||
|
|
Loading…
Reference in New Issue