Skip to content

Commit

Permalink
Fixed cache_retention granularity.
Browse files Browse the repository at this point in the history
* Should be cast to int, as we want to step by day, not tenth of day.
  • Loading branch information
p0psicles committed May 30, 2016
1 parent 733051b commit 1c36464
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sickbeard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def path_leaf(path):

CACHE_TRIMMING = bool(check_setting_int(CFG, 'General', 'cache_trimming', 0))

MAX_CACHE_AGE = check_setting_float(CFG, 'General', 'max_cache_age', 30.0)
MAX_CACHE_AGE = check_setting_int(CFG, 'General', 'max_cache_age', 30)

AUTOPOSTPROCESSOR_FREQUENCY = check_setting_int(CFG, 'General', 'autopostprocessor_frequency',
DEFAULT_AUTOPOSTPROCESSOR_FREQUENCY)
Expand Down Expand Up @@ -1747,7 +1747,7 @@ def save_config(): # pylint: disable=too-many-statements, too-many-branches
new_config['General']['torrent_method'] = TORRENT_METHOD
new_config['General']['usenet_retention'] = int(USENET_RETENTION)
new_config['General']['cache_trimming'] = int(CACHE_TRIMMING)
new_config['General']['max_cache_age'] = float(MAX_CACHE_AGE)
new_config['General']['max_cache_age'] = int(MAX_CACHE_AGE)
new_config['General']['autopostprocessor_frequency'] = int(AUTOPOSTPROCESSOR_FREQUENCY)
new_config['General']['dailysearch_frequency'] = int(DAILYSEARCH_FREQUENCY)
new_config['General']['backlog_frequency'] = int(BACKLOG_FREQUENCY)
Expand Down
2 changes: 1 addition & 1 deletion sickbeard/server/web/config/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None, sab_usernam
sickbeard.BACKLOG_DAYS = try_int(backlog_days, 7)

sickbeard.CACHE_TRIMMING = config.checkbox_to_value(cache_trimming)
sickbeard.MAX_CACHE_AGE = float(max_cache_age)
sickbeard.MAX_CACHE_AGE = try_int(max_cache_age)

sickbeard.USE_NZBS = config.checkbox_to_value(use_nzbs)
sickbeard.USE_TORRENTS = config.checkbox_to_value(use_torrents)
Expand Down

0 comments on commit 1c36464

Please sign in to comment.