2017-02-06 20:29:56 +01:00
|
|
|
#!/usr/bin/env python3
|
2018-03-06 23:02:11 +01:00
|
|
|
import os, shutil
|
2018-02-25 00:18:05 +01:00
|
|
|
import asyncio
|
|
|
|
import grzegorz
|
2018-03-06 23:02:11 +01:00
|
|
|
|
|
|
|
basedir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
if not os.path.exists(os.path.join(basedir, "config.py")):
|
|
|
|
print("copying default_config.py to config.py...")
|
|
|
|
shutil.copy(os.path.join(basedir, "default_config.py"), os.path.join(basedir, "config.py"))
|
2018-03-04 18:23:45 +01:00
|
|
|
import config
|
2018-02-25 00:18:05 +01:00
|
|
|
|
|
|
|
async def grzegorz_splash():
|
|
|
|
resp = await grzegorz.mpv_control.loadfile('grzegorz/grzegorz/res/logo.jpg')
|
|
|
|
#print(resp)
|
|
|
|
|
2018-03-04 18:23:45 +01:00
|
|
|
loop, app = grzegorz.make_sanic_app(
|
|
|
|
host = config.address,
|
|
|
|
port = config.port
|
|
|
|
)
|
2018-02-25 00:18:05 +01:00
|
|
|
asyncio.ensure_future(grzegorz_splash())
|
|
|
|
loop.run_forever()
|