Documentation ¶
Index ¶
- type DownloadList
- type Manager
- func (m *Manager) CancelDownloads()
- func (m *Manager) CheckSubscriptions() error
- func (m *Manager) DeleteAllDownloads() error
- func (m *Manager) DeleteSuccessfulDownloads() error
- func (m *Manager) GetAllDownloads() ([]*mangadex.Download, func(), error)
- func (c Manager) Pause()
- func (m *Manager) Paused() bool
- func (m *Manager) Queue(mangaTitle string, ch mangadex.Chapter, createSubscription bool)
- func (c Manager) Resume()
- func (m *Manager) RetryFailedDownloads() error
- func (c Manager) WaitIfPaused()
- func (m *Manager) Waiting() bool
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadList ¶
type DownloadList struct {
// contains filtered or unexported fields
}
DownloadList keeps track of the queued and active downloads in the download manager
func NewDownloadList ¶
func NewDownloadList() *DownloadList
func (*DownloadList) Add ¶
func (dl *DownloadList) Add(d *mangadex.Download)
Add adds a download to the list
func (*DownloadList) Cancel ¶
func (dl *DownloadList) Cancel()
Cancel cancels all currently running downloads and removes them from the list
func (*DownloadList) Has ¶
func (dl *DownloadList) Has(d *mangadex.Download) bool
Has returns whether the list has a given download
func (*DownloadList) List ¶
func (dl *DownloadList) List() []*mangadex.Download
List returns a slice copy of the list
func (*DownloadList) Remove ¶
func (dl *DownloadList) Remove(d *mangadex.Download)
Remove removes a download from the list
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CancelDownloads ¶
func (m *Manager) CancelDownloads()
func (*Manager) CheckSubscriptions ¶
func (*Manager) DeleteAllDownloads ¶
func (*Manager) DeleteSuccessfulDownloads ¶
func (*Manager) GetAllDownloads ¶
func (Manager) Resume ¶
func (c Manager) Resume()
Resume wakes up all goroutines waiting on the controller and continues their execution
func (*Manager) RetryFailedDownloads ¶
func (Manager) WaitIfPaused ¶
func (c Manager) WaitIfPaused()
WaitIfPaused causes the goroutine to wait if it is paused, until the Resume() function is called to continue execution
Click to show internal directories.
Click to hide internal directories.