Initialize controls in two parts
This gives us a chance to initialize random early, and then grab the audio functions later (when they exist)
This commit is contained in:
parent
d9a6c0987e
commit
6a5176d5d7
|
@ -33,24 +33,25 @@ def init():
|
|||
global init_pref
|
||||
global audio
|
||||
global lastfm
|
||||
global controls
|
||||
|
||||
prefs = trees.get_pref_tree("preferences")
|
||||
init_pref = prefs.init_pref
|
||||
import audio
|
||||
import controls
|
||||
from path import lastfm
|
||||
|
||||
controls.init()
|
||||
event.start("POSTINIT")
|
||||
|
||||
|
||||
def startup():
|
||||
global plugin
|
||||
global controls
|
||||
import plugin
|
||||
import controls
|
||||
|
||||
event.start("PRESTART")
|
||||
audio.init()
|
||||
controls.init()
|
||||
controls.init2()
|
||||
plugin.load_all()
|
||||
event.start("POSTSTART")
|
||||
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
# Bryan Schumaker (11/23/2010)
|
||||
|
||||
libsaria = None
|
||||
|
||||
audio = None
|
||||
call = None
|
||||
invite = None
|
||||
prefs = None
|
||||
|
||||
def init():
|
||||
global libsaria
|
||||
import libsaria
|
||||
libsaria.init_pref("libsaria.random", False)
|
||||
|
||||
def init2():
|
||||
global call
|
||||
global audio
|
||||
global invite
|
||||
global prefs
|
||||
|
||||
import libsaria
|
||||
call = libsaria.event.call
|
||||
invite = libsaria.event.invite
|
||||
prefs = libsaria.prefs
|
||||
|
||||
from audio import audio
|
||||
from libsaria.audio import audio
|
||||
invite("PREEOS", pause)
|
||||
libsaria.init_pref("libsaria.random", False)
|
||||
|
||||
def play():
|
||||
return call("PLAY", audio.play)
|
||||
|
|
Loading…
Reference in New Issue