Summary
Real SABnzbd's change_cat (and change_script) accept a comma-separated list of nzo_ids in value, applying the change to all of them:
# sabnzbd/api.py:406-416
def _api_change_cat(name, kwargs):
"""API: accepts value(=nzo_id), value2(=category)"""
nzo_ids = clean_comma_separated_list(kwargs.get("value"))
cat = kwargs.get("value2")
if nzo_ids and cat:
if is_none(cat):
cat = None
result = sabnzbd.NzbQueue.change_cat(nzo_ids, cat)
return report(keyword="status", data=bool(result > 0))
...
What rustnzb does instead
handle_change_cat (crates/nzb-web/src/sabnzbd_compat.rs) treats req.value as a single job ID (strip_prefix("SABnzbd_nzo_") + exact/prefix match), so a comma-separated multi-ID value never matches any job and the category change silently fails for all of them. handle_rename has the same single-ID assumption (real SABnzbd's mode=queue&name=rename is single-ID only per job, so that one is fine — but is tracked separately under #72 since it's not reachable via the real endpoint at all).
Impact
A client changing category for multiple selected jobs at once (e.g. bulk re-categorize in a queue UI) fails silently.
Fix
Parse value as a comma-separated list of nzo_ids in handle_change_cat/handle_change_script-equivalent handlers and apply the category to each.
Summary
Real SABnzbd's
change_cat(andchange_script) accept a comma-separated list of nzo_ids invalue, applying the change to all of them:What rustnzb does instead
handle_change_cat(crates/nzb-web/src/sabnzbd_compat.rs) treatsreq.valueas a single job ID (strip_prefix("SABnzbd_nzo_")+ exact/prefix match), so a comma-separated multi-ID value never matches any job and the category change silently fails for all of them.handle_renamehas the same single-ID assumption (real SABnzbd'smode=queue&name=renameis single-ID only per job, so that one is fine — but is tracked separately under #72 since it's not reachable via the real endpoint at all).Impact
A client changing category for multiple selected jobs at once (e.g. bulk re-categorize in a queue UI) fails silently.
Fix
Parse
valueas a comma-separated list of nzo_ids inhandle_change_cat/handle_change_script-equivalent handlers and apply the category to each.