aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex <alexta69@gmail.com>2019-12-06 14:16:19 +0200
committerAlex <alexta69@gmail.com>2019-12-06 14:37:08 +0200
commit91cee0339a8b41014fc69a994e7eb719ad029d3a (patch)
tree256ba10d705eb2cb24c0914e5c84b13d797e334d /app
parentupdate README with full screenshot URL (diff)
downloadmetube-91cee0339a8b41014fc69a994e7eb719ad029d3a.tar.gz
metube-91cee0339a8b41014fc69a994e7eb719ad029d3a.tar.bz2
metube-91cee0339a8b41014fc69a994e7eb719ad029d3a.zip
fix broken PREFIX_URL feature
Diffstat (limited to 'app')
-rw-r--r--app/main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/main.py b/app/main.py
index 7031055..8489e4f 100644
--- a/app/main.py
+++ b/app/main.py
@@ -22,6 +22,8 @@ class Config:
def __init__(self):
for k, v in self._DEFAULTS.items():
setattr(self, k, os.environ[k] if k in os.environ else v)
+ if not self.URL_PREFIX.endswith('/'):
+ self.URL_PREFIX += '/'
config = Config()
@@ -35,10 +37,8 @@ class ObjectSerializer(json.JSONEncoder):
serializer = ObjectSerializer()
app = web.Application()
sio = socketio.AsyncServer()
-sio.attach(app)
+sio.attach(app, socketio_path=config.URL_PREFIX + 'socket.io')
routes = web.RouteTableDef()
-if not config.URL_PREFIX.endswith('/'):
- config.URL_PREFIX += '/'
class Notifier(DownloadQueueNotifier):
async def added(self, dl):
bgstack15