I now always call the shutdown() function to close the server. This function checks if the server pointer has been set, and if it has it calls the server's shutdown() function.
38 lines
500 B
Python
38 lines
500 B
Python
# Bryan Schumaker (8/7/2010)
|
|
|
|
import version
|
|
import prefs
|
|
import audio
|
|
import path
|
|
|
|
import sources
|
|
import controls
|
|
|
|
if version.__dev__ == True:
|
|
import server
|
|
|
|
from path import lastfm
|
|
#plugin = None
|
|
|
|
|
|
def startup():
|
|
# global plugin
|
|
# import plugin
|
|
|
|
# plugin.load_all()
|
|
prefs.enable_save()
|
|
parse_user_input()
|
|
|
|
|
|
def shutdown():
|
|
audio.shutdown()
|
|
server.shutdown()
|
|
## import plugin
|
|
## plugin.quit()
|
|
|
|
|
|
def parse_user_input():
|
|
import sys
|
|
for item in sys.argv[1:]:
|
|
path.files.universal_open(item)
|