task

package
v0.0.0-...-ca5c8a7 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: GPL-3.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

View Source
const DefaultLimit = 5000

DefaultLimit ...

Variables

This section is empty.

Functions

func LoadFrom

func LoadFrom(vs *[]*VideoSource, reader io.Reader) (e error)

LoadFrom ...

func ObjectFromOld

func ObjectFromOld(obj *old.Object) *model.VideoObject

ObjectFromOld ...

func SplitCall

func SplitCall(seeder seed.Seeder, information *Information) (e error)

SplitCall ...

func TransferTo

func TransferTo(eng *xorm.Engine, limit int) (e error)

TransferTo ...

Types

type CheckType

type CheckType string

CheckType ...

const CheckTypeAll CheckType = "all"

CheckTypeAll ...

const CheckTypePin CheckType = "pin"

CheckTypePin ...

const CheckTypeUnpin CheckType = "unpin"

CheckTypeUnpin ...

type InfoType

type InfoType string

InfoType ...

const InfoTypeBSON InfoType = "bson"

InfoTypeBSON ...

const InfoTypeJSON InfoType = "json"

InfoTypeJSON ...

const InfoTypeNone InfoType = "none"

InfoTypeNone ...

type Information

type Information struct {
	InfoType     InfoType
	Path         string
	ResourcePath string
	ProcList     []string
	Start        int
	Limit        int
	Filter       []string
}

Information ...

func NewInformation

func NewInformation() *Information

NewInformation ...

func (*Information) CallTask

func (info *Information) CallTask(seeder seed.Seeder, t *seed.Task) error

CallTask ...

func (*Information) Clone

func (info *Information) Clone() (newinfo *Information)

Clone ...

func (*Information) ProcessCall

func (info *Information) ProcessCall() (seed.Stepper, seed.ProcessCaller)

ProcessCall ...

func (*Information) Task

func (info *Information) Task() *seed.Task

Task ...

type InformationProcessFunction

type InformationProcessFunction func(string) ([]*VideoSource, error)

InformationProcessFunction ...

type Pin

type Pin struct {
	Table    PinTable
	Check    CheckType
	SkipType []interface{}
	Type     PinType

	From string
	// contains filtered or unexported fields
}

Pin ...

func NewPin

func NewPin(args ...PinArgs) *Pin

NewPin ...

func (*Pin) CallTask

func (p *Pin) CallTask(seeder seed.Seeder, task *seed.Task) error

CallTask ...

func (*Pin) Task

func (p *Pin) Task() *seed.Task

Task ...

type PinArgs

type PinArgs func(c *Pin)

PinArgs ...

func PinListArg

func PinListArg(s ...string) PinArgs

PinListArg ...

func PinSkipArg

func PinSkipArg(s []string) PinArgs

PinSkipArg ...

type PinTable

type PinTable string

PinTable ...

const PinTablePin PinTable = "pin"

PinTablePin ...

const PinTableUnfinished PinTable = "unfinished"

PinTableUnfinished ...

const PinTableVideo PinTable = "video"

PinTableVideo ...

type PinType

type PinType string

PinType ...

const PinTypeAdd PinType = "add"

PinTypeAdd ...

const PinTypeCheck PinType = "check"

PinTypeCheck ...

const PinTypeSync PinType = "sync"

PinTypeSync ...

const PinTypeVerify PinType = "verify"

type Transfer

type Transfer struct {
	Status TransferStatus
	Limit  int
	Before *time.Time
	After  *time.Time
	// contains filtered or unexported fields
}

Transfer transfer info from other json,database

func NewDBTransfer

func NewDBTransfer(db *xorm.Engine) *Transfer

NewDBTransfer ...

func NewJSONTransfer

func NewJSONTransfer(path string) *Transfer

NewJSONTransfer ...

func (*Transfer) CallTask

func (t *Transfer) CallTask(seeder seed.Seeder, task *seed.Task) error

CallTask ...

func (*Transfer) Run

func (t *Transfer) Run(ctx context.Context)

Run ...

func (*Transfer) Task

func (t *Transfer) Task() *seed.Task

Task ...

type TransferFlag

type TransferFlag string

TransferFlag ...

const TransferFlagJSON TransferFlag = "json"

TransferFlagJSON ...

const TransferFlagSQL TransferFlag = "sql"

TransferFlagSQL ...

type TransferStatus

type TransferStatus string

TransferStatus ...

const (
	// TransferStatusNone ...
	TransferStatusNone TransferStatus = "none"
	// TransferStatusVerify ...
	TransferStatusVerify TransferStatus = "verify"
	// TransferStatusToJSON ...
	TransferStatusToJSON TransferStatus = "json"
	// TransferStatusFromOther ...
	TransferStatusFromOther TransferStatus = "other"
	// TransferStatusFromOld ...
	TransferStatusFromOld TransferStatus = "old"
	// TransferStatusUpdate ...
	TransferStatusUpdate TransferStatus = "Update"
	// TransferStatusDelete ...
	TransferStatusDelete TransferStatus = "delete"
)

TransferFlagNone ...

type Update

type Update struct {
	Limit   int
	Include []interface{}
	Exclude []interface{}
}

Update update info from the same db

func NewUpdate

func NewUpdate() *Update

NewUpdate ...

func (*Update) CallTask

func (u *Update) CallTask(seeder seed.Seeder, task *seed.Task) error

CallTask ...

func (*Update) Task

func (u *Update) Task() *seed.Task

Task ...

type UpdateContent

type UpdateContent string

UpdateContent ...

const (
	// UpdateContentAll ...
	UpdateContentAll UpdateContent = "all"
	// UpdateContentInfo ...
	UpdateContentInfo UpdateContent = "info"
	// UpdateContentHash ...
	UpdateContentHash UpdateContent = "hash"
)

UpdateStatus ...

type UpdateMethod

type UpdateMethod string

UpdateMethod ...

const (
	UpdateMethodVideo UpdateMethod = "video"
	// UpdateMethodAll ...
	UpdateMethodAll UpdateMethod = "all"
	// UpdateMethodUnfinished ...
	UpdateMethodUnfinished UpdateMethod = "unfinished"
)

UpdateMethod ...

type VideoSlice

type VideoSlice struct {
	Path     string
	SkipType []interface{}
	Filter   []string
}

VideoSlice ...

func NewVideoSlice

func NewVideoSlice() *VideoSlice

NewVideoSlice ...

func (*VideoSlice) CallTask

func (v *VideoSlice) CallTask(seeder seed.Seeder, task *seed.Task) error

CallTask ...

func (*VideoSlice) Task

func (v *VideoSlice) Task() *seed.Task

Task ...

type VideoSource

type VideoSource struct {
	Bangumi      string         `json:"bangumi"`       //番号 no
	SourceHash   string         `json:"source_hash"`   //原片hash
	Type         string         `json:"type"`          //类型:film,FanDrama
	Format       string         `json:"format"`        //输出:3D,2D
	VR           string         `json:"vr"`            //VR格式:左右,上下,平面
	Thumb        string         `json:"thumb"`         //缩略图
	Intro        string         `json:"intro"`         //简介 title
	Alias        []string       `json:"alias"`         //别名,片名
	VideoEncode  string         `json:"video_encode"`  //视频编码
	AudioEncode  string         `json:"audio_encode"`  //音频编码
	Files        []string       `json:"files"`         //存放路径
	HashFiles    []string       `json:"hash_files"`    //已上传Hash
	CheckFiles   []string       `json:"check_files"`   //Unfinished checksum
	Slice        bool           `json:"sliceAdd"`      //是否HLS切片
	Encrypt      bool           `json:"encrypt"`       //加密
	Key          string         `json:"key"`           //秘钥
	M3U8         string         `json:"m3u8"`          //M3U8名
	SegmentFile  string         `json:"segment_file"`  //ts切片名
	PosterPath   string         `json:"poster_path"`   //海报路径
	Poster       string         `json:"poster"`        //海报HASH
	ExtendList   []*seed.Extend `json:"extend_list"`   //扩展信息
	Role         []string       `json:"role"`          //角色列表 stars
	Director     string         `json:"director"`      //导演
	Systematics  string         `json:"systematics"`   //分级
	Season       string         `json:"season"`        //季
	Episode      string         `json:"episode"`       //集数
	TotalEpisode string         `json:"total_episode"` //总集数
	Sharpness    string         `json:"sharpness"`     //清晰度
	Publish      string         `json:"publish"`       //发行日
	Date         string         `json:"date"`          //发行日
	Length       string         `json:"length"`        //片长
	Producer     string         `json:"producer"`      //制片商
	Series       string         `json:"series"`        //系列
	Tags         []string       `json:"tags"`          //标签
	Publisher    string         `json:"publisher"`     //发行商
	Language     string         `json:"language"`      //语言
	Caption      string         `json:"caption"`       //字幕
	MagnetLinks  []string       `json:"magnet_links"`  //磁链
	Uncensored   bool           `json:"uncensored"`    //有码,无码
}

VideoSource ...

Jump to

Keyboard shortcuts

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