Documentation
¶
Overview ¶
Package anidb provides TVDB → AniDB mapping using the community-maintained anime-list.xml from https://github.com/Anime-Lists/anime-lists. Optionally queries the AniDB HTTP API for episode-specific IDs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpisodeResult ¶
type EpisodeResult struct {
AniDBEpisodeID int // 0 if API key not configured or lookup failed
}
EpisodeResult holds the resolved AniDB IDs.
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper resolves TVDB IDs to AniDB episode IDs.
func NewMapper ¶
NewMapper creates an AniDB mapper. clientKey is optional; if empty, only the XML mapping is used (no episode ID resolution).
func (*Mapper) CheckClientKey ¶ added in v0.6.0
CheckClientKey reports whether AniDB accepts the configured client key.
`request=main` is the cheapest call behind AniDB's client gate: no anime id, so nothing is looked up. A refused key is *subflux.AuthError; a ban or any other error envelope reports as an incomplete check, because waiting is a different remedy from fixing a field. An absent key is a refusal whose text says so — the key is optional and AnimeTosho searches by title without one.
func (*Mapper) ClientKeyVerdict ¶ added in v0.6.6
ClientKeyVerdict reports whether AniDB has said anything about the client key, by refusing it or by answering a request carrying it with data, and the refusal when it refused.
func (*Mapper) ForgetClientKeyVerdict ¶ added in v0.6.6
func (m *Mapper) ForgetClientKeyVerdict()
ForgetClientKeyVerdict drops AniDB's answer about the client key and the episode IDs cached under it, so the next episode lookup asks AniDB again and latches anew if it refuses.