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
ani-cli V4 #955
ani-cli V4 #955
Conversation
What have I done... |
ani-cli
Outdated
printf "Selected link:\n%s\n" "$episode" | ||
;; | ||
mpv | iina) | ||
nohup "$player_function" --force-media-title="${allanime_title}episode-${ep_no}-${mode}" "$episode" > /dev/null & |
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.
consider removing the "&" at the end
I don't see a reason the menu should be shown when something is already playing and you can't interact with the player when rofi is open if you're using external menu
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.
Detaching from the main process is useful not only because this is the behaviour everyone got used to but this way the script's process can exit, and the player will stay open. I don't see a reason why we shouldn't.
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.
Then I saw how rofi works and I totally take back what I said. This commit should address the matter
What we're missing so far:
Tick off the list what you have implemented |
ani-cli
Outdated
-s | --syncplay) player_function=syncplay && shift ;; | ||
-q | --quality) quality="$2" && shift 2 ;; | ||
-c | --continue) search=history && shift ;; | ||
-d | --download) player_function=download && shift ;; | ||
-v | -V | --version) version_info ;; |
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.
I'd actually prefer if -v and -V would be used for vlc, as I think that function is used more frequently. Also I'd consider supporting case insensitive arguments for all other options, bc it requires no extra loc (but I'm open on this)
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.
good idea for vlc, will change that in the next commit. added long options in 3b19f3a
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.
Especially -v
needs to me vlc.
-V
is conventionally a shorthand for --version
.
Would also make sense with the heuristic that uppercase makes stuff outside the script.
I'll be overhauling the readme at my earliest convenience |
ani-cli
Outdated
player_function="${ANI_CLI_PLAYER:-flatpak_mpv}" | ||
else | ||
player_function="${ANI_CLI_PLAYER:-mpv}" | ||
fi ;; |
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.
since having flatpak mpv support is useful outside of steamdeck users (unlike iina, which is OSX only and unlike am launch which is android only) I'd consider making it an argument rather than dependant on the platform string
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.
We can default to mpv.
If it is not found check for flatpak mpv and use it if found.
In my opinion it would be easier for users. It shouldnt be a problem because both pacage managers have the same version and no exclusive features, so it makes no sense to have both installed at the same time.
ani-cli
Outdated
if flatpak info io.mpv.Mpv 2>&1 | grep -q 'error'; then | ||
die "Program \"$dep\" not found. Please install it." | ||
fi | ||
fi |
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.
I don't understand the logic here, it appears to me that you check for flatpak mpv whenever any dependency is missing. This would be bad because if flatpak mpv is present, it would mask out a missing dependency, eg. grep.
I'm afraid flatpak programs need to be handled separately, if I understand this correctly
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.
oh, you are right. Its a bad code
Could also you add line numbers to the search results? V4 is awesome, thanks for your work! |
Should be pretty easy. We'd just need to pipe through |
I'd like to not squash all the commits into one when merging to master this time. Objections? |
im in favor |
Seeing as basic functionality works now and most rough edges are smoothed out I'd like to invite testing by the broader userbase. Ready for review |
Trying to use iina on MacOS results in:"Error Cannot open file or stream" ... |
No, not ready. Android is broken, history is missing. I'm against releasing incomplete code. This is a volunteer project, there are no deadlines so we should take our time. It'll be worth it for all the issues we won't get because of the incomplete state. A compromise could be to update the readme with a statement of v4, instructions on how to upgrade and a list of features still missing. |
Uh, nvm then. |
Will V4 support watching the dubbed versions of shows? |
Yus by using dedicated flag or environment variable... |
i just wanna say i'm in love with v4 have had no real hiccups to write about! the only thing i wish it had right now was the ability to fetch the dubs. but wanted to chime in and say absolutely love it and can't wait for actual release! |
You already can by setting the environment variable |
It works even better than V3 and I love the fzf interface. The only thing I miss is the ability to resume my place in the series but I know that is being worked on. Thank you for creating such an awesome script! |
Will there be any documentation on environment variables for |
well that's out of the way |
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.
There's some misspellings (Such as "Controll" having 2 l
s), but everything so far looks good to me
Could anyone change the vsersion on the PNG |
yup, you're correct, nice catch, i'll fix it in 10 mins (edit: fixed) |
Today I'll do:
The merge is getting closer |
I can now confirm that all features documented via Only thing I can complain about is that we dropped |
|
That is handled with the We should think about how we document our advanced features that are accessible via env-vars only. |
Note : Vlc Android now works too ;) | ||
For players you can use the apk (playstore/fdroid) versions of mpv and vlc. Note that these cannot be checked from termux so a warning is generated when checking dependencies. | ||
|
||
### Steam Deck |
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.
I agree. Having all this in the main readme is a bit much.
<details>
could also be a solution, so it's hidden by default but can be folded out.
search="${ANI_CLI_DEFAULT_SOURCE:-scrape}" | ||
|
||
while [ $# -gt 0 ]; do | ||
case "$1" in |
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.
Or maybe that could be a fallback?
Not sure how you would handle that gracefully.
Currently the only option is to set it via envvar.
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
+ docs: remove old deps and add syntax to code blocks + docs: acknowledging history disappearence + docs: missing fzf in brew installation + docs: windows instructions for v4 + docs: termux instructions for v4 Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Rebase done. |
Can we merge now? |
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.
Forgot to create additional comments for other misspellings
+ docs: remove v3.4 stuff + docs: dmenu -> rofi dmenu (dmenu doesn't support multi) + docs: remove "new in v4" Co-authored-by: archeite <121004047+archeite@users.noreply.github.com> Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
The version variable inside the script should always be major.minor.patch major.minor releases are reserved for native packages and tags/releases Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
Pull Request Template
Type of change
Rewrite
closes #948
Description
V4 will be a full rewrite, using scraping code written by @CoolnsX and ui/ux code written by @justchokingaround
This will help us pay off the technical debt that has accumulated in ani-cli over the past one and a half year and will let us implement what we learned from experience.
It might even chop our LOC in half.
For users the most significant change will be the introduction of a fully fzf based UI.
We will also make sure that our core features, such as our deep history integration and syncplay support, stay and maybe get even more plentiful in the process.
Checklist
Additional Testcases