aboutsummaryrefslogtreecommitdiffstats
path: root/settings.py
blob: 391dd4dc44d6a6dd7bb0e436c7a9b29d7f30c731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"

enable_related_videos = True
enable_comments = True
enable_comment_avatars = True
'''
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)