fd
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from typing import List, Dict, Any, Optional, Sequence
|
||||
|
||||
from cmdlet._shared import Cmdlet, CmdletArg
|
||||
from SYS.config import load_config, save_config
|
||||
from SYS.config import load_config, save_config, save_config_and_verify
|
||||
from SYS import pipeline as ctx
|
||||
from SYS.result_table import Table
|
||||
|
||||
@@ -200,7 +200,20 @@ def _run(piped_result: Any, args: List[str], config: Dict[str, Any]) -> int:
|
||||
new_value = _strip_value_quotes(new_value)
|
||||
try:
|
||||
set_nested_config(current_config, selection_key, new_value)
|
||||
save_config(current_config)
|
||||
# For AllDebrid API changes, use the verified save path to ensure
|
||||
# the new API key persisted to disk; otherwise fall back to normal save.
|
||||
try:
|
||||
key_l = str(selection_key or "").lower()
|
||||
except Exception:
|
||||
key_l = ""
|
||||
if "alldebrid" in key_l or "all-debrid" in key_l:
|
||||
try:
|
||||
save_config_and_verify(current_config)
|
||||
except Exception as exc:
|
||||
print(f"Error saving configuration (verification failed): {exc}")
|
||||
return 1
|
||||
else:
|
||||
save_config(current_config)
|
||||
print(f"Updated '{selection_key}' to '{new_value}'")
|
||||
return 0
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user