This commit introduces a durable object to handle Anilist GraphQL requests, with the goal of preventing request duplication.
The durable object is designed to cache responses from the Anilist API, with a TTL based on the `nextAiringEpisode` field in the response.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Removes the `Env` parameter from several functions to simplify their signatures and rely on the global `env` for configuration.
This change reduces the number of arguments passed around, making the code cleaner and easier to maintain.
Removes Consumet and consolidates episode fetching to use Aniwatch as the sole provider.
This simplifies the codebase and ensures a consistent data source for episodes and URLs.
Also updates `wrangler` and sets `ENABLE_ANIFY` to false.
Cleans up the code by removing console log statements used for debugging during the title matching process. This improves code readability and avoids unnecessary logging in the production environment.
Updates various dependencies to their latest versions, addressing potential bugs and security vulnerabilities. Specifically, it updates the libsql client to address an identified issue.
- Enhances title matching accuracy when fetching Aniwatch IDs.
- Prioritizes user-preferred titles and falls back to English titles.
- Ensures only one fetch call is made per title if both english and userPreferred title are same.
- Adds a score threshold to filter low-quality matches.
- Fixes a bug where the episode list was not being returned.
Refactors episode source fetching to handle multiple servers.
It now attempts to retrieve the episode URL from multiple servers if the initial request fails, improving the chances of finding a valid source.