From a33e47d205f040c268d435ba2dd7b075aa752fa3 Mon Sep 17 00:00:00 2001 From: benex Date: Sat, 23 Nov 2024 14:08:48 +0300 Subject: [PATCH] fix(config): use separate var for the config file val --- fastanime/cli/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fastanime/cli/config.py b/fastanime/cli/config.py index 32bdd68..b9e19d5 100644 --- a/fastanime/cli/config.py +++ b/fastanime/cli/config.py @@ -129,9 +129,10 @@ class Config(object): self.notification_duration = self.configparser.getint( "general", "notification_duration" ) - max_cache_lifetime = list( - map(int, self.configparser.get("general", "max_cache_lifetime").split(":")) + self._max_cache_lifetime = self.configparser.get( + "general", "max_cache_lifetime" ) + max_cache_lifetime = list(map(int, self._max_cache_lifetime.split(":"))) self.max_cache_lifetime = ( max_cache_lifetime[0] * 86400 + max_cache_lifetime[1] * 3600 @@ -408,7 +409,7 @@ cache_requests = {self.cache_requests} # the max lifetime for a cached request # defaults to 3days = 03:00:00 # this is the time after which a cached request will be deleted (technically : ) -max_cache_lifetime = {self.max_cache_lifetime} +max_cache_lifetime = {self._max_cache_lifetime} # whether to use a persistent store (basically a sqlitedb) for storing some data the provider requires # to enable a seamless experience [true/false]