Documentation
¶
Index ¶
- func ForceAddDownloadQueue(channelId int64, model repository.Download) error
- func GetDownloading() ([]repository.DownloadTask, error)
- func MigrateDownloadTaskInfo(tasks []repository.DownloadTask)
- func RemoveTasks(ids ...uint)
- func ScanAndCreateNewDownloadTasks(processBefore *int64, channelId ...int64) (int, error)
- func TryActivateTaskControl()
- func UpdatePriority(id uint, priority int32)
- type DownloadTask
- type TaskErrorState
- type TaskFileState
- type TaskLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForceAddDownloadQueue ¶
func ForceAddDownloadQueue(channelId int64, model repository.Download) error
func GetDownloading ¶
func GetDownloading() ([]repository.DownloadTask, error)
func MigrateDownloadTaskInfo ¶
func MigrateDownloadTaskInfo(tasks []repository.DownloadTask)
func RemoveTasks ¶
func RemoveTasks(ids ...uint)
func TryActivateTaskControl ¶
func TryActivateTaskControl()
func UpdatePriority ¶
Types ¶
type DownloadTask ¶
type DownloadTask struct {
ID uint
ChannelID int64
MsgID int64
// contains filtered or unexported fields
}
func NewTask ¶
func NewTask(channelId int64, model repository.Download) (*DownloadTask, error)
func (*DownloadTask) CompleteDownload ¶
func (task *DownloadTask) CompleteDownload() (ok bool, err error)
func (*DownloadTask) GetVideoFile ¶
func (task *DownloadTask) GetVideoFile() (bool, error)
func (*DownloadTask) Terminate ¶
func (task *DownloadTask) Terminate() error
func (*DownloadTask) UpdateOrDownload ¶
func (task *DownloadTask) UpdateOrDownload(forceStart bool) error
type TaskErrorState ¶
type TaskLogger ¶
type TaskLogger struct {
// contains filtered or unexported fields
}
func NewTaskLogger ¶
func NewTaskLogger(id uint, logger log.FieldLogger) TaskLogger
func (TaskLogger) Errorln ¶
func (tl TaskLogger) Errorln(args ...interface{})
func (TaskLogger) FatalNow ¶
func (tl TaskLogger) FatalNow()
func (TaskLogger) WithField ¶
func (tl TaskLogger) WithField(key string, value interface{}) TaskLogger
Click to show internal directories.
Click to hide internal directories.