feat: retain anime in -c without new episodes and show nextep countdown#1705
Closed
sghoshm wants to merge 1 commit into
Closed
feat: retain anime in -c without new episodes and show nextep countdown#1705sghoshm wants to merge 1 commit into
sghoshm wants to merge 1 commit into
Conversation
…emoon provider (pystardust#1691) Co-authored-by: zen <71zenith@proton.me> Co-authored-by: PlexTDM <tengisteka0631@gmail.com>
Collaborator
|
What happened here that this is a PR that adds a provider on top of your own feature PR? |
Author
|
Ah, good catch... that wasn’t intentional. I created the branch on top of a commit that already included the provider changes, so it ended up in this PR as well. I’ll clean this up and update the PR to only include the -c / nextep integration changes. |
Author
|
Closing this PR in favor of a clean version without unrelated provider changes. New PR: #1707 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type of change
Description
This PR improves the behavior of
-c(continue watching) for ongoing anime.Background
While using
ani-cli -c, I noticed that ongoing anime disappear from the history menu when there is no new episode available. This makes it difficult to:This PR is based on the feature request by @port19x (Mar 14), suggesting that ongoing anime should remain selectable and trigger nextep countdown when selected.
What this PR changes
-cmenu even if no new episode existsImplementation details
episodes_listto determine if a next episode existstime_until_next_epAdditional improvements:
&)awktime_until_next_ep():Issues faced during development
Race condition in history processing
Background execution caused inconsistent and corrupted titles
Title parsing issues
Re-parsing formatted strings led to broken titles (e.g.
1P)Shell compatibility
Some constructs worked in bash but failed under
/bin/shAPI inconsistency
animescheduledoes not always return countdown data→ handled with fallback instead of failing silently
Testing
Tested manually across multiple flows:
Core feature
ani-cli -cPlayback regression
ani-cli one pieceani-cli detective conan→ playback unaffected
Nextep
ani-cli -N one piece→ returns countdown or fallback (never empty output)
Edge cases
Why this approach
episodes_list, nextep)Credits
Shoutout to @port19x for the original idea and discussion — this implementation is based on that suggestion 👍
Checklist
-chistory and continue work-ddownloads work-ssyncplay works-qquality works-vvlc works-e(select episode) aka-r(range selection) works-Sselect index works--skipani-skip works--skip-titleani-skip title argument works--no-detachno detach works--exit-after-playauto exit after playing works--nextep-countdowncountdown to next ep works--duband regular (sub) mode both work-hhelp info is up to dateAdditional Testcases