Commit Graph

285 Commits

Author SHA1 Message Date
f6a3ea2649 fix(anilist): ️ improve SSE streaming
Fixes issues with SSE streaming by explicitly setting the content type and encoding headers.

Also, removes unnecessary destructuring in fetchEpisodes.
2025-10-31 13:13:34 -04:00
26037d592e test: mock Cloudflare worker environment
Adds a mock for cloudflare workers to enable testing
of code that relies on the cloudflare workers environment.
2025-08-10 19:52:54 -04:00
6de8c594b7 chore: Adds .env to .gitignore
Adds the `.env` file to the `.gitignore` to prevent accidental commits of environment variables.
2025-08-10 19:52:07 -04:00
8175d73df1 refactor: ♻️emoves Env parameter
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.
2025-08-10 19:22:14 -04:00
0b0078328c fix(aniplay): Migrates to Aniwatch only
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.
2025-08-08 08:17:47 -07:00
d680c97bc6 Removes console logs from title matching
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.
2025-04-23 10:21:26 -04:00
9c51aaa2b5 chore: updates dependencies, including libsql
Updates various dependencies to their latest versions, addressing potential bugs and security vulnerabilities. Specifically, it updates the libsql client to address an identified issue.
2025-04-23 10:16:44 -04:00
99f37a0684 fix: freeze zx version
Should hopefully unblock deployment
2025-04-23 10:09:46 -04:00
e71177acc7 delete test file 2025-04-23 10:03:04 -04:00
b8ae211956 feat(aniwatch): Improves title matching logic
- 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.
2025-04-23 09:49:06 -04:00
00720565b4 feat: update Aniwatch provider to include headers 2025-04-08 08:41:57 -04:00
d1306f06ba Improves episode source retrieval from Aniwatch
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.
2025-03-06 09:35:10 -05:00
d589087ad9 fix: limit search query for aniwatch to 100 characters
more than that and the search fails automatically with a 404
2025-01-15 02:48:49 -05:00
da8a81a777 fix: return null for anify provider if filtered episodes returning nothing 2025-01-15 02:48:10 -05:00
51bfad78ce fix: filter out animepahe in anify
issue with animepahe is can't skip ahead (most likely because of the missing header that's not being used)
2025-01-15 02:47:41 -05:00
c7d8f3ffa4 feat: add id to User 2024-11-17 09:44:09 -05:00
d6a27e1fa4 fix: treat title as "unreleased" if title is too far away to schedule 2024-11-14 07:42:55 -05:00
ce82ae8990 feat: return user data when marking episode as watched 2024-11-14 07:37:04 -05:00
0a07cdc415 fix: upcoming query not working 2024-11-02 18:24:32 -04:00
6a2daa7995 fix: issues in aniwatch.ts 2024-10-29 07:49:33 -04:00
da7c843e72 fix: task for anilist-updates not encoding body in base 64 2024-10-29 07:47:54 -04:00
c5a536d87e style: add await to all writeSSE calls 2024-10-29 07:44:31 -04:00
fc6cfdbeda chore: update hono 2024-10-29 07:44:05 -04:00
275a03210b fix: update search snapshot 2024-10-28 06:37:00 -04:00
7b16066a63 fix: "upcoming" query not using correct sort operator 2024-10-28 05:32:50 -04:00
4c784e9038 fix: popular category response properly supports pagination 2024-10-28 05:08:52 -04:00
9fafa5b45d feat: improve title searching algorithm for aniwatch 2024-10-28 05:08:23 -04:00
c2411975d5 fix: incorrect key sent for popular titles 2024-10-28 05:07:28 -04:00
592cc08853 feat: create routes to load popular titles 2024-10-27 13:59:49 -04:00
99963083f0 refactor: do title conversion server side 2024-10-27 09:27:27 -04:00
2ec61b7332 fix: device id not being read correctly in "mark episode as watched" route 2024-10-27 08:53:25 -04:00
c6904eb7a5 fix: missing mock 2024-10-27 08:49:36 -04:00
2dcf8630ab fix: improve error logging
Cloudflare doesn't log causes, only the messages so splitting the logs in to 2
2024-10-27 08:49:31 -04:00
34958cfa69 chore: log which title is being selected when loading aniwatch 2024-10-27 08:41:16 -04:00
5ef3e8c970 feat: change aniwatch source to be the first source to check 2024-10-27 08:40:42 -04:00
5a4c44130f fix: exclude "blue lock s2" from anify 2024-10-27 08:40:24 -04:00
842b657c00 fix: update mocks 2024-10-24 08:54:18 -04:00
59a7a5f8d4 fix: tweak aniwatch call to support tower of god s2 being split into 2 2024-10-24 08:51:46 -04:00
882f9b1843 chore: update aniwatch calls
aniwatch API had breaking changes
2024-10-24 08:51:26 -04:00
f3bd6eb9cc fix: have script check if no next airing episode
make sure if "trigger latest episode" is enabled, it runs even if no next airing episode for the title
2024-10-23 09:03:43 -04:00
f8889eb550 fix: make sure to check body with hashed queue task name 2024-10-23 09:00:39 -04:00
1869771716 fix: if failed to validate body, trigger hashed task name flow 2024-10-22 08:20:03 +02:00
42c041a4e0 fix: hash task name when failing to queue new task
this should help with gcp cloud task deduplication causing 409 errors
2024-10-21 18:42:29 +08:00
2a4e8144c4 chore: create script to print new google auth token for testing 2024-10-21 18:41:12 +08:00
7f8fd882aa fix: throws "failed to queue" error when task already exists 2024-10-16 08:17:59 +08:00
37cf7bd738 fix: cloud tasks not being queued and failing silently 2024-10-14 08:28:22 +08:00
91dd250823 feat: create route to be able to mark episode as watched 2024-10-10 12:52:22 +02:00
223c2f1e4c add re-zero s3 to anify denylist 2024-10-06 18:41:27 -04:00
8a20b72bcb fix: update queue name for anilist updates 2024-10-06 18:41:09 -04:00
5f978205c4 remove taskId from optional args of queueTask 2024-10-06 08:48:43 -04:00