Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ If the browser reaches the localhost callback page but curd does not continue au
- [MyAnimeList API](https://myanimelist.net/apiconfig/references/api/v2) - MyAnimeList OAuth and tracking sync
- [AniSkip API](https://api.aniskip.com/api-docs) - Get anime intro and outro timings
- [AllAnime Content](https://allanime.to/) - Fetch anime url
- [Senshi Project](https://senshi.live/) - Default provider with direct HLS streams and MAL-based catalog matching
- [Senshi Project](https://senshi.to/) - Default provider with Vidcloud HLS streams and MAL-based catalog matching
- [AniPub](https://anipub.xyz/) - Fast JSON catalog APIs with MegaPlay HLS streams
- [AniNeko Content](https://anineko.to/) - Alternative provider with soft/hard sub stream selection
- [Animepahe Content](https://animepahe.pw/) - Alternative provider for 1080p streams
Expand Down
2 changes: 1 addition & 1 deletion docs/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Document the decision in a short ADR before building. The compile-time registry

| Provider | Package | Notes |
|----------|---------|-------|
| Senshi | `internal/providers/senshi` | REST search/episodes, direct HLS from `/episode-embeds`, MAL id keys and `/posters/{mal_id}.webp` thumbnails |
| Senshi | `internal/providers/senshi` | REST search/episodes, Vidcloud source resolution with encrypted HLS proxying, and MAL id keys |
| AniPub | `internal/providers/anipub` | JSON search/info/details APIs, MegaPlay embed resolution via `/stream/getSources`, MAL id in `ExtraData` for tracker matching |
| AniNeko | `internal/providers/anineko` | AJAX search, HTML scrape, bibiemb/vibeplayer embed resolution, `SubStyle` / `HintResolver` |
| AllAnime | `internal/providers/allanime` | GraphQL search/episodes, parallel stream resolution, `HintResolver` |
Expand Down
10 changes: 9 additions & 1 deletion internal/providers/senshi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

const userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

var baseURL = "https://senshi.live"
var baseURL = "https://senshi.to"

func newRequest(method, rawURL string) (*http.Request, error) {
req, err := http.NewRequest(method, rawURL, nil)
Expand All @@ -22,6 +22,10 @@ func newRequest(method, rawURL string) (*http.Request, error) {
}
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Referer", baseURL+"/")
req.Header.Set("Accept", "application/json")
if strings.HasPrefix(rawURL, vidcloudSourcesBaseURL+"/") {
req.Header.Set("Origin", baseURL)
}
return req, nil
}

Expand All @@ -41,6 +45,10 @@ func fetchJSON(method, rawURL string, payload any, dest any) error {
}
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Referer", baseURL+"/")
req.Header.Set("Accept", "application/json")
if strings.HasPrefix(rawURL, vidcloudSourcesBaseURL+"/") {
req.Header.Set("Origin", baseURL)
}
if payload != nil {
req.Header.Set("Content-Type", "application/json")
}
Expand Down
Loading