nzbfile

package
v0.0.0-...-12a7bbb Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Poster  string    `xml:"poster,attr"`
	Date    string    `xml:"date,attr"`
	Subject string    `xml:"subject,attr"`
	Group   []string  `xml:"groups>group"`
	Segment []Segment `xml:"segments>segment"`
}

type Nzb

type Nzb struct {
	File    []File `xml:"file"`
	JobName string

	DoneCount   int32
	FailedCount int32
	TotalCount  int32
	// contains filtered or unexported fields
}

func NewNZB

func NewNZB(nzbfile []byte, jobName string, wg *sync.WaitGroup) (*Nzb, error)

func (*Nzb) Complete

func (n *Nzb) Complete(bytes int64)

func (*Nzb) Done

func (n *Nzb) Done(failed bool)

func (*Nzb) EnqueueFetches

func (n *Nzb) EnqueueFetches(workQueue chan *SegmentRequest, fetchPar2 bool)

type Segment

type Segment struct {
	Bytes     int64  `xml:"bytes,attr"`
	Number    int    `xml:"number,attr"`
	MessageID string `xml:",chardata"`
}

type SegmentRequest

type SegmentRequest struct {
	MessageID string
	Bytes     int64
	// contains filtered or unexported fields
}

func (*SegmentRequest) BuildWriter

func (s *SegmentRequest) BuildWriter(outDir string, filename string) (WriterAtCloser, error)

func (*SegmentRequest) Done

func (s *SegmentRequest) Done(fail bool)

func (*SegmentRequest) FailServer

func (s *SegmentRequest) FailServer(server string, numServers int)

func (*SegmentRequest) Queue

func (s *SegmentRequest) Queue()

func (*SegmentRequest) RequeueIfFailed

func (s *SegmentRequest) RequeueIfFailed(server string) bool

type WriterAtCloser

type WriterAtCloser interface {
	io.WriterAt
	io.Closer
}

Jump to

Keyboard shortcuts

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