nzbget

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nzbget implements the plugin.DownloadClient interface for NZBGet's JSON-RPC API. Tested against NZBGet 21.x and nzbget.com forks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements plugin.DownloadClient against the NZBGet JSON-RPC API.

func New

func New(cfg Config) *Client

New creates a new NZBGet client.

func NewWithHTTPClient

func NewWithHTTPClient(cfg Config, client *http.Client) *Client

NewWithHTTPClient creates a Client with a caller-supplied http.Client. Intended for unit tests that need to bypass the safe dialer.

func (*Client) Add

func (c *Client) Add(ctx context.Context, r plugin.Release) (string, error)

Add submits an NZB by URL to NZBGet. Returns the NZBID as a string.

func (*Client) GetQueue

func (c *Client) GetQueue(ctx context.Context) ([]plugin.QueueItem, error)

GetQueue returns all items from the active queue plus recent history.

func (*Client) Name

func (c *Client) Name() string

func (*Client) Protocol

func (c *Client) Protocol() plugin.Protocol

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, clientItemID string, _ bool) error

Remove deletes an item from NZBGet. Tries queue first, then history.

func (*Client) Status

func (c *Client) Status(ctx context.Context, clientItemID string) (plugin.QueueItem, error)

Status returns the state of a single item by NZBID. Checks the active queue first, then history.

func (*Client) Test

func (c *Client) Test(ctx context.Context) error

Test verifies connectivity by calling the version method.

type Config

type Config struct {
	URL      string `json:"url"` // e.g. "http://localhost:6789"
	Username string `json:"username"`
	Password string `json:"password"`
	Category string `json:"category,omitempty"` // category applied to added NZBs
}

Config holds the connection settings for an NZBGet instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL