Documentation ¶
Index ¶
- Variables
- func SplitAny(s string, seps string) []string
- func StringEqualFoldMulti(s string, values ...string) bool
- func ValidReleasePushStatus(s string) bool
- type APIKey
- type APIRepo
- type Action
- type ActionContentLayout
- type ActionRepo
- type ActionType
- type BasicAuth
- type ChannelHealth
- type ChannelWithHealth
- type Config
- type ConfigUpdate
- type CreateUserRequest
- type DeleteActionRequest
- type DeleteReleaseRequest
- type DownloadClient
- type DownloadClientCached
- type DownloadClientRepo
- type DownloadClientRules
- type DownloadClientSettings
- type DownloadClientType
- type DownloadTorrentFileResponse
- type EventsReleasePushed
- type Feed
- type FeedCacheItem
- type FeedCacheRepo
- type FeedDownloadType
- type FeedIndexer
- type FeedRepo
- type FeedSettings
- type FeedSettingsJSON
- type FeedType
- type Filter
- type FilterDownloads
- type FilterExternal
- type FilterExternalType
- type FilterMaxDownloadsUnit
- type FilterQueryParams
- type FilterRepo
- type FilterUpdate
- type FindFunc
- type GetActionRequest
- type GetReleaseActionStatusRequest
- type GetReleaseRequest
- type IRCAuth
- type IRCAuthMechanism
- type IgnoreSlowTorrentsCondition
- type Indexer
- type IndexerDefinition
- type IndexerDefinitionCustom
- type IndexerIRC
- type IndexerIRCParse
- type IndexerIRCParseLine
- type IndexerIRCParseMatch
- type IndexerIRCParseMatched
- type IndexerImplementation
- type IndexerRepo
- type IndexerSetting
- type IndexerTestApiRequest
- type IrcChannel
- type IrcMessage
- type IrcNetwork
- type IrcNetworkWithHealth
- type IrcRepo
- type LineTest
- type Macro
- type Newznab
- type Notification
- type NotificationEvent
- type NotificationEventArr
- type NotificationPayload
- type NotificationQueryParams
- type NotificationRepo
- type NotificationSender
- type NotificationType
- type Release
- func (r *Release) AddRejectionF(format string, v ...interface{})
- func (r *Release) CleanupTemporaryFiles()
- func (r *Release) DownloadTorrentFile() error
- func (r *Release) DownloadTorrentFileCtx(ctx context.Context) error
- func (r *Release) HasMagnetUri() bool
- func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) error
- func (r *Release) ParseReleaseTagsString(tags string)
- func (r *Release) ParseSizeBytesString(size string)
- func (r *Release) ParseString(title string)
- func (r *Release) RejectionsString(trim bool) string
- func (r *Release) ResolveMagnetUri(ctx context.Context) error
- type ReleaseActionRetryReq
- type ReleaseActionStatus
- type ReleaseFilterStatus
- type ReleaseImplementation
- type ReleaseProtocol
- type ReleasePushStatus
- type ReleaseQueryParams
- type ReleaseRepo
- type ReleaseStats
- type ReleaseTags
- type SendIrcCmdRequest
- type TagInfo
- type TorrentBasic
- type Torznab
- type User
- type UserRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRecordNotFound = sql.ErrNoRows
)
View Source
var ErrUnrecoverableError = errors.New("unrecoverable error")
Functions ¶
func StringEqualFoldMulti ¶
func ValidReleasePushStatus ¶ added in v1.32.0
Types ¶
type Action ¶
type Action struct { ID int `json:"id"` Name string `json:"name"` Type ActionType `json:"type"` Enabled bool `json:"enabled"` ExecCmd string `json:"exec_cmd,omitempty"` ExecArgs string `json:"exec_args,omitempty"` WatchFolder string `json:"watch_folder,omitempty"` Category string `json:"category,omitempty"` Tags string `json:"tags,omitempty"` Label string `json:"label,omitempty"` SavePath string `json:"save_path,omitempty"` Paused bool `json:"paused,omitempty"` IgnoreRules bool `json:"ignore_rules,omitempty"` SkipHashCheck bool `json:"skip_hash_check,omitempty"` ContentLayout ActionContentLayout `json:"content_layout,omitempty"` LimitUploadSpeed int64 `json:"limit_upload_speed,omitempty"` LimitDownloadSpeed int64 `json:"limit_download_speed,omitempty"` LimitRatio float64 `json:"limit_ratio,omitempty"` LimitSeedTime int64 `json:"limit_seed_time,omitempty"` ReAnnounceSkip bool `json:"reannounce_skip,omitempty"` ReAnnounceDelete bool `json:"reannounce_delete,omitempty"` ReAnnounceInterval int64 `json:"reannounce_interval,omitempty"` ReAnnounceMaxAttempts int64 `json:"reannounce_max_attempts,omitempty"` WebhookHost string `json:"webhook_host,omitempty"` WebhookType string `json:"webhook_type,omitempty"` WebhookMethod string `json:"webhook_method,omitempty"` WebhookData string `json:"webhook_data,omitempty"` WebhookHeaders []string `json:"webhook_headers,omitempty"` ExternalDownloadClientID int32 `json:"external_download_client_id,omitempty"` FilterID int `json:"filter_id,omitempty"` ClientID int32 `json:"client_id,omitempty"` Client *DownloadClient `json:"client,omitempty"` }
func (*Action) ParseMacros ¶
ParseMacros parse all macros on action
type ActionContentLayout ¶
type ActionContentLayout string
const ( ActionContentLayoutOriginal ActionContentLayout = "ORIGINAL" ActionContentLayoutSubfolderNone ActionContentLayout = "SUBFOLDER_NONE" ActionContentLayoutSubfolderCreate ActionContentLayout = "SUBFOLDER_CREATE" )
type ActionRepo ¶
type ActionRepo interface { Store(ctx context.Context, action Action) (*Action, error) StoreFilterActions(ctx context.Context, filterID int64, actions []*Action) ([]*Action, error) FindByFilterID(ctx context.Context, filterID int) ([]*Action, error) List(ctx context.Context) ([]Action, error) Get(ctx context.Context, req *GetActionRequest) (*Action, error) Delete(ctx context.Context, req *DeleteActionRequest) error DeleteByFilterID(ctx context.Context, filterID int) error ToggleEnabled(actionID int) error }
type ActionType ¶
type ActionType string
const ( ActionTypeTest ActionType = "TEST" ActionTypeExec ActionType = "EXEC" ActionTypeQbittorrent ActionType = "QBITTORRENT" ActionTypeDelugeV1 ActionType = "DELUGE_V1" ActionTypeDelugeV2 ActionType = "DELUGE_V2" ActionTypeRTorrent ActionType = "RTORRENT" ActionTypeTransmission ActionType = "TRANSMISSION" ActionTypePorla ActionType = "PORLA" ActionTypeWatchFolder ActionType = "WATCH_FOLDER" ActionTypeWebhook ActionType = "WEBHOOK" ActionTypeRadarr ActionType = "RADARR" ActionTypeSonarr ActionType = "SONARR" ActionTypeLidarr ActionType = "LIDARR" ActionTypeWhisparr ActionType = "WHISPARR" ActionTypeReadarr ActionType = "READARR" ActionTypeSabnzbd ActionType = "SABNZBD" )
type ChannelHealth ¶
type ChannelWithHealth ¶
type ChannelWithHealth struct { ID int64 `json:"id"` Enabled bool `json:"enabled"` Name string `json:"name"` Password string `json:"password"` Detached bool `json:"detached"` Monitoring bool `json:"monitoring"` MonitoringSince time.Time `json:"monitoring_since"` LastAnnounce time.Time `json:"last_announce"` }
type Config ¶
type Config struct { Version string ConfigPath string Host string `toml:"host"` Port int `toml:"port"` LogLevel string `toml:"logLevel"` LogPath string `toml:"logPath"` LogMaxSize int `toml:"logMaxSize"` LogMaxBackups int `toml:"logMaxBackups"` BaseURL string `toml:"baseUrl"` SessionSecret string `toml:"sessionSecret"` CustomDefinitions string `toml:"customDefinitions"` CheckForUpdates bool `toml:"checkForUpdates"` DatabaseType string `toml:"databaseType"` PostgresHost string `toml:"postgresHost"` PostgresPort int `toml:"postgresPort"` PostgresDatabase string `toml:"postgresDatabase"` PostgresUser string `toml:"postgresUser"` PostgresPass string `toml:"postgresPass"` PostgresSSLMode string `toml:"postgresSSLMode"` PostgresExtraParams string `toml:"PostgresExtraParams"` }
type ConfigUpdate ¶
type CreateUserRequest ¶
type DeleteActionRequest ¶ added in v1.26.0
type DeleteActionRequest struct {
ActionId int
}
type DeleteReleaseRequest ¶ added in v1.28.0
type DeleteReleaseRequest struct {
OlderThan int
}
type DownloadClient ¶
type DownloadClient struct { ID int `json:"id"` Name string `json:"name"` Type DownloadClientType `json:"type"` Enabled bool `json:"enabled"` Host string `json:"host"` Port int `json:"port"` TLS bool `json:"tls"` TLSSkipVerify bool `json:"tls_skip_verify"` Username string `json:"username"` Password string `json:"password"` Settings DownloadClientSettings `json:"settings,omitempty"` }
func (DownloadClient) BuildLegacyHost ¶
func (c DownloadClient) BuildLegacyHost() string
func (DownloadClient) Validate ¶
func (c DownloadClient) Validate() error
Validate basic validation of client
type DownloadClientCached ¶
type DownloadClientCached struct { Dc *DownloadClient Qbt *qbittorrent.Client }
type DownloadClientRepo ¶
type DownloadClientRepo interface { List(ctx context.Context) ([]DownloadClient, error) FindByID(ctx context.Context, id int32) (*DownloadClient, error) Store(ctx context.Context, client DownloadClient) (*DownloadClient, error) Update(ctx context.Context, client DownloadClient) (*DownloadClient, error) Delete(ctx context.Context, clientID int) error }
type DownloadClientRules ¶
type DownloadClientRules struct { Enabled bool `json:"enabled"` MaxActiveDownloads int `json:"max_active_downloads"` IgnoreSlowTorrents bool `json:"ignore_slow_torrents"` IgnoreSlowTorrentsCondition IgnoreSlowTorrentsCondition `json:"ignore_slow_torrents_condition,omitempty"` DownloadSpeedThreshold int64 `json:"download_speed_threshold"` UploadSpeedThreshold int64 `json:"upload_speed_threshold"` }
type DownloadClientSettings ¶
type DownloadClientSettings struct { APIKey string `json:"apikey,omitempty"` Basic BasicAuth `json:"basic,omitempty"` Rules DownloadClientRules `json:"rules,omitempty"` ExternalDownloadClientId int `json:"external_download_client_id,omitempty"` }
type DownloadClientType ¶
type DownloadClientType string
const ( DownloadClientTypeQbittorrent DownloadClientType = "QBITTORRENT" DownloadClientTypeDelugeV1 DownloadClientType = "DELUGE_V1" DownloadClientTypeDelugeV2 DownloadClientType = "DELUGE_V2" DownloadClientTypeRTorrent DownloadClientType = "RTORRENT" DownloadClientTypeTransmission DownloadClientType = "TRANSMISSION" DownloadClientTypePorla DownloadClientType = "PORLA" DownloadClientTypeRadarr DownloadClientType = "RADARR" DownloadClientTypeSonarr DownloadClientType = "SONARR" DownloadClientTypeLidarr DownloadClientType = "LIDARR" DownloadClientTypeWhisparr DownloadClientType = "WHISPARR" DownloadClientTypeReadarr DownloadClientType = "READARR" DownloadClientTypeSabnzbd DownloadClientType = "SABNZBD" )
type EventsReleasePushed ¶
type EventsReleasePushed struct { ReleaseName string Filter string Indexer string InfoHash string Size uint64 Status ReleasePushStatus Action string ActionType ActionType ActionClient string Rejections []string Protocol ReleaseProtocol // torrent, usenet Implementation ReleaseImplementation // irc, rss, api Timestamp time.Time }
type Feed ¶
type Feed struct { ID int `json:"id"` Name string `json:"name"` Indexer string `json:"indexer"` Type string `json:"type"` Enabled bool `json:"enabled"` URL string `json:"url"` Interval int `json:"interval"` Timeout int `json:"timeout"` // seconds MaxAge int `json:"max_age"` // seconds Capabilities []string `json:"capabilities"` ApiKey string `json:"api_key"` Cookie string `json:"cookie"` Settings *FeedSettingsJSON `json:"settings"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IndexerID int `json:"indexer_id,omitempty"` Indexerr FeedIndexer `json:"-"` LastRun time.Time `json:"last_run"` LastRunData string `json:"last_run_data"` NextRun time.Time `json:"next_run"` }
type FeedCacheItem ¶
type FeedCacheRepo ¶
type FeedCacheRepo interface { Get(feedId int, key string) ([]byte, error) GetByFeed(ctx context.Context, feedId int) ([]FeedCacheItem, error) GetCountByFeed(ctx context.Context, feedId int) (int, error) Exists(feedId int, key string) (bool, error) Put(feedId int, key string, val []byte, ttl time.Time) error PutMany(ctx context.Context, items []FeedCacheItem) error Delete(ctx context.Context, feedId int, key string) error DeleteByFeed(ctx context.Context, feedId int) error DeleteStale(ctx context.Context) error }
type FeedDownloadType ¶
type FeedDownloadType string
const ( FeedDownloadTypeMagnet FeedDownloadType = "MAGNET" FeedDownloadTypeTorrent FeedDownloadType = "TORRENT" )
type FeedIndexer ¶
type FeedRepo ¶
type FeedRepo interface { FindByID(ctx context.Context, id int) (*Feed, error) FindByIndexerIdentifier(ctx context.Context, indexer string) (*Feed, error) Find(ctx context.Context) ([]Feed, error) GetLastRunDataByID(ctx context.Context, id int) (string, error) Store(ctx context.Context, feed *Feed) error Update(ctx context.Context, feed *Feed) error UpdateLastRun(ctx context.Context, feedID int) error UpdateLastRunWithData(ctx context.Context, feedID int, data string) error ToggleEnabled(ctx context.Context, id int, enabled bool) error Delete(ctx context.Context, id int) error }
type FeedSettings ¶
type FeedSettings struct { MinInterval int `json:"minInterval"` Settings []IndexerSetting `json:"settings"` }
type FeedSettingsJSON ¶
type FeedSettingsJSON struct {
DownloadType FeedDownloadType `json:"download_type"`
}
type Filter ¶
type Filter struct { ID int `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` MinSize string `json:"min_size,omitempty"` MaxSize string `json:"max_size,omitempty"` Delay int `json:"delay,omitempty"` Priority int32 `json:"priority"` MaxDownloads int `json:"max_downloads,omitempty"` MaxDownloadsUnit FilterMaxDownloadsUnit `json:"max_downloads_unit,omitempty"` MatchReleases string `json:"match_releases,omitempty"` ExceptReleases string `json:"except_releases,omitempty"` UseRegex bool `json:"use_regex,omitempty"` MatchReleaseGroups string `json:"match_release_groups,omitempty"` ExceptReleaseGroups string `json:"except_release_groups,omitempty"` Scene bool `json:"scene,omitempty"` Origins []string `json:"origins,omitempty"` ExceptOrigins []string `json:"except_origins,omitempty"` Bonus []string `json:"bonus,omitempty"` Freeleech bool `json:"freeleech,omitempty"` FreeleechPercent string `json:"freeleech_percent,omitempty"` SmartEpisode bool `json:"smart_episode"` Shows string `json:"shows,omitempty"` Seasons string `json:"seasons,omitempty"` Episodes string `json:"episodes,omitempty"` Resolutions []string `json:"resolutions,omitempty"` // SD, 480i, 480p, 576p, 720p, 810p, 1080i, 1080p. Codecs []string `json:"codecs,omitempty"` // XviD, DivX, x264, h.264 (or h264), mpeg2 (or mpeg-2), VC-1 (or VC1), WMV, Remux, h.264 Remux (or h264 Remux), VC-1 Remux (or VC1 Remux). Sources []string `json:"sources,omitempty"` // DSR, PDTV, HDTV, HR.PDTV, HR.HDTV, DVDRip, DVDScr, BDr, BD5, BD9, BDRip, BRRip, DVDR, MDVDR, HDDVD, HDDVDRip, BluRay, WEB-DL, TVRip, CAM, R5, TELESYNC, TS, TELECINE, TC. TELESYNC and TS are synonyms (you don't need both). Same for TELECINE and TC Containers []string `json:"containers,omitempty"` MatchHDR []string `json:"match_hdr,omitempty"` ExceptHDR []string `json:"except_hdr,omitempty"` MatchOther []string `json:"match_other,omitempty"` ExceptOther []string `json:"except_other,omitempty"` Years string `json:"years,omitempty"` Artists string `json:"artists,omitempty"` Albums string `json:"albums,omitempty"` MatchReleaseTypes []string `json:"match_release_types,omitempty"` // Album,Single,EP ExceptReleaseTypes string `json:"except_release_types,omitempty"` Formats []string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS Quality []string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, Other Media []string `json:"media,omitempty"` // CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, Other PerfectFlac bool `json:"perfect_flac,omitempty"` Cue bool `json:"cue,omitempty"` Log bool `json:"log,omitempty"` LogScore int `json:"log_score,omitempty"` MatchCategories string `json:"match_categories,omitempty"` ExceptCategories string `json:"except_categories,omitempty"` MatchUploaders string `json:"match_uploaders,omitempty"` ExceptUploaders string `json:"except_uploaders,omitempty"` MatchLanguage []string `json:"match_language,omitempty"` ExceptLanguage []string `json:"except_language,omitempty"` Tags string `json:"tags,omitempty"` ExceptTags string `json:"except_tags,omitempty"` TagsAny string `json:"tags_any,omitempty"` ExceptTagsAny string `json:"except_tags_any,omitempty"` TagsMatchLogic string `json:"tags_match_logic,omitempty"` ExceptTagsMatchLogic string `json:"except_tags_match_logic,omitempty"` MatchReleaseTags string `json:"match_release_tags,omitempty"` ExceptReleaseTags string `json:"except_release_tags,omitempty"` UseRegexReleaseTags bool `json:"use_regex_release_tags,omitempty"` MatchDescription string `json:"match_description,omitempty"` ExceptDescription string `json:"except_description,omitempty"` UseRegexDescription bool `json:"use_regex_description,omitempty"` ActionsCount int `json:"actions_count"` Actions []*Action `json:"actions,omitempty"` External []FilterExternal `json:"external,omitempty"` Indexers []Indexer `json:"indexers"` Downloads *FilterDownloads `json:"-"` Rejections []string `json:"-"` }
func (*Filter) AddRejectionF ¶ added in v1.34.0
func (*Filter) CheckReleaseSize ¶ added in v1.34.0
func (*Filter) RejectionsString ¶ added in v1.34.0
type FilterDownloads ¶
type FilterExternal ¶ added in v1.29.0
type FilterExternal struct { ID int `json:"id"` Name string `json:"name"` Index int `json:"index"` Type FilterExternalType `json:"type"` Enabled bool `json:"enabled"` ExecCmd string `json:"exec_cmd,omitempty"` ExecArgs string `json:"exec_args,omitempty"` ExecExpectStatus int `json:"exec_expect_status,omitempty"` WebhookHost string `json:"webhook_host,omitempty"` WebhookMethod string `json:"webhook_method,omitempty"` WebhookData string `json:"webhook_data,omitempty"` WebhookHeaders string `json:"webhook_headers,omitempty"` WebhookExpectStatus int `json:"webhook_expect_status,omitempty"` WebhookRetryStatus string `json:"webhook_retry_status,omitempty"` WebhookRetryAttempts int `json:"webhook_retry_attempts,omitempty"` WebhookRetryDelaySeconds int `json:"webhook_retry_delay_seconds,omitempty"` FilterId int `json:"-"` }
type FilterExternalType ¶ added in v1.29.0
type FilterExternalType string
const ( ExternalFilterTypeExec FilterExternalType = "EXEC" ExternalFilterTypeWebhook FilterExternalType = "WEBHOOK" )
type FilterMaxDownloadsUnit ¶
type FilterMaxDownloadsUnit string
const ( FilterMaxDownloadsHour FilterMaxDownloadsUnit = "HOUR" FilterMaxDownloadsDay FilterMaxDownloadsUnit = "DAY" FilterMaxDownloadsWeek FilterMaxDownloadsUnit = "WEEK" FilterMaxDownloadsMonth FilterMaxDownloadsUnit = "MONTH" FilterMaxDownloadsEver FilterMaxDownloadsUnit = "EVER" )
type FilterQueryParams ¶
type FilterRepo ¶
type FilterRepo interface { ListFilters(ctx context.Context) ([]Filter, error) Find(ctx context.Context, params FilterQueryParams) ([]Filter, error) FindByID(ctx context.Context, filterID int) (*Filter, error) FindByIndexerIdentifier(ctx context.Context, indexer string) ([]*Filter, error) FindExternalFiltersByID(ctx context.Context, filterId int) ([]FilterExternal, error) Store(ctx context.Context, filter *Filter) error Update(ctx context.Context, filter *Filter) error UpdatePartial(ctx context.Context, filter FilterUpdate) error ToggleEnabled(ctx context.Context, filterID int, enabled bool) error Delete(ctx context.Context, filterID int) error StoreIndexerConnection(ctx context.Context, filterID int, indexerID int) error StoreIndexerConnections(ctx context.Context, filterID int, indexers []Indexer) error StoreFilterExternal(ctx context.Context, filterID int, externalFilters []FilterExternal) error DeleteIndexerConnections(ctx context.Context, filterID int) error DeleteFilterExternal(ctx context.Context, filterID int) error GetDownloadsByFilterId(ctx context.Context, filterID int) (*FilterDownloads, error) }
type FilterUpdate ¶
type FilterUpdate struct { ID int `json:"id"` Name *string `json:"name,omitempty"` Enabled *bool `json:"enabled,omitempty"` MinSize *string `json:"min_size,omitempty"` MaxSize *string `json:"max_size,omitempty"` Delay *int `json:"delay,omitempty"` Priority *int32 `json:"priority,omitempty"` MaxDownloads *int `json:"max_downloads,omitempty"` MaxDownloadsUnit *FilterMaxDownloadsUnit `json:"max_downloads_unit,omitempty"` MatchReleases *string `json:"match_releases,omitempty"` ExceptReleases *string `json:"except_releases,omitempty"` UseRegex *bool `json:"use_regex,omitempty"` MatchReleaseGroups *string `json:"match_release_groups,omitempty"` ExceptReleaseGroups *string `json:"except_release_groups,omitempty"` MatchReleaseTags *string `json:"match_release_tags,omitempty"` ExceptReleaseTags *string `json:"except_release_tags,omitempty"` UseRegexReleaseTags *bool `json:"use_regex_release_tags,omitempty"` MatchDescription *string `json:"match_description,omitempty"` ExceptDescription *string `json:"except_description,omitempty"` UseRegexDescription *bool `json:"use_regex_description,omitempty"` Scene *bool `json:"scene,omitempty"` Origins *[]string `json:"origins,omitempty"` ExceptOrigins *[]string `json:"except_origins,omitempty"` Bonus *[]string `json:"bonus,omitempty"` Freeleech *bool `json:"freeleech,omitempty"` FreeleechPercent *string `json:"freeleech_percent,omitempty"` SmartEpisode *bool `json:"smart_episode,omitempty"` Shows *string `json:"shows,omitempty"` Seasons *string `json:"seasons,omitempty"` Episodes *string `json:"episodes,omitempty"` Resolutions *[]string `json:"resolutions,omitempty"` // SD, 480i, 480p, 576p, 720p, 810p, 1080i, 1080p. Codecs *[]string `json:"codecs,omitempty"` // XviD, DivX, x264, h.264 (or h264), mpeg2 (or mpeg-2), VC-1 (or VC1), WMV, Remux, h.264 Remux (or h264 Remux), VC-1 Remux (or VC1 Remux). Sources *[]string `json:"sources,omitempty"` // DSR, PDTV, HDTV, HR.PDTV, HR.HDTV, DVDRip, DVDScr, BDr, BD5, BD9, BDRip, BRRip, DVDR, MDVDR, HDDVD, HDDVDRip, BluRay, WEB-DL, TVRip, CAM, R5, TELESYNC, TS, TELECINE, TC. TELESYNC and TS are synonyms (you don't need both). Same for TELECINE and TC Containers *[]string `json:"containers,omitempty"` MatchHDR *[]string `json:"match_hdr,omitempty"` ExceptHDR *[]string `json:"except_hdr,omitempty"` MatchOther *[]string `json:"match_other,omitempty"` ExceptOther *[]string `json:"except_other,omitempty"` Years *string `json:"years,omitempty"` Artists *string `json:"artists,omitempty"` Albums *string `json:"albums,omitempty"` MatchReleaseTypes *[]string `json:"match_release_types,omitempty"` // Album,Single,EP ExceptReleaseTypes *string `json:"except_release_types,omitempty"` Formats *[]string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS Quality *[]string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, Other Media *[]string `json:"media,omitempty"` // CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, Other PerfectFlac *bool `json:"perfect_flac,omitempty"` Cue *bool `json:"cue,omitempty"` Log *bool `json:"log,omitempty"` LogScore *int `json:"log_score,omitempty"` MatchCategories *string `json:"match_categories,omitempty"` ExceptCategories *string `json:"except_categories,omitempty"` MatchUploaders *string `json:"match_uploaders,omitempty"` ExceptUploaders *string `json:"except_uploaders,omitempty"` MatchLanguage *[]string `json:"match_language,omitempty"` ExceptLanguage *[]string `json:"except_language,omitempty"` Tags *string `json:"tags,omitempty"` ExceptTags *string `json:"except_tags,omitempty"` TagsAny *string `json:"tags_any,omitempty"` ExceptTagsAny *string `json:"except_tags_any,omitempty"` TagsMatchLogic *string `json:"tags_match_logic,omitempty"` ExceptTagsMatchLogic *string `json:"except_tags_match_logic,omitempty"` ExternalScriptEnabled *bool `json:"external_script_enabled,omitempty"` ExternalScriptCmd *string `json:"external_script_cmd,omitempty"` ExternalScriptArgs *string `json:"external_script_args,omitempty"` ExternalScriptExpectStatus *int `json:"external_script_expect_status,omitempty"` ExternalWebhookEnabled *bool `json:"external_webhook_enabled,omitempty"` ExternalWebhookHost *string `json:"external_webhook_host,omitempty"` ExternalWebhookData *string `json:"external_webhook_data,omitempty"` ExternalWebhookExpectStatus *int `json:"external_webhook_expect_status,omitempty"` ExternalWebhookRetryStatus *string `json:"external_webhook_retry_status,omitempty"` ExternalWebhookRetryAttempts *int `json:"external_webhook_retry_attempts,omitempty"` ExternalWebhookRetryDelaySeconds *int `json:"external_webhook_retry_delay_seconds,omitempty"` Actions []*Action `json:"actions,omitempty"` External []FilterExternal `json:"external,omitempty"` Indexers []Indexer `json:"indexers,omitempty"` }
type GetActionRequest ¶ added in v1.26.0
type GetActionRequest struct {
Id int
}
type GetReleaseActionStatusRequest ¶ added in v1.26.0
type GetReleaseActionStatusRequest struct {
Id int
}
type GetReleaseRequest ¶ added in v1.26.0
type GetReleaseRequest struct {
Id int
}
type IRCAuth ¶
type IRCAuth struct { Mechanism IRCAuthMechanism `json:"mechanism,omitempty"` Account string `json:"account,omitempty"` Password string `json:"password,omitempty"` }
type IRCAuthMechanism ¶
type IRCAuthMechanism string
const ( IRCAuthMechanismNone IRCAuthMechanism = "NONE" IRCAuthMechanismSASLPlain IRCAuthMechanism = "SASL_PLAIN" IRCAuthMechanismNickServ IRCAuthMechanism = "NICKSERV" )
type IgnoreSlowTorrentsCondition ¶
type IgnoreSlowTorrentsCondition string
const ( IgnoreSlowTorrentsModeAlways IgnoreSlowTorrentsCondition = "ALWAYS" IgnoreSlowTorrentsModeMaxReached IgnoreSlowTorrentsCondition = "MAX_DOWNLOADS_REACHED" )
type IndexerDefinition ¶
type IndexerDefinition struct { ID int `json:"id,omitempty"` Name string `json:"name"` Identifier string `json:"identifier"` Implementation string `json:"implementation"` BaseURL string `json:"base_url,omitempty"` Enabled bool `json:"enabled"` Description string `json:"description"` Language string `json:"language"` Privacy string `json:"privacy"` Protocol string `json:"protocol"` URLS []string `json:"urls"` Supports []string `json:"supports"` Settings []IndexerSetting `json:"settings,omitempty"` SettingsMap map[string]string `json:"-"` IRC *IndexerIRC `json:"irc,omitempty"` Torznab *Torznab `json:"torznab,omitempty"` Newznab *Newznab `json:"newznab,omitempty"` RSS *FeedSettings `json:"rss,omitempty"` }
func (IndexerDefinition) HasApi ¶
func (i IndexerDefinition) HasApi() bool
type IndexerDefinitionCustom ¶
type IndexerDefinitionCustom struct { ID int `json:"id,omitempty"` Name string `json:"name"` Identifier string `json:"identifier"` Implementation string `json:"implementation"` BaseURL string `json:"base_url,omitempty"` Enabled bool `json:"enabled,omitempty"` Description string `json:"description"` Language string `json:"language"` Privacy string `json:"privacy"` Protocol string `json:"protocol"` URLS []string `json:"urls"` Supports []string `json:"supports"` Settings []IndexerSetting `json:"settings,omitempty"` SettingsMap map[string]string `json:"-"` IRC *IndexerIRC `json:"irc,omitempty"` Torznab *Torznab `json:"torznab,omitempty"` Newznab *Newznab `json:"newznab,omitempty"` RSS *FeedSettings `json:"rss,omitempty"` Parse *IndexerIRCParse `json:"parse,omitempty"` }
func (*IndexerDefinitionCustom) ToIndexerDefinition ¶
func (i *IndexerDefinitionCustom) ToIndexerDefinition() *IndexerDefinition
type IndexerIRC ¶
type IndexerIRC struct { Network string `json:"network"` Server string `json:"server"` Port int `json:"port"` TLS bool `json:"tls"` Channels []string `json:"channels"` Announcers []string `json:"announcers"` SettingsMap map[string]string `json:"-"` Settings []IndexerSetting `json:"settings"` Parse *IndexerIRCParse `json:"parse,omitempty"` }
func (IndexerIRC) ValidAnnouncer ¶
func (i IndexerIRC) ValidAnnouncer(announcer string) bool
func (IndexerIRC) ValidChannel ¶
func (i IndexerIRC) ValidChannel(channel string) bool
type IndexerIRCParse ¶
type IndexerIRCParse struct { Type string `json:"type"` ForceSizeUnit string `json:"forcesizeunit"` Lines []IndexerIRCParseLine `json:"lines"` Match IndexerIRCParseMatch `json:"match"` }
func (*IndexerIRCParse) ParseMatch ¶
func (p *IndexerIRCParse) ParseMatch(baseURL string, vars map[string]string) (*IndexerIRCParseMatched, error)
type IndexerIRCParseLine ¶
type IndexerIRCParseMatch ¶
type IndexerIRCParseMatched ¶
type IndexerImplementation ¶
type IndexerImplementation string
const ( IndexerImplementationIRC IndexerImplementation = "irc" IndexerImplementationTorznab IndexerImplementation = "torznab" IndexerImplementationNewznab IndexerImplementation = "newznab" IndexerImplementationRSS IndexerImplementation = "rss" IndexerImplementationLegacy IndexerImplementation = "" )
func (IndexerImplementation) String ¶
func (i IndexerImplementation) String() string
type IndexerRepo ¶
type IndexerRepo interface { Store(ctx context.Context, indexer Indexer) (*Indexer, error) Update(ctx context.Context, indexer Indexer) (*Indexer, error) List(ctx context.Context) ([]Indexer, error) Delete(ctx context.Context, id int) error FindByFilterID(ctx context.Context, id int) ([]Indexer, error) FindByID(ctx context.Context, id int) (*Indexer, error) ToggleEnabled(ctx context.Context, indexerID int, enabled bool) error }
type IndexerSetting ¶
type IndexerSetting struct { Name string `json:"name"` Required bool `json:"required,omitempty"` Type string `json:"type"` Value string `json:"value,omitempty"` Label string `json:"label"` Default string `json:"default,omitempty"` Description string `json:"description,omitempty"` Help string `json:"help,omitempty"` Regex string `json:"regex,omitempty"` }
type IndexerTestApiRequest ¶
type IrcChannel ¶
type IrcMessage ¶ added in v1.27.0
type IrcMessage struct { Channel string `json:"channel"` Nick string `json:"nick"` Message string `json:"msg"` Time time.Time `json:"time"` }
func (IrcMessage) Bytes ¶ added in v1.27.0
func (m IrcMessage) Bytes() []byte
func (IrcMessage) ToJsonString ¶ added in v1.27.0
func (m IrcMessage) ToJsonString() string
type IrcNetwork ¶
type IrcNetwork struct { ID int64 `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` Server string `json:"server"` Port int `json:"port"` TLS bool `json:"tls"` Pass string `json:"pass"` Nick string `json:"nick"` Auth IRCAuth `json:"auth,omitempty"` InviteCommand string `json:"invite_command"` UseBouncer bool `json:"use_bouncer"` BouncerAddr string `json:"bouncer_addr"` BotMode bool `json:"bot_mode"` Channels []IrcChannel `json:"channels"` Connected bool `json:"connected"` ConnectedSince *time.Time `json:"connected_since"` }
type IrcNetworkWithHealth ¶
type IrcNetworkWithHealth struct { ID int64 `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` Server string `json:"server"` Port int `json:"port"` TLS bool `json:"tls"` Pass string `json:"pass"` Nick string `json:"nick"` Auth IRCAuth `json:"auth,omitempty"` InviteCommand string `json:"invite_command"` UseBouncer bool `json:"use_bouncer"` BouncerAddr string `json:"bouncer_addr"` BotMode bool `json:"bot_mode"` CurrentNick string `json:"current_nick"` PreferredNick string `json:"preferred_nick"` Channels []ChannelWithHealth `json:"channels"` Connected bool `json:"connected"` ConnectedSince time.Time `json:"connected_since"` ConnectionErrors []string `json:"connection_errors"` Healthy bool `json:"healthy"` }
type IrcRepo ¶
type IrcRepo interface { StoreNetwork(ctx context.Context, network *IrcNetwork) error UpdateNetwork(ctx context.Context, network *IrcNetwork) error StoreChannel(ctx context.Context, networkID int64, channel *IrcChannel) error UpdateChannel(channel *IrcChannel) error UpdateInviteCommand(networkID int64, invite string) error StoreNetworkChannels(ctx context.Context, networkID int64, channels []IrcChannel) error CheckExistingNetwork(ctx context.Context, network *IrcNetwork) (*IrcNetwork, error) FindActiveNetworks(ctx context.Context) ([]IrcNetwork, error) ListNetworks(ctx context.Context) ([]IrcNetwork, error) ListChannels(networkID int64) ([]IrcChannel, error) GetNetworkByID(ctx context.Context, id int64) (*IrcNetwork, error) DeleteNetwork(ctx context.Context, id int64) error }
type Macro ¶
type Macro struct { TorrentName string TorrentPathName string TorrentHash string TorrentID string TorrentUrl string TorrentDataRawBytes []byte MagnetURI string GroupID string DownloadUrl string InfoUrl string Indexer string Title string Category string Categories []string Resolution string Source string HDR string FilterName string Size uint64 SizeString string Season int Episode int Year int CurrentYear int CurrentMonth int CurrentDay int CurrentHour int CurrentMinute int CurrentSecond int }
type Newznab ¶
type Newznab struct { MinInterval int `json:"minInterval"` Settings []IndexerSetting `json:"settings"` }
type Notification ¶
type Notification struct { ID int `json:"id"` Name string `json:"name"` Type NotificationType `json:"type"` Enabled bool `json:"enabled"` Events []string `json:"events"` Token string `json:"token"` APIKey string `json:"api_key"` Webhook string `json:"webhook"` Title string `json:"title"` Icon string `json:"icon"` Username string `json:"username"` Host string `json:"host"` Password string `json:"password"` Channel string `json:"channel"` Rooms string `json:"rooms"` Targets string `json:"targets"` Devices string `json:"devices"` Priority int32 `json:"priority"` Topic string `json:"topic"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type NotificationEvent ¶
type NotificationEvent string
const ( NotificationEventAppUpdateAvailable NotificationEvent = "APP_UPDATE_AVAILABLE" NotificationEventPushApproved NotificationEvent = "PUSH_APPROVED" NotificationEventPushRejected NotificationEvent = "PUSH_REJECTED" NotificationEventPushError NotificationEvent = "PUSH_ERROR" NotificationEventIRCDisconnected NotificationEvent = "IRC_DISCONNECTED" NotificationEventIRCReconnected NotificationEvent = "IRC_RECONNECTED" NotificationEventTest NotificationEvent = "TEST" )
type NotificationEventArr ¶
type NotificationEventArr []NotificationEvent
type NotificationPayload ¶
type NotificationPayload struct { Subject string Message string Event NotificationEvent ReleaseName string Filter string Indexer string InfoHash string Size uint64 Status ReleasePushStatus Action string ActionType ActionType ActionClient string Rejections []string Protocol ReleaseProtocol // torrent, usenet Implementation ReleaseImplementation // irc, rss, api Timestamp time.Time }
type NotificationQueryParams ¶
type NotificationRepo ¶
type NotificationRepo interface { List(ctx context.Context) ([]Notification, error) Find(ctx context.Context, params NotificationQueryParams) ([]Notification, int, error) FindByID(ctx context.Context, id int) (*Notification, error) Store(ctx context.Context, notification Notification) (*Notification, error) Update(ctx context.Context, notification Notification) (*Notification, error) Delete(ctx context.Context, notificationID int) error }
type NotificationSender ¶
type NotificationSender interface { Send(event NotificationEvent, payload NotificationPayload) error CanSend(event NotificationEvent) bool }
type NotificationType ¶
type NotificationType string
const ( NotificationTypeDiscord NotificationType = "DISCORD" NotificationTypeNotifiarr NotificationType = "NOTIFIARR" NotificationTypeIFTTT NotificationType = "IFTTT" NotificationTypeJoin NotificationType = "JOIN" NotificationTypeMattermost NotificationType = "MATTERMOST" NotificationTypeMatrix NotificationType = "MATRIX" NotificationTypePushBullet NotificationType = "PUSH_BULLET" NotificationTypePushover NotificationType = "PUSHOVER" NotificationTypeRocketChat NotificationType = "ROCKETCHAT" NotificationTypeSlack NotificationType = "SLACK" NotificationTypeTelegram NotificationType = "TELEGRAM" NotificationTypeGotify NotificationType = "GOTIFY" )
type Release ¶
type Release struct { ID int64 `json:"id"` FilterStatus ReleaseFilterStatus `json:"filter_status"` Rejections []string `json:"rejections"` Indexer string `json:"indexer"` FilterName string `json:"filter"` Protocol ReleaseProtocol `json:"protocol"` Implementation ReleaseImplementation `json:"implementation"` // irc, rss, api Timestamp time.Time `json:"timestamp"` InfoURL string `json:"info_url"` DownloadURL string `json:"download_url"` MagnetURI string `json:"-"` GroupID string `json:"group_id"` TorrentID string `json:"torrent_id"` TorrentTmpFile string `json:"-"` TorrentDataRawBytes []byte `json:"-"` TorrentHash string `json:"-"` TorrentName string `json:"torrent_name"` // full release name Size uint64 `json:"size"` Title string `json:"title"` // Parsed title Description string `json:"-"` Category string `json:"category"` Categories []string `json:"categories,omitempty"` Season int `json:"season"` Episode int `json:"episode"` Year int `json:"year"` Resolution string `json:"resolution"` Source string `json:"source"` Codec []string `json:"codec"` Container string `json:"container"` HDR []string `json:"hdr"` Audio []string `json:"-"` AudioChannels string `json:"-"` Group string `json:"group"` Region string `json:"-"` Language []string `json:"-"` Proper bool `json:"proper"` Repack bool `json:"repack"` Website string `json:"website"` Artists string `json:"-"` Type string `json:"type"` // Album,Single,EP LogScore int `json:"-"` Origin string `json:"origin"` // P2P, Internal Tags []string `json:"-"` ReleaseTags string `json:"-"` Freeleech bool `json:"-"` FreeleechPercent int `json:"-"` Bonus []string `json:"-"` Uploader string `json:"uploader"` PreTime string `json:"pre_time"` Other []string `json:"-"` RawCookie string `json:"-"` AdditionalSizeCheckRequired bool `json:"-"` FilterID int `json:"-"` Filter *Filter `json:"-"` ActionStatus []ReleaseActionStatus `json:"action_status"` }
func NewRelease ¶
func (*Release) AddRejectionF ¶
func (*Release) CleanupTemporaryFiles ¶
func (r *Release) CleanupTemporaryFiles()
func (*Release) DownloadTorrentFile ¶
func (*Release) DownloadTorrentFileCtx ¶
func (*Release) HasMagnetUri ¶
HasMagnetUri check uf MagnetURI is set or empty
func (*Release) MapVars ¶
func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) error
MapVars map vars from regex captures to fields on release
func (*Release) ParseReleaseTagsString ¶
func (*Release) ParseSizeBytesString ¶
ParseSizeBytesString If there are parsing errors, then it keeps the original (or default size 0) Otherwise, it will update the size only if the new size is bigger than the previous one.
func (*Release) ParseString ¶
func (*Release) RejectionsString ¶
type ReleaseActionRetryReq ¶ added in v1.26.0
type ReleaseActionStatus ¶
type ReleaseActionStatus struct { ID int64 `json:"id"` Status ReleasePushStatus `json:"status"` Action string `json:"action"` ActionID int64 `json:"action_id"` Type ActionType `json:"type"` Client string `json:"client"` Filter string `json:"filter"` FilterID int64 `json:"filter_id"` Rejections []string `json:"rejections"` ReleaseID int64 `json:"release_id"` Timestamp time.Time `json:"timestamp"` }
func NewReleaseActionStatus ¶
func NewReleaseActionStatus(action *Action, release *Release) *ReleaseActionStatus
type ReleaseFilterStatus ¶
type ReleaseFilterStatus string
const ( ReleaseStatusFilterApproved ReleaseFilterStatus = "FILTER_APPROVED" ReleaseStatusFilterPending ReleaseFilterStatus = "PENDING" )
type ReleaseImplementation ¶
type ReleaseImplementation string
const ( ReleaseImplementationIRC ReleaseImplementation = "IRC" ReleaseImplementationTorznab ReleaseImplementation = "TORZNAB" ReleaseImplementationNewznab ReleaseImplementation = "NEWZNAB" ReleaseImplementationRSS ReleaseImplementation = "RSS" )
func (ReleaseImplementation) String ¶
func (r ReleaseImplementation) String() string
type ReleaseProtocol ¶
type ReleaseProtocol string
const ( ReleaseProtocolTorrent ReleaseProtocol = "torrent" ReleaseProtocolNzb ReleaseProtocol = "usenet" )
func (ReleaseProtocol) String ¶
func (r ReleaseProtocol) String() string
type ReleasePushStatus ¶
type ReleasePushStatus string
const ( ReleasePushStatusPending ReleasePushStatus = "PENDING" // Initial status ReleasePushStatusApproved ReleasePushStatus = "PUSH_APPROVED" ReleasePushStatusRejected ReleasePushStatus = "PUSH_REJECTED" ReleasePushStatusErr ReleasePushStatus = "PUSH_ERROR" )
func (ReleasePushStatus) String ¶
func (r ReleasePushStatus) String() string
type ReleaseQueryParams ¶
type ReleaseRepo ¶
type ReleaseRepo interface { Store(ctx context.Context, release *Release) error Find(ctx context.Context, params ReleaseQueryParams) (res []*Release, nextCursor int64, count int64, err error) FindRecent(ctx context.Context) ([]*Release, error) Get(ctx context.Context, req *GetReleaseRequest) (*Release, error) GetIndexerOptions(ctx context.Context) ([]string, error) Stats(ctx context.Context) (*ReleaseStats, error) Delete(ctx context.Context, req *DeleteReleaseRequest) error CanDownloadShow(ctx context.Context, title string, season int, episode int) (bool, error) GetActionStatus(ctx context.Context, req *GetReleaseActionStatusRequest) (*ReleaseActionStatus, error) StoreReleaseActionStatus(ctx context.Context, status *ReleaseActionStatus) error }
type ReleaseStats ¶
type ReleaseTags ¶
type ReleaseTags struct { Audio []string Bonus []string Channels string Codec string Container string HDR []string Origin string Other []string Resolution string Source string }
func ParseReleaseTagString ¶
func ParseReleaseTagString(tags string) ReleaseTags
func ParseReleaseTags ¶
func ParseReleaseTags(tags []string) ReleaseTags
type SendIrcCmdRequest ¶ added in v1.27.0
type TorrentBasic ¶
type TorrentBasic struct { Id string `json:"Id"` TorrentId string `json:"TorrentId,omitempty"` InfoHash string `json:"InfoHash"` Size string `json:"Size"` Uploader string `json:"Uploader"` }
func (TorrentBasic) ReleaseSizeBytes ¶
func (t TorrentBasic) ReleaseSizeBytes() uint64
type Torznab ¶
type Torznab struct { MinInterval int `json:"minInterval"` Settings []IndexerSetting `json:"settings"` }
Click to show internal directories.
Click to hide internal directories.