Documentation
¶
Index ¶
- type EpisodeSRRDBInfo
- type FuzzyResult
- type HTTPClient
- type MDBClient
- func (c *MDBClient) FetchNFOFilename(releaseName string) (string, error)
- func (c *MDBClient) FetchNFOFromSources(releaseName string) (string, string, error)
- func (c *MDBClient) FetchReleaseFileInfo(releaseName string) (*srrdb.DetailsResponse, error)
- func (c *MDBClient) FetchSeasonEpisodeInfo(seasonReleaseName string, episodeNumbers []int, episodeNames map[int]string) []EpisodeSRRDBInfo
- func (c *MDBClient) IdentifyRelease(releaseName, nfoContent, imdbID string, tmdbID int, ...) (*types.ReleaseMetadata, error)
- type MediaTitles
- type NFOFetcher
- type SeasonInfo
- type SpecialEpisodeInfo
- type SrrdbFetcher
- type StatusMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpisodeSRRDBInfo ¶ added in v1.13.0
type EpisodeSRRDBInfo struct {
EpisodeNum int
ReleaseName string
Details *srrdb.DetailsResponse
}
EpisodeSRRDBInfo holds SRRDB details for a single episode in a season pack.
type FuzzyResult ¶
FuzzyResult is a struct for fuzzy search results (stub, implement as needed)
type MDBClient ¶
type MDBClient struct {
HTTPClient HTTPClient
SrrdbClient *srrdb.Client
Config *configs.Config
}
func (*MDBClient) FetchNFOFilename ¶ added in v1.12.0
FetchNFOFilename queries SRRDB for the original NFO filename without downloading the content.
func (*MDBClient) FetchNFOFromSources ¶ added in v1.10.0
FetchNFOFromSources tries multiple NFO sources in order.
func (*MDBClient) FetchReleaseFileInfo ¶ added in v1.13.0
func (c *MDBClient) FetchReleaseFileInfo(releaseName string) (*srrdb.DetailsResponse, error)
FetchReleaseFileInfo queries SRRDB for full file details including CRC32 checksums.
func (*MDBClient) FetchSeasonEpisodeInfo ¶ added in v1.13.0
func (c *MDBClient) FetchSeasonEpisodeInfo(seasonReleaseName string, episodeNumbers []int, episodeNames map[int]string) []EpisodeSRRDBInfo
FetchSeasonEpisodeInfo queries SRRDB for each episode in a season pack. It uses episodeNames (from subfolder names or MKV filenames) for direct lookup first, then falls back to deriving per-episode release names from the season release name. Returns successfully found episodes; episodes not on SRRDB are silently skipped.
func (*MDBClient) IdentifyRelease ¶
func (c *MDBClient) IdentifyRelease(releaseName, nfoContent, imdbID string, tmdbID int, statusCb func(StatusMessage)) (*types.ReleaseMetadata, error)
IdentifyRelease attempts to identify and enrich a release with metadata by querying various media databases and extracting information from the release name and NFO content.
type MediaTitles ¶
type MediaTitles struct {
TMDBID int
IMDBID string
TVDBID int
Year int
GermanTitle string
GermanAltTitle string
EnglishTitle string
Keywords []string
Score float64
IsAnime bool
}
func FindBestFuzzyMatch ¶
func FindBestFuzzyMatch(mediaTitles []MediaTitles, query string, queryYear int) *MediaTitles
type NFOFetcher ¶ added in v1.10.0
type NFOFetcher interface {
FetchNFO(releaseName string) (filename string, content string, err error)
}
NFOFetcher interface for NFO fetching services.
type SeasonInfo ¶ added in v1.11.0
type SeasonInfo struct {
FinaleAired bool // Indicates if the season finale has aired
IsBulk bool // Indicates if all episodes aired on the same day (bulk release)
AllowUpload bool // Indicates if upload should be allowed (considers grace period for bulk releases)
EpisodeNumber int // Episode number of the last aired episode
TotalEpisodes int // Total number of episodes in the season
HasError bool // Indicates if an API error occurred (when true, AllowUpload should be false)
HasNoData bool // Indicates if API returned no episodes (when true with no error, may need fallback)
}
type SpecialEpisodeInfo ¶ added in v1.12.0
type SpecialEpisodeInfo struct {
Season int
Episode int
EpisodeName string
MatchScore float64
MatchedAgainst string // which title was matched (DE or EN)
}
SpecialEpisodeInfo holds information about a matched special episode
type SrrdbFetcher ¶ added in v1.10.0
SrrdbFetcher implements NFOFetcher for SRRDB using the go-srrdb library.