internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAndDownloadFreeRSS

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

func ProcessTorrentsWithDBUpdate

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

Types

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