55 lines
789 B
Python
55 lines
789 B
Python
# Bryan Schumaker (8/7/2010)
|
|
|
|
import version
|
|
import prefs
|
|
import audio
|
|
|
|
import path
|
|
from path.cache import Cache
|
|
|
|
# The cache is also saved across sessions
|
|
cache = Cache()
|
|
|
|
#plugin = None
|
|
lastfm = None
|
|
controls = None
|
|
|
|
|
|
# Initialize helpful variables
|
|
def init():
|
|
global lastfm
|
|
global controls
|
|
|
|
import controls
|
|
import sources
|
|
from path import lastfm
|
|
|
|
sources.library.init_bg()
|
|
sources.playlist.init_bg()
|
|
sources.queue.init_bg()
|
|
controls.init()
|
|
|
|
|
|
def startup():
|
|
# global plugin
|
|
# import plugin
|
|
|
|
controls.init2()
|
|
# plugin.load_all()
|
|
prefs.enable_save()
|
|
parse_user_input()
|
|
sources.playlist.startup()
|
|
|
|
|
|
def shutdown():
|
|
audio.shutdown()
|
|
## import plugin
|
|
## plugin.quit()
|
|
|
|
|
|
def parse_user_input():
|
|
import sys
|
|
for item in sys.argv[1:]:
|
|
path.files.universal_open(item)
|
|
init()
|