feat: add episode classification domain interfaces
This commit is contained in:
@@ -34,16 +34,17 @@ type CanonicalEpisode struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CanonicalEpisodeList struct {
|
type CanonicalEpisodeList struct {
|
||||||
AnimeID int `json:"anime_id"`
|
AnimeID int `json:"anime_id"`
|
||||||
Episodes []CanonicalEpisode `json:"episodes"`
|
Episodes []CanonicalEpisode `json:"episodes"`
|
||||||
Source string `json:"source"`
|
Source string `json:"source"`
|
||||||
AvailabilityVersion int `json:"availability_version,omitempty"`
|
AvailabilityVersion int `json:"availability_version,omitempty"`
|
||||||
ReleaseChecked bool `json:"release_checked,omitempty"`
|
ClassificationChecked bool `json:"classification_checked,omitempty"`
|
||||||
NextRefreshAt string `json:"next_refresh_at,omitempty"`
|
ReleaseChecked bool `json:"release_checked,omitempty"`
|
||||||
RetryUntilAt string `json:"retry_until_at,omitempty"`
|
NextRefreshAt string `json:"next_refresh_at,omitempty"`
|
||||||
LastAttemptAt string `json:"last_attempt_at,omitempty"`
|
RetryUntilAt string `json:"retry_until_at,omitempty"`
|
||||||
LastSuccessAt string `json:"last_success_at,omitempty"`
|
LastAttemptAt string `json:"last_attempt_at,omitempty"`
|
||||||
FailureCount int64 `json:"failure_count,omitempty"`
|
LastSuccessAt string `json:"last_success_at,omitempty"`
|
||||||
|
FailureCount int64 `json:"failure_count,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type EpisodeService interface {
|
type EpisodeService interface {
|
||||||
@@ -54,3 +55,7 @@ type EpisodeService interface {
|
|||||||
type EpisodeTitleService interface {
|
type EpisodeTitleService interface {
|
||||||
EnrichEpisodeTitles(ctx context.Context, anime Anime) (CanonicalEpisodeList, error)
|
EnrichEpisodeTitles(ctx context.Context, anime Anime) (CanonicalEpisodeList, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EpisodeClassificationService interface {
|
||||||
|
EnrichEpisodeClassifications(ctx context.Context, anime Anime) (CanonicalEpisodeList, error)
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ type PlaybackEpisodeTitleService interface {
|
|||||||
EnrichEpisodeTitles(ctx context.Context, animeID int) ([]CanonicalEpisode, error)
|
EnrichEpisodeTitles(ctx context.Context, animeID int) ([]CanonicalEpisode, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PlaybackEpisodeClassificationService interface {
|
||||||
|
EnrichEpisodeClassifications(ctx context.Context, animeID int) ([]CanonicalEpisode, error)
|
||||||
|
}
|
||||||
|
|
||||||
type WatchPageData struct {
|
type WatchPageData struct {
|
||||||
WatchData WatchData
|
WatchData WatchData
|
||||||
Anime Anime
|
Anime Anime
|
||||||
|
|||||||
Reference in New Issue
Block a user