-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add flag to allow adding an new anime to the histfile #1332
Conversation
@@ -432,8 +452,7 @@ case "$search" in | |||
resfile="$(mktemp)" | |||
grep "$result" "$histfile" >"$resfile" | |||
read -r ep_no id title <"$resfile" | |||
ep_list=$(episodes_list "$id") | |||
ep_no=$(printf "%s" "$ep_list" | sed -n "/^${ep_no}$/{n;p;}") 2>/dev/null | |||
process_hist_entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems line L435 and 436 is actually duplicating process_hist_entry
I kinda get it, but I don't think this feature is desirable to a broader audience |
Why not though? We do have the So I feel that it makes sense to bolster the history-based flow by adding this feature. |
This feature is not that bad, but the implementation was way too many loc. @port19x would you be against it if it were below 15 lines total? |
We most definitely support history based flow, but I believe it's unwise to let ani-cli feature-creep into a local anilist equivalent. |
+1 |
Pull Request Template
Type of change
Description
A use case that I frequently have is that I want to add an anime to my histfile so that I can watch it later.
This PR adds a flag
-a/--add
which allows us to simply add the anime without playing the episode.For these animes, we use
unwatched
to signify the "ep_no" field in the histfile.When parsing the histfile, we select the first episode in the episode list
This flag only significant in the case of using
-c
later.Standard operations of
ani-cli
have no interaction with this flag.PS: I tried running
shfmt
, but it is flagging a lot of changes in the latest masterChecklist
-c
history and continue work-d
downloads work-s
syncplay works-q
quality works-v
vlc works-e
select episode works-S
select index works-r
range selection works--skip
ani-skip works--skip-title
ani-skip title argument works--no-detach
no detach works--dub
and regular (sub) mode both work-h
help info is up to dateAdditional Testcases