nzb

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) (*nzbparser.Nzb, error)

Parse reads an NZB file

func Validate

func Validate(path string) error

Validate checks if an NZB file is valid

Types

type Generator

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

Generator creates NZB files

func (*Generator) AddArticle

func (g *Generator) AddArticle(art *article.Article)

AddArticle adds an article to the generator

func (*Generator) AddFileHash added in v0.0.4

func (g *Generator) AddFileHash(filename string, hash string)

AddFileHash adds a hash for a file

func (*Generator) Generate

func (g *Generator) Generate(outputPath string) (string, error)

Generate creates an NZB file for all files

type NZBGenerator

type NZBGenerator interface {
	// AddArticle adds an article to the generator
	AddArticle(article *article.Article)
	// AddFileHash adds a hash for a file
	AddFileHash(filename string, hash string)
	// Generate creates an NZB file
	Generate(outputPath string) (string, error)
}

NZBGenerator defines the interface for generating NZB files

func NewGenerator

func NewGenerator(segmentSize uint64, compressionConfig config.NzbCompressionConfig, maintainOriginalExtension bool) NZBGenerator

NewGenerator creates a new NZB generator

Jump to

Keyboard shortcuts

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