PLUGIN: Pause after current song
This plugin will wait for the NEXT event, and then check if playback should be paused.
This commit is contained in:
parent
76eaa3eb16
commit
81277d83b8
|
@ -0,0 +1,25 @@
|
||||||
|
# Bryan Schumaker (10/30/2010)
|
||||||
|
|
||||||
|
import ocarina
|
||||||
|
libsaria = ocarina.libsaria
|
||||||
|
vars = ocarina.libsaria.vars
|
||||||
|
menu = ocarina.menu
|
||||||
|
|
||||||
|
def check_pause(*args):
|
||||||
|
if vars["PAUSEAFTER"] == True:
|
||||||
|
libsaria.music.pause()
|
||||||
|
vars["PAUSEAFTER"] = False
|
||||||
|
|
||||||
|
def set_pause(*args):
|
||||||
|
vars["PAUSEAFTER"] = True
|
||||||
|
|
||||||
|
def start():
|
||||||
|
text = "Pause after current song"
|
||||||
|
libsaria.init_var("PAUSEAFTER", False)
|
||||||
|
|
||||||
|
menu.add_lib_menu_item(text, set_pause)
|
||||||
|
menu.add_plist_menu_item(text, set_pause)
|
||||||
|
libsaria.event.invite("POSTNEXT", check_pause)
|
||||||
|
|
||||||
|
def stop():
|
||||||
|
pass
|
Loading…
Reference in New Issue