transfer

package
v0.0.0-...-44c038b Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateReplaces

func CreateReplaces(replaces []string) []*replace.Replace

func FindTorrentFile

func FindTorrentFile(transferStructure *TransferStructure) error

if we can find torrent file, we start check another locations from options search paths

func HandleResumeItem

func HandleResumeItem(key string, transferStruct *TransferStructure, chans *Channels, wg *sync.WaitGroup) error

func HandleResumeItems

func HandleResumeItems(opts *options.Opts, resumeItems map[string]*utorrentStructs.ResumeItem)

func HandleTorrentFilePath

func HandleTorrentFilePath(transferStructure *TransferStructure, key string)

HandleTorrentFilePath check if resume key is absolute path. It means that we should search torrent file using this absolute path notice that torrent file name always known

func ProcessLabels

func ProcessLabels(opts *options.Opts, newtags []string) error

Types

type Channels

type Channels struct {
	ComChannel     chan string
	ErrChannel     chan string
	BoundedChannel chan bool
}

type TransferStructure

type TransferStructure struct {
	Fastresume      *qBittorrentStructures.QBittorrentFastresume `bencode:"-"`
	ResumeItem      *utorrentStructs.ResumeItem                  `bencode:"-"`
	TorrentFile     *torrentStructures.Torrent                   `bencode:"-"`
	TorrentFileRaw  map[string]interface{}                       `bencode:"-"`
	Opts            *options.Opts                                `bencode:"-"`
	TorrentFilePath string                                       `bencode:"-"`
	TorrentFileName string                                       `bencode:"-"`
	NumPieces       int64                                        `bencode:"-"`
	Replace         []*replace.Replace                           `bencode:"-"`
	Targets         map[int64]string                             `bencode:"-"`
	Magnet          bool                                         `bencode:"-"`
}

func CreateEmptyNewTransferStructure

func CreateEmptyNewTransferStructure() TransferStructure

func (*TransferStructure) FillPiecesParted

func (transfer *TransferStructure) FillPiecesParted()

func (*TransferStructure) FillWholePieces

func (transfer *TransferStructure) FillWholePieces(piecePrio int)

func (*TransferStructure) FindHighestIndexOfMappedFiles

func (transfer *TransferStructure) FindHighestIndexOfMappedFiles() int64

FindHighestIndexOfMappedFiles just helper for creating mappedfiles

func (*TransferStructure) GetHash

func (transfer *TransferStructure) GetHash() (hash string)

func (*TransferStructure) HandleCaption

func (transfer *TransferStructure) HandleCaption()

func (*TransferStructure) HandleCompleted

func (transfer *TransferStructure) HandleCompleted()

func (*TransferStructure) HandleLabels

func (transfer *TransferStructure) HandleLabels()

func (*TransferStructure) HandlePieces

func (transfer *TransferStructure) HandlePieces()

func (*TransferStructure) HandlePriority

func (transfer *TransferStructure) HandlePriority()

func (*TransferStructure) HandleSavePaths

func (transfer *TransferStructure) HandleSavePaths()

func (*TransferStructure) HandleState

func (transfer *TransferStructure) HandleState()

HandleState transfer torrents state. if torrent has several files and it doesn't complete downloaded (priority), it will be stopped

func (*TransferStructure) HandleStructures

func (transfer *TransferStructure) HandleStructures()

func (*TransferStructure) HandleTags

func (transfer *TransferStructure) HandleTags()

func (*TransferStructure) HandleTotalDownloaded

func (transfer *TransferStructure) HandleTotalDownloaded()

func (*TransferStructure) HandleTrackers

func (transfer *TransferStructure) HandleTrackers()

Jump to

Keyboard shortcuts

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