Documentation
¶
Overview ¶
Package hdbits implements the HDBits.org subtitle provider. Uses the HDBits API with username/passkey authentication.
Index ¶
- func Factory(_ context.Context, settings map[string]any) (provider.Provider, error)
- type Provider
- func (p *Provider) CheckCredentials(ctx context.Context) error
- func (p *Provider) ClearCache()
- func (p *Provider) Download(ctx context.Context, sub *subflux.Subtitle) ([]byte, error)
- func (p *Provider) Name() subflux.ProviderID
- func (p *Provider) Search(ctx context.Context, req *subflux.SearchRequest) ([]subflux.Subtitle, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
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 ¶
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.