-
Notifications
You must be signed in to change notification settings - Fork 554
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
fix: avoids reencoding the + while running time_until_next_ep #1445
base: master
Are you sure you want to change the base?
Conversation
the literal `+` representing spaces are encodes as %2B and they mangle the curl api call
Just seeing this now. It's on my radar, but it might take a couple more days until I take some time to fully review the issue and make sure there is no related problems |
I think passing the query directly in url instead of --data-urlencode should work |
or just replace --data-urlencode to --data-raw in that particular curl will also work |
and you can remove that just do --
both works |
Nice! Good suggestion, though waking up to like 8 notifications did make me concerned, lol |
LGTM.. |
Will test once I reach home |
Is working on my end FWIW |
Pull Request Template
Type of change
Description
Hey, it's me again. ha. I hope this one is simpler and a bit more well tested.
I noticed that checking for the next episode countdown only works when you use
-N
or--nextep-countdown
by itself and did not provide a search directly in the cli command.I narrowed down the reasoning to two things:
This snippet automatically replaces spaces with
+
ani-cli/ani-cli
Line 435 in f2e8112
and the
curl
in the function re-encodes the+
to become%2B
when I look the verbose curl output.ani-cli/ani-cli
Line 221 in f2e8112
The only reason that it works at all when using the built-in query picker is because the function is called one line before that query gets its spaces converted to
+
's. I suspect this was known about when the feature was added due to the function call placement, but the author didn't realize it didn't work for queries from the cliani-cli/ani-cli
Lines 479 to 481 in f2e8112
I do not know a lot about curl, so Idk if there's an easier way to avoid re-encoding the
+
during the call, I tried just removing the flag, but that broke harder, so I just decided to use sed to return the spaces.Note, I didn't test any anime that have a literal + in the title, I don't know if that exists even, so there's that.
Checklist
I don't really want to go through and click all of these, i only changed the -N function so it'll all work
--nextep-countdown
works-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