Skip to content

fix: use ani-skip's AllAnime source for skip time lookups#1645

Open
synacktraa wants to merge 3 commits intopystardust:masterfrom
synacktraa:fix/ani-skip-allanime-integration
Open

fix: use ani-skip's AllAnime source for skip time lookups#1645
synacktraa wants to merge 3 commits intopystardust:masterfrom
synacktraa:fix/ani-skip-allanime-integration

Conversation

@synacktraa
Copy link
Copy Markdown

Related issue #1531

Problem

ani-skip's --query flag resolves anime titles through MAL's prefix search API, which frequently fails when given AllAnime display names. For example, ani-cli passes "1P" (AllAnime's name for One Piece) to ani-skip, but MAL has no idea what "1P" is. Same issue with season-specific titles that don't match MAL's naming.

Fix

ani-skip v1.1.0 added AllAnime as a source (-s allanime) and a direct ID flag (-i). Since ani-cli already has the AllAnime _id in $id, we can pass it directly instead of trying to fuzzy-match titles through MAL.

Two lines changed:

MAL ID resolution (line 544):

-[ "$skip_intro" = 1 ] && mal_id="$(ani-skip -q "${skip_title:-${title}}")"
+[ "$skip_intro" = 1 ] && mal_id="$(ani-skip -i "$id" -s allanime)"

Passes the AllAnime _id directly to ani-skip, which resolves it to a MAL ID via AllAnime's API. No more title fuzzy-matching.

Skip time fetch (line 310):

-[ "$skip_intro" = 1 ] && skip_flag="$(ani-skip -q "$mal_id" -e "$ep_no")"
+[ "$skip_intro" = 1 ] && skip_flag="$(ani-skip -i "$mal_id" -e "$ep_no")"

Uses -i instead of -q since $mal_id is a numeric ID. -q still works for this case but is being soft-deprecated for ID inputs in ani-skip.

Note on --skip-title

--skip-title / ANI_CLI_SKIP_TITLE is now unused since we no longer pass titles to ani-skip. Left it in for now to avoid breaking anyone's configs — can be removed in a future cleanup if you prefer.

Requires

ani-skip >= v1.1.0 (https://github.com/synacktraa/ani-skip/releases/tag/1.1.0)

Pass AllAnime _id directly to ani-skip instead of fuzzy-matching
titles through MAL's prefix search, which fails on AllAnime-specific
display names (e.g. "1P" for One Piece).

Requires ani-skip >= v1.1.0
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.

2 participants