ocarina/libsaria/__init__.py

62 lines
938 B
Python

# Bryan Schumaker (8/7/2010)
__all__ = [ "audio", "sources",
"data", "event", "map", "path", "plugin"]
__major__ = 1
__minor__ = 2
__dev__ = True
__vers__ = "Libsaria %s.%s" % (__major__, __minor__)
if __dev__ == True:
__vers__ += "-dev"
import event
import path
from trees import Tree, PersPrefTree
from cache import Cache
# The cache is also saved across sessions
prefs = None
cache = Cache()
plugin = None
audio = None
lastfm = None
init_pref = None
# Initialize helpful variables
def init():
global prefs
global init_pref
global audio
global lastfm
prefs = trees.get_pref_tree("preferences")
init_pref = prefs.init_pref
import audio
import lastfm
event.start("POSTINIT")
def startup():
global plugin
import plugin
event.start("PRESTART")
audio.init()
plugin.load_all()
event.start("POSTSTART")
def shutdown():
event.start("PREQUIT")
import plugin
plugin.quit()
event.start("POSTQUIT")
init()