Skip to content

fix: update api_resp req including query_hash and origin, and add filemoon provider#1691

Merged
justchokingaround merged 10 commits intopystardust:masterfrom
justchokingaround:allanime-fix
May 1, 2026
Merged

fix: update api_resp req including query_hash and origin, and add filemoon provider#1691
justchokingaround merged 10 commits intopystardust:masterfrom
justchokingaround:allanime-fix

Conversation

@justchokingaround
Copy link
Copy Markdown
Collaborator

@justchokingaround justchokingaround commented Apr 27, 2026

Pull Request Template

Type of change

  • Bug fix
  • Feature
  • Documentation update

Description

ramble here

Checklist

  • any anime playing
  • bumped version

  • next, prev and replay work
  • -c history and continue work
  • -d downloads work
  • -s syncplay works
  • -q quality works
  • -v vlc works
  • -e (select episode) aka -r (range selection) works
  • -S select index works
  • --skip ani-skip works
  • --skip-title ani-skip title argument works
  • --no-detach no detach works
  • --exit-after-play auto exit after playing works
  • --nextep-countdown countdown to next ep works
  • --dub and regular (sub) mode both work
  • all providers return links (not necessarily on a single anime, use debug mode to confirm)

  • -h help info is up to date
  • Readme is up to date
  • Man page is up to date

Additional Testcases

  • The safe bet: One Piece
  • Episode 0: Saenai Heroine no Sodatekata ♭
  • Unicode: Saenai Heroine no Sodatekata ♭
  • Non-whole episodes: Tensei shitara slime datta ken (ep. 24.5, ep. 24.9)
  • All Providers: Youkoso Jitsuryoku Shijou Shugi no Kyoushitsu e (TV) (3 m3u8, 3 mp4, 1 fast4speed, 1 sharepoint)
  • The examples of the help text

The Allanime API changed encryption on 2026-04-22.
- Base key: SimtVuagFbGR2K7P -> Xot36i3lK3:v1
  (now includes ":v1" suffix, derived via SHA-256)
- Blob format: [version:1][IV:12][ciphertext][auth_tag:16]
  (was: [IV:12][plaintext] — version byte was skipped)
- Ciphertext length: explicit ct_len = file_size - 13 - 16
  (was: read entire rest, including GCM auth tag)
- Version bump: 4.12.0 -> 4.13.0
@justchokingaround
Copy link
Copy Markdown
Collaborator Author

ig #1690 was first with the referrer fix, so maybe we can just close that pr and add him as co-author here

@Derisis13
Copy link
Copy Markdown
Collaborator

More than 650 lines... (cries quietly)

@sahil-k-george
Copy link
Copy Markdown

Do check this pull request please #justchokingaround/pull/11

@Kaukov
Copy link
Copy Markdown

Kaukov commented Apr 28, 2026

I just tested the latest diff of this PR (+65 -5) against v4.13.0 on NixOS and it works perfectly. Thank you for the fix!

Copy link
Copy Markdown

@truelockmc truelockmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, this fixes #1699 (duplicate), #1695 and #1662

@Derisis13 Derisis13 closed this Apr 28, 2026
@Derisis13
Copy link
Copy Markdown
Collaborator

Derisis13 commented Apr 28, 2026

Did not work on termux, not even old stuff.
(Closure was accidental)

@Derisis13 Derisis13 reopened this Apr 28, 2026
Copy link
Copy Markdown
Collaborator

@Derisis13 Derisis13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unnecessary shellcheck disable statements, then you're clear for a merge. Termux not working is a casualty we can take for now, as it works on linux (I suspect referrer-free links were purged for good).

Comment thread ani-cli Outdated
Comment thread ani-cli
Comment thread ani-cli Outdated
Comment thread ani-cli
Comment thread ani-cli
@Derisis13
Copy link
Copy Markdown
Collaborator

Actually, there's another unused ignore at line 486, please remove that as well if you're at it

@Derisis13
Copy link
Copy Markdown
Collaborator

Please remove the unnecessary shellcheck disable statements, then you're clear for a merge. Termux not working is a casualty we can take for now, as it works on linux (I suspect referrer-free links were purged for good).

Actually, now that I look into it, yt is the only type of link we get. I suppose that's a problem, but may be adressable by a minor version?

emilindqvist added a commit to emilindqvist/ani-cli-hejhej that referenced this pull request Apr 29, 2026
Apply PR pystardust#1691 hunk targeting get_episode_url. AllAnime API
started returning NEED_CAPTCHA on plain POST queries. Switch
primary request to GET with persistedQuery hash and Origin
header, fall back to original POST if response lacks tobeparsed.
Copy link
Copy Markdown
Collaborator

@Derisis13 Derisis13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still seems to be only getting Yt links, but better than nothing

@71zenith
Copy link
Copy Markdown
Collaborator

71zenith commented May 1, 2026

Now returns sharepoint links as well making it usable on termux.

@justchokingaround justchokingaround changed the title fix: update api_resp req including query_hash and origin, and add filemoon provider fix: update api_resp req including query_hash and origin, and add filemoon provider Co-authored-by: @PlexTDM May 1, 2026
@justchokingaround justchokingaround changed the title fix: update api_resp req including query_hash and origin, and add filemoon provider Co-authored-by: @PlexTDM fix: update api_resp req including query_hash and origin, and add filemoon provider May 1, 2026
@justchokingaround justchokingaround merged commit 6803b8a into pystardust:master May 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants