You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remember dub/sub mode in history and resume correctly with -c
Type of change
Bug fix
Feature
Documentation update
Description
This PR fixes an issue where the history mechanism (ani-cli -c) would not remember if the user was watching the dub or sub version of an anime, causing it to incorrectly default to sub when resuming.
Background
While using ani-cli -c, the CLI reads from the ani-hsts file which originally only stored ep_no, id, and title. Because mode (sub/dub) wasn't saved to history, continuing an anime would always use the globally set mode (which defaults to sub), forcing users to manually add the --dub flag every time they wanted to resume a dubbed anime.
What this PR changes
ani-cli now securely stores the mode parameter (sub or dub) as an additional field in the ani-hsts history file.
The -c interactive menu properly extracts the tracked mode and seamlessly restores the user's preference when fetching the next episode.
The history prompt interface has been upgraded to display the tracked mode, showing a clear visual indicator like (dub) or (sub) alongside the title and episode number.
Testing
Tested manually: Core feature
ani-cli --dub [anime] → plays dubbed episode and records mode in history ✓
ani-cli -c → correctly shows [Anime Title] - episode X (dub) in the menu and successfully fetches/plays dubbed episodes upon selection ✓
Regression
Legacy history entries (from previous versions of ani-cli) load perfectly, reconstruct the title without issues, and default to sub ✓
Normal subbed playback functions correctly and updates history with sub ✓
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)
port19x
changed the title
feat: add support for dubbed/subbed status in history and bump versio…
feat: add support for dubbed/subbed status in history
May 6, 2026
I don't like this.
Generally you're either a dub user or sub user.
You can alias ani-cli to be ani-cli --dub, the issue of whether to use sub or dub is orthogonal to history imo.
The history file format hasn't been changed in a long time and I'm not comfortable changing it for something this minor.
The alias approach doesn't work for users who watch some shows dubbed and some subbed, the mode is per-show, not a global preference. History is meant to make -c frictionless, requiring manual --dub every resume is exactly the friction it exists to remove.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: remember dub/sub mode in history and resume correctly with -c
Type of change
Description
This PR fixes an issue where the history mechanism (
ani-cli -c) would not remember if the user was watching the dub or sub version of an anime, causing it to incorrectly default tosubwhen resuming.Background
While using
ani-cli -c, the CLI reads from theani-hstsfile which originally only storedep_no,id, andtitle. Becausemode(sub/dub) wasn't saved to history, continuing an anime would always use the globally set mode (which defaults tosub), forcing users to manually add the--dubflag every time they wanted to resume a dubbed anime.What this PR changes
ani-clinow securely stores themodeparameter (sub or dub) as an additional field in theani-hstshistory file.-cinteractive menu properly extracts the tracked mode and seamlessly restores the user's preference when fetching the next episode.(dub)or(sub)alongside the title and episode number.Testing
Tested manually:
Core feature
ani-cli --dub [anime]→ plays dubbed episode and records mode in history ✓ani-cli -c→ correctly shows[Anime Title] - episode X (dub)in the menu and successfully fetches/plays dubbed episodes upon selection ✓Regression
sub✓sub✓Checklist
Additional Testcases