Skip to content

SABnzbd compat: mode=get_scripts is not implemented #74

Description

@thedancingdeveloper

Summary

mode=get_scripts is a real, top-level SABnzbd API mode (sabnzbd/api.py:1107, _api_table["get_scripts"] = (_api_get_scripts, 2)) that rustnzb doesn't handle at all — it falls through dispatch_mode's default arm and returns {"status": false, "error": "Unknown mode: get_scripts"}.

Real behavior

# sabnzbd/api.py:796-797
def _api_get_scripts(name, kwargs):
    return report(keyword="scripts", data=list_scripts())

# sabnzbd/filesystem.py:594-613 (list_scripts, default args)
# With no script directory / no scripts present, returns ["None"]

So at minimum, real SABnzbd always answers {"scripts": ["None"]} — RustNZB doesn't support post-processing scripts, so this is the correct permanent response for us too.

Impact

Several SAB-compatible clients (including download-from-search "add" dialogs) fetch categories and scripts together to populate the add dialog, and some abort populating the whole dialog — category picker included — if either call errors. Possibly related to #65.

Fix

Add a get_scripts case to dispatch_mode in crates/nzb-web/src/sabnzbd_compat.rs returning {"scripts": ["None"]}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions