Skip to content

Commit

Permalink
Fixed #2176 clean_bundles, optimize, and empty_trash not workin…
Browse files Browse the repository at this point in the history
…g as global attributes
  • Loading branch information
meisnate12 committed Aug 12, 2024
1 parent 574366c commit b60ff3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ Fixed `imdb_watchlist`
Fixes #2135 AniDB Builder type conversion error
Fixed #2150; change xmen list to a new one
Fixed #2169 Add handling for blank secrets
Fixed #2176 `clean_bundles`, `optimize`, and `empty_trash` not working as global attributes

Various other Minor Fixes
11 changes: 5 additions & 6 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,11 @@ def hooks(hook_attr):

def check_next(next_data):
if isinstance(next_data, dict):
for d in next_data:
next_data[d] = check_next(next_data[d])
return {k: check_next(v) for k, v in next_data.items()}
elif isinstance(next_data, list):
for d in next_data:
check_next(d)
return [check_next(d) for d in next_data]
else:
for secret, secret_value in self.secrets.items():
for secret, secret_value in secrets.items():
for test in [secret, secret.upper().replace("-", "_")]:
if f"<<{test}>>" in str(next_data):
return str(next_data).replace(f"<<{test}>>", secret_value)
Expand Down Expand Up @@ -1165,13 +1162,15 @@ def check_for_attribute(data, attribute, parent=None, test_list=None, translatio
params["plex"][attr] = check_for_attribute(lib, attr, parent="plex", var_type="bool", save=False, throw=True)
except Failed:
test_attr = lib["plex"][attr] if "plex" in lib and attr in lib["plex"] and lib["plex"][attr] else self.general["plex"][attr]
params["plex"][attr] = False
if test_attr is not True and test_attr is not False:
params["plex"][attr] = False
try:
util.schedule_check(attr, test_attr, current_time, self.run_hour)
params["plex"][attr] = True
except NotScheduled:
logger.info(f"Skipping Operation Not Scheduled for {test_attr}")
else:
params["plex"][attr] = test_attr

if params["plex"]["url"].lower() == "env":
params["plex"]["url"] = self.env_plex_url
Expand Down

0 comments on commit b60ff3a

Please sign in to comment.