增加大内存模式

This commit is contained in:
jxxghp
2023-07-21 23:19:11 +08:00
parent 37a1222ea5
commit 89a9bba909
7 changed files with 30 additions and 5 deletions

View File

@ -152,6 +152,8 @@ class Settings(BaseSettings):
"/Season {{season}}" \
"/{{title}} - {{season_episode}}{% if part %}-{{part}}{% endif %}{% if episode %} - 第 {{episode}} 集{% endif %}" \
"{{fileExt}}"
# 大内存模式
BIG_MEMORY_MODE: bool = False
@property
def INNER_CONFIG_PATH(self):
@ -179,6 +181,24 @@ class Settings(BaseSettings):
def LOG_PATH(self):
return self.CONFIG_PATH / "logs"
@property
def CACHE_CONF(self):
if self.BIG_MEMORY_MODE:
return {
"tmdb": 1024,
"torrents": 200,
"douban": 512,
"fanart": 512,
"meta": 15 * 24 * 3600
}
return {
"tmdb": 256,
"torrents": 100,
"douban": 256,
"fanart": 128,
"meta": 7 * 24 * 3600
}
@property
def PROXY(self):
if self.PROXY_HOST: