Skip to content
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

Allow other programs using terminal to use ani-cli #872

Closed
sgtoutlaw opened this issue Aug 22, 2022 · 7 comments
Closed

Allow other programs using terminal to use ani-cli #872

sgtoutlaw opened this issue Aug 22, 2022 · 7 comments
Labels
priority 4: wishlist Default for feature requests type: feature request feature request

Comments

@sgtoutlaw
Copy link

Is your feature request related to a problem? Please describe.
There is a problem with trackma when it hooks ani-cli for play. It seems to keep opening and closing the episodes as it goes down the line until there are none left. I left a issue with them at

z411/trackma#637

Describe the solution you'd like
After trying to fix it for a while, I think I have come to the conclusion that when ani-cli tries to put up the after player launch menu, it tries to take over the terminal or something, and forces the current player to close?

Honestly I am a layman so I don't know the specifics, but originally I commented out your ending while loop at the end of the ani-cli script. This made it so that trackma seemed to work as intended but obviously now the menu after launching the player is gone if I use ani-cli alone.

Changed line 597 from
while : ; do
to
while [ -t 1 ] ; do

According to what I searched is supposed to check if ani-cli is active in the terminal, and then won't open the menu if it isn't.

There might be alternatives to this, and this might break something, but I don't know any programming so this is just me fiddling a little and seemed to fix my problem with trackma as well as allowed the menu to come up when directly using ani-cli.

I put this under feature request because technically this is causing an issue on trackma's end and there isn't anything wrong on your side.

@port19x
Copy link
Collaborator

port19x commented Aug 22, 2022

This is a valid feature request, but since we'll deprecate -a in 3.4 anyway you're better off migrating to a non-interactive alternative

@port19x
Copy link
Collaborator

port19x commented Aug 22, 2022

We do have trackma compatible titles, so I recommend just using the detection feature of trackma and viewing just through ani-cli.
That is a very common approach and better than your -a thing

@sgtoutlaw
Copy link
Author

The combination allowing me to browse my anilist for watching shows and play it right there instead of switching over somewhere else to look at my anilist so I know what to search is much more convenient to me.

Also I don't know how to have trackma open as a service or anything so I don't have to worry about opening a terminal and throwing it in some far off workspace so it doesn't get in my way every time I have to reboot my computer.

Either way, I will try my best to keep mine working.

Thanks for looking and letting me know.

@justchokingaround
Copy link
Collaborator

@sgtoutlaw
Copy link
Author

@justchokingaround that wrapper won't work with ani-cli with update 3.4 though will it?

@justchokingaround
Copy link
Collaborator

for your particular use case, that is watch anime from your list and update it accordingly, i'd recommend using the wrapper with animdl (which i set as the default); otherwise you can always edit the script to just print out the episode number and then select it iteratively for ani-cli v3.4+

@port19x port19x closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2022
@justchokingaround
Copy link
Collaborator

i meant interactively not iteratively, but i have monke brain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority 4: wishlist Default for feature requests type: feature request feature request
Projects
None yet
Development

No branches or pull requests

3 participants