cdosea-play/cdoseaplay/config.py

17 lines
425 B
Python

import os
import json
base = 'https://cdosea.0x2620.org/static/render/'
lang = '1080p'
start = ''
conf = os.path.expanduser('~/.config/cdosea.json')
if os.path.exists(conf):
with open(conf) as fd:
config = json.load(fd)
if 'lang' in config:
lang = config['lang']
if 'base' in config:
base = config['base']
if 'start' in config:
start = config['start']