Browse Source

fix: syncplay server errors

pull/2/head
Dnomd343 1 year ago
parent
commit
a15ba943da
  1. 2
      Dockerfile
  2. 4
      boot.py

2
Dockerfile

@ -10,6 +10,8 @@ RUN cat /dev/null > requirements_gui.txt
RUN SNAPCRAFT_PART_BUILD=1 pip wheel --wheel-dir /wheels/ ./ RUN SNAPCRAFT_PART_BUILD=1 pip wheel --wheel-dir /wheels/ ./
FROM ${PYTHON} AS syncplay FROM ${PYTHON} AS syncplay
WORKDIR /wheels/
RUN pip wheel PyYaml
COPY --from=builder /wheels/ /wheels/ COPY --from=builder /wheels/ /wheels/
WORKDIR /release/local/lib/ WORKDIR /release/local/lib/
RUN mkdir $(basename /usr/local/lib/python3.*/) && cd ./python3.*/ && \ RUN mkdir $(basename /usr/local/lib/python3.*/) && cd ./python3.*/ && \

4
boot.py

@ -23,7 +23,7 @@ def temp_file(file: str, content: str) -> str:
""" Create and save content to temporary files. """ """ Create and save content to temporary files. """
file = os.path.join('/tmp/', file) file = os.path.join('/tmp/', file)
with open(file, 'w') as fp: with open(file, 'w') as fp:
fp.write(f'{content}\n') fp.write(content)
return file return file
@ -67,7 +67,7 @@ def load_config(args: dict[str, Any], file: str) -> dict[str, Any]:
def build_args(opts: dict): def build_args(opts: dict):
""" Construct the startup arguments for syncplay server. """ """ Construct the startup arguments for syncplay server. """
args = ['--port', opts.get('port', '8999')] args = ['--port', str(opts.get('port', 8999))]
if 'password' in opts: if 'password' in opts:
args += ['--password', opts['password']] args += ['--password', opts['password']]
if 'motd' in opts: if 'motd' in opts:

Loading…
Cancel
Save