feat: show video overlay with episode info in fullscreen
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user