diff options
Diffstat (limited to 'utils/api/streaming/types.go')
| -rw-r--r-- | utils/api/streaming/types.go | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/utils/api/streaming/types.go b/utils/api/streaming/types.go index 1b12da0..2310a76 100644 --- a/utils/api/streaming/types.go +++ b/utils/api/streaming/types.go @@ -1,38 +1,13 @@ package streaming -import "net/http" - -// AllAnimeClient provides methods for interacting with the AllAnime API -type AllAnimeClient struct { - client *http.Client - headers http.Header -} - -// AnimeStreamingSource represents a single streaming source for an episode -type AnimeStreamingSource struct { - URL string `json:"url"` - Server string `json:"server"` - Type string `json:"type"` // direct or embed -} - -// AnimeStreaming represents all available streaming sources for an episode -type AnimeStreaming struct { - Sub []AnimeStreamingSource `json:"sub"` - Dub []AnimeStreamingSource `json:"dub"` -} - -// StreamingSearchResult represents a search result from streaming providers -type StreamingSearchResult struct { - ID string `json:"_id"` - Name string `json:"name"` - SubEpisodes int `json:"sub_episodes"` - DubEpisodes int `json:"dub_episodes"` - Similarity float64 `json:"similarity"` -} - -// EpisodeStreamingResult contains streaming sources for a specific episode -// Used for parallel streaming source fetching -type EpisodeStreamingResult struct { - EpisodeNumber int - Streaming *AnimeStreaming +import ( + "net/http" + "time" +) + +type client struct { + httpClient *http.Client + headers http.Header + maxRetries int + backoff time.Duration } |
