moveserver

package
v0.0.0-...-f855965 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assistant

type Assistant struct {
	TorrentStatus map[string]*TorrentStatus
	// contains filtered or unexported fields
}

func (*Assistant) Disable

func (a *Assistant) Disable()

func (*Assistant) Enable

func (a *Assistant) Enable()

func (*Assistant) IsEnabled

func (a *Assistant) IsEnabled() bool

func (*Assistant) Log

func (a *Assistant) Log(tp, msg string)

type DiskStats

type DiskStats struct {
	Path        string
	Size        int64
	Used        int64
	Avail       int64
	PercentFull int
	FsType      string
}

type LogMessage

type LogMessage struct {
	Type string
	Msg  string
	T    time.Time
}

LogMessage encapsulates message with a type and time.

type MoveListenerRequest

type MoveListenerRequest struct {
	Request MoveRequest
}

type MoveRequest

type MoveRequest struct {
	Path string
	To   string
}

type MoveServer

type MoveServer struct {

	// Move assistant.
	Assistant *Assistant
	// contains filtered or unexported fields
}

func (*MoveServer) GetCacheRefreshed

func (s *MoveServer) GetCacheRefreshed() time.Time

func (*MoveServer) GetDiskStats

func (s *MoveServer) GetDiskStats() []DiskStats

func (*MoveServer) GetMessages

func (s *MoveServer) GetMessages() []*LogMessage

func (*MoveServer) GetMoveTargets

func (s *MoveServer) GetMoveTargets() []string

func (*MoveServer) GetMvBuffSizeAndElems

func (s *MoveServer) GetMvBuffSizeAndElems() (int, int)

func (*MoveServer) GetPathInfoAndPathInfoHistory

func (s *MoveServer) GetPathInfoAndPathInfoHistory() (map[string]*PathInfo, []*PathInfo)

func (*MoveServer) Log

func (s *MoveServer) Log(tp, msg string)

func (*MoveServer) Move

func (s *MoveServer) Move(name string) error

func (*MoveServer) SetMovePath

func (s *MoveServer) SetMovePath(name, move_to string) error

func (*MoveServer) SetPathMoveResult

func (s *MoveServer) SetPathMoveResult(path string, err error, output string) error

func (*MoveServer) UpdateCacheAsync

func (s *MoveServer) UpdateCacheAsync()

func (*MoveServer) UpdateDiskStatsAsync

func (s *MoveServer) UpdateDiskStatsAsync()

type MoveServerConfig

type MoveServerConfig struct {
	SourceDir         string   `json:"source_dir"`
	MoviesTargets     []string `json:"movies_targets"`
	SeriesTargets     []string `json:"series_targets"`
	MaxMvCommands     int      `json:"max_mv_commands"`
	MvBufferSize      int      `json:"mv_buffer_size"`
	DefaultMoveTarget string   `json:"default_move_target"`
}

type PathInfo

type PathInfo struct {
	Name           string
	Path           string // Present if found on disk.
	AllowMove      bool
	AllowAssistant bool
	MoveInfo       PathMoveInfo
	Torrent        *tr.Torrent // Present if found in torrent.
	MoveTo         string      // Path where this should be moved, can be empty
}

Information about tranmission files.

type PathMoveInfo

type PathMoveInfo struct {
	Moving          bool
	Target          string
	LastError       error
	LastErrorOutput string
}

PathInfo has all the information kept on Server about paths in the Download directory.

type TorrentStatus

type TorrentStatus struct {
	Name        string
	MoveStatus  string
	StartStatus string
	Status      string
}

Jump to

Keyboard shortcuts

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