hdbits

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package hdbits implements the HDBits.org subtitle provider. Uses the HDBits API with username/passkey authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(_ context.Context, settings map[string]any) (provider.Provider, error)

Factory creates an HDBits provider from settings.

Types

type Provider

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

Provider implements the HDBits subtitle API.

func (*Provider) CheckCredentials added in v0.6.0

func (p *Provider) CheckCredentials(ctx context.Context) error

CheckCredentials reports whether HDBits accepts the configured username and passkey. A refusal is *subflux.AuthError; every other failure means the check did not complete.

func (*Provider) ClearCache

func (p *Provider) ClearCache()

ClearCache removes all cached download data. Called after scan completion to free memory.

func (*Provider) Download

func (p *Provider) Download(ctx context.Context, sub *subflux.Subtitle) ([]byte, error)

Download fetches the subtitle content for the given search result. Season pack archives are cached per subtitle ID and reused across episodes; the target episode is extracted by S##E## filename match.

func (*Provider) Name

func (p *Provider) Name() subflux.ProviderID

Name returns the provider identifier for HDBits.

func (*Provider) Search

func (p *Provider) Search(ctx context.Context, req *subflux.SearchRequest) ([]subflux.Subtitle, error)

Search finds subtitles for the given request by resolving torrent IDs via the HDBits API and inspecting each torrent's subtitle metadata.

Jump to

Keyboard shortcuts

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