import http_handler import server import api.globalvars import plugin import util import urls import api.url gdb = importlib.import_module("gdb") gdb.execute("set non-stop off") gdb.execute("set pagination off") api.globalvars.init() settings.init() plugin.init() plugin.load_all() all_urls = urls.urls for _plugin_name, _plugin in plugin.plugins.items(): for _url_name, _url in _plugin.urls.items(): all_urls[_url_name] = _url http_handler.url = api.url.URL(all_urls) httpServer = http_server.GDBFrontendHTTPServer( (config.BIND_ADDRESS, config.HTTP_PORT), http_handler.RequestHandler )
if key == 'q': break elif key == '1': hw.press_usb_key('next') elif key == '2': hw.press_usb_key('prev') elif key == '3': hw.press_usb_key('play') elif key == '4': hw.press_usb_key('pause') else: print('wrong input') time.sleep(2) hw.init(script_path, '8081', '', True) while True: os.system("clear") print('Please select test') print('1 : Test I2S input switch') print('2 : Test audio output') print('3 : Test volume adjustment') print('4 : Toggle screen') print('5 : Test USB key') print('q : Quit') key = input() if key == 'q': break elif key == '1': test_input() elif key == '2':
_version = '' try: try: import freevo.version as version import freevo.revision as revision except ImportError: import version import revision _version = '%s' % version.__version__ _version = _version.replace('-svn', ' r%s' % revision.__revision__) except ImportError: pass # Fire up splashscreen and load the plugins splash = Splashscreen(_('Starting Freevo-%s, please wait ...') % _version) skin.register('splashscreen', ('screen', splash)) plugin.init(splash.progress) skin.delete('splashscreen') # Fire up splashscreen and load the cache if config.MEDIAINFO_USE_MEMORY == 2: import util.mediainfo splash = Splashscreen(_('Reading cache, please wait ...')) skin.register('splashscreen', ('screen', splash)) cachefiles = [] for type in ('video', 'audio', 'image', 'games'): if plugin.is_active(type): n = 'config.%s_ITEMS' % type.upper() x = eval(n) for item in x:
kaa.main.signals['exception'].connect(exception_handler) # load the fxditem to make sure it's the first in the # mimetypes list import fxditem # load all plugins import plugin # prepare the skin skin.prepare() # Fire up splashscreen and load the plugins splash = Splashscreen(_('Starting Freevo-%s, please wait ...') % version.version) skin.register('splashscreen', ('screen', splash)) plugin.init(splash.progress) dialog.init() skin.delete('splashscreen') # Fire up splashscreen and load the cache if config.MEDIAINFO_USE_MEMORY == 2: import util.mediainfo splash = Splashscreen(_('Reading cache, please wait ...')) skin.register('splashscreen', ('screen', splash)) cachefiles = [] for type in ('video', 'audio', 'image', 'games'): if plugin.is_active(type): n = 'config.%s_ITEMS' % type.upper() x = eval(n)