pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.34k stars 530 forks source link

feat: Add flag to allow adding an new anime to the histfile #1332

Closed 0WN463 closed 1 month ago

0WN463 commented 1 month ago

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 master

Checklist

Additional Testcases

port19x commented 1 month ago

I kinda get it, but I don't think this feature is desirable to a broader audience

0WN463 commented 1 month ago

Why not though?

We do have the -D, --delete flag, which only deletes the history, so we do consider user flows which uses the history. The delete flag only makes sense in the history-based flow, so it means we are support this flow.

So I feel that it makes sense to bolster the history-based flow by adding this feature.

Derisis13 commented 1 month ago

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?

port19x commented 1 month ago

We most definitely support history based flow, but I believe it's unwise to let ani-cli feature-creep into a local anilist equivalent. We can add it if derisis sees value, especially if we get it down to say +20 loc

71zenith commented 1 month ago

+1 This is a bit too niche of a feature, i doubt anyone would be deep into this workflow.