feat: show video overlay with episode info in fullscreen

This commit is contained in:
2026-04-26 23:10:23 +02:00
parent a6c4b0c388
commit 19481caeec
6 changed files with 65 additions and 27 deletions

View File

@@ -18,3 +18,12 @@ func (c *Client) GetEpisodes(ctx context.Context, animeID int, page int) (Episod
err := c.getWithCache(ctx, cacheKey, 12*time.Hour, reqURL, &result)
return result, err
}
func (c *Client) GetEpisode(ctx context.Context, animeID int, episode int) (EpisodeResponse, error) {
cacheKey := fmt.Sprintf("anime:%d:episode:%d", animeID, episode)
var result EpisodeResponse
reqURL := fmt.Sprintf("%s/anime/%d/episodes/%d", c.baseURL, animeID, episode)
err := c.getWithCache(ctx, cacheKey, 24*time.Hour, reqURL, &result)
return result, err
}

View File

@@ -168,6 +168,10 @@ type EpisodesResponse struct {
Pagination Pagination `json:"pagination"`
}
type EpisodeResponse struct {
Data Episode `json:"data"`
}
type JikanRelationEntry struct {
MalID int `json:"mal_id"`
Type string `json:"type"`