internal

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAndDownloadFreeRSS

func FetchAndDownloadFreeRSS[T models.ResType](ctx context.Context, siteName models.SiteGroup, m PTSiteInter[T], rssCfg config.RSSConfig) error

func ProcessTorrentsWithDBUpdate

func ProcessTorrentsWithDBUpdate(
	ctx context.Context,
	qbitClient *qbit.QbitClient,
	dirPath, category, tags string,
	siteName models.SiteGroup,
) error

Types

type CmctImpl added in v0.0.3

type CmctImpl struct {
	Collector *colly.Collector
	SiteConf  *site.SiteMapConfig
	// contains filtered or unexported fields
}

func NewCmctImpl added in v0.0.3

func NewCmctImpl(ctx context.Context) *CmctImpl

func (*CmctImpl) CanbeFinished added in v0.0.3

func (h *CmctImpl) CanbeFinished(detail models.PHPTorrentInfo) bool

func (*CmctImpl) Context added in v0.0.3

func (h *CmctImpl) Context() context.Context

func (*CmctImpl) DownloadTorrent added in v0.0.3

func (h *CmctImpl) DownloadTorrent(url, title, downloadDir string) (string, error)

func (*CmctImpl) GetTorrentDetails added in v0.0.3

func (h *CmctImpl) GetTorrentDetails(item *gofeed.Item) (*models.APIResponse[models.PHPTorrentInfo], error)

func (*CmctImpl) IsEnabled added in v0.0.3

func (h *CmctImpl) IsEnabled() bool

func (*CmctImpl) MaxRetries added in v0.0.3

func (h *CmctImpl) MaxRetries() int

func (*CmctImpl) RetryDelay added in v0.0.3

func (h *CmctImpl) RetryDelay() time.Duration

func (*CmctImpl) SendTorrentToQbit added in v0.0.3

func (h *CmctImpl) SendTorrentToQbit(ctx context.Context, rssCfg config.RSSConfig) error

type HdskyImpl

type HdskyImpl struct {
	Collector *colly.Collector
	SiteConf  *site.SiteMapConfig
	// contains filtered or unexported fields
}

func NewHdskyImpl

func NewHdskyImpl(ctx context.Context) *HdskyImpl

func (*HdskyImpl) CanbeFinished

func (h *HdskyImpl) CanbeFinished(detail models.PHPTorrentInfo) bool

func (*HdskyImpl) Context

func (h *HdskyImpl) Context() context.Context

func (*HdskyImpl) DownloadTorrent

func (h *HdskyImpl) DownloadTorrent(url, title, downloadDir string) (string, error)

func (*HdskyImpl) GetTorrentDetails

func (h *HdskyImpl) GetTorrentDetails(item *gofeed.Item) (*models.APIResponse[models.PHPTorrentInfo], error)

func (*HdskyImpl) IsEnabled

func (h *HdskyImpl) IsEnabled() bool

func (*HdskyImpl) MaxRetries

func (h *HdskyImpl) MaxRetries() int

func (*HdskyImpl) RetryDelay

func (h *HdskyImpl) RetryDelay() time.Duration

func (*HdskyImpl) SendTorrentToQbit

func (h *HdskyImpl) SendTorrentToQbit(ctx context.Context, rssCfg config.RSSConfig) error

type MteamImpl

type MteamImpl struct {
	// contains filtered or unexported fields
}

func NewMteamImpl

func NewMteamImpl(ctx context.Context) *MteamImpl

func (*MteamImpl) CanbeFinished

func (m *MteamImpl) CanbeFinished(detail models.MTTorrentDetail) bool

func (*MteamImpl) Context

func (m *MteamImpl) Context() context.Context

func (*MteamImpl) DownloadTorrent

func (m *MteamImpl) DownloadTorrent(url, title, downloadDir string) (string, error)

func (*MteamImpl) GetTorrentDetails

func (m *MteamImpl) GetTorrentDetails(item *gofeed.Item) (*models.APIResponse[models.MTTorrentDetail], error)

func (*MteamImpl) IsEnabled

func (m *MteamImpl) IsEnabled() bool

func (*MteamImpl) IsFree

func (m *MteamImpl) IsFree(detail models.MTTorrentDetail) bool

func (*MteamImpl) MaxRetries

func (m *MteamImpl) MaxRetries() int

func (*MteamImpl) RetryDelay

func (m *MteamImpl) RetryDelay() time.Duration

func (*MteamImpl) SendTorrentToQbit

func (m *MteamImpl) SendTorrentToQbit(ctx context.Context, rssCfg config.RSSConfig) error

type PTSiteInter

type PTSiteInter[T models.ResType] interface {
	GetTorrentDetails(item *gofeed.Item) (*models.APIResponse[T], error)
	IsEnabled() bool
	DownloadTorrent(url, title, downloadDir string) (string, error)
	MaxRetries() int
	RetryDelay() time.Duration
	SendTorrentToQbit(ctx context.Context, rssCfg config.RSSConfig) error
	Context() context.Context
}

Jump to

Keyboard shortcuts

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