aboutsummaryrefslogtreecommitdiffstats
path: root/settings.py
blob: 68f25d684c5d37e274cc0e84a228fc5f5e43a0a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
default_settings = '''route_tor = False
port_number = 80
allow_foreign_addresses = False

# 0 - off by default
# 1 - only manually created subtitles on by default
# 2 - enable even if automatically generated is all that's available
subtitles_mode = 0

# ISO 639 language code: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
subtitles_language = "en"
'''
exec(default_settings)
try:
    with open('settings.txt', 'r', encoding='utf-8') as file:
        exec(file.read())
except FileNotFoundError:
    with open('settings.txt', 'a', encoding='utf-8') as file:
        file.write(default_settings)