2010-08-07 12:55:23 -04:00
|
|
|
# Bryan Schumaker (8/7/2010)
|
|
|
|
|
2011-01-22 11:19:18 -05:00
|
|
|
__major__ = 4
|
2011-04-28 07:50:33 -04:00
|
|
|
__minor__ = 5
|
2011-05-07 15:56:47 -04:00
|
|
|
__bug__ = 1
|
2011-05-06 22:21:20 -04:00
|
|
|
__dev__ = False
|
2010-12-05 12:54:32 -05:00
|
|
|
|
2011-01-22 11:19:18 -05:00
|
|
|
__vstr__ = "%s.%s" % (__major__, __minor__)
|
2010-12-05 12:54:32 -05:00
|
|
|
if __bug__ > 0:
|
2011-01-22 11:19:18 -05:00
|
|
|
__vstr__ = "%s.%s" % (__vstr__, __bug__)
|
2010-11-06 13:36:03 -04:00
|
|
|
if __dev__ == True:
|
2011-01-22 11:19:18 -05:00
|
|
|
__vstr__ += "-dev"
|
|
|
|
__vers__ = "Libsaria %s" % __vstr__
|
2010-10-23 20:17:25 -04:00
|
|
|
|
2011-04-28 08:27:51 -04:00
|
|
|
import prefs
|
2011-04-30 12:06:48 -04:00
|
|
|
import audio
|
2010-08-07 12:55:23 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
import path
|
|
|
|
from path.cache import Cache
|
2010-08-07 12:55:23 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
# The cache is also saved across sessions
|
|
|
|
cache = Cache()
|
2010-08-15 13:39:31 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
#plugin = None
|
|
|
|
lastfm = None
|
|
|
|
controls = None
|
2010-11-15 08:17:31 -05:00
|
|
|
|
2010-08-07 19:39:46 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
# Initialize helpful variables
|
|
|
|
def init():
|
|
|
|
global lastfm
|
|
|
|
global controls
|
2010-10-20 20:04:23 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
import controls
|
|
|
|
import sources
|
|
|
|
from path import lastfm
|
2010-10-20 20:04:23 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
sources.library.init_bg()
|
|
|
|
sources.playlist.init_bg()
|
|
|
|
sources.queue.init_bg()
|
|
|
|
controls.init()
|
2010-08-13 23:58:19 -04:00
|
|
|
|
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
def startup():
|
|
|
|
# global plugin
|
|
|
|
# import plugin
|
2010-08-30 17:57:08 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
controls.init2()
|
|
|
|
# plugin.load_all()
|
|
|
|
prefs.enable_save()
|
2011-05-01 10:02:34 -04:00
|
|
|
parse_user_input()
|
2011-04-30 10:48:59 -04:00
|
|
|
sources.playlist.startup()
|
2010-08-15 13:39:31 -04:00
|
|
|
|
2010-11-14 17:32:09 -05:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
def shutdown():
|
2011-04-30 12:57:10 -04:00
|
|
|
audio.shutdown()
|
2011-04-28 08:27:51 -04:00
|
|
|
## import plugin
|
|
|
|
## plugin.quit()
|
2010-11-27 22:22:44 -05:00
|
|
|
|
2011-04-28 08:27:51 -04:00
|
|
|
|
2011-04-30 10:48:59 -04:00
|
|
|
def parse_user_input():
|
|
|
|
import sys
|
|
|
|
for item in sys.argv[1:]:
|
|
|
|
path.files.universal_open(item)
|
|
|
|
init()
|