sdaqo / anipy-cli

Little tool in python to watch and download anime from the terminal (the better way to watch anime). Also applicable as an API
https://sdaqo.github.io/anipy-cli
GNU General Public License v3.0
261 stars 39 forks source link

[Suggestion] option for reusing the video player window #72

Closed XaaRii closed 2 years ago

XaaRii commented 2 years ago

Currently, video player closes after each episode. I know it is intentional as anipy-cli waits for the player to close and then proceeds to fetch another link (in binge mode). In the normal mode it doesn't need to wait for the end of an episode though...

I think it would be great to have an option for using the same window over and over again (one reason for this feature could be discord streaming, which is locked on a window and closes with it).

This could be done by prefetching all/specified links (not sure if that's an option though, not sure if they expire or not) and then loading all links into some sort of playlist, which would go to the video player.

Another option that comes on mind would be creating some sort of a link between the player and anipy-cli and (on user interaction) feed it with new links.

I know what i'm suggesting is not as simple to perform, but i generally think it would be a greatly appreciated by anyone who likes to watch anime together with friends.

Thanks for taking your time to read this, even if it may be in vain.

sdaqo commented 2 years ago

Don't worry about it suggestions are always welcome! A interesting suggestion, I would probably use some python library to control the player, so this is possible. I will look into it.

Edit: And by the way you can use sync play to watch with your friends as well, use the -s flag

sdaqo commented 2 years ago

Ok, so I implemented it, go ahead and update anipy-cli. In the config there is now a new option, set it to True to use it. If you find any bugs or something that could be done better, let me know!

XaaRii commented 2 years ago

Wow, you're so quick. I already turned off my computer, but i'll try to wake up early and test it a bit before i'm off to vacation. Thanks again for this feature tho, it will be super duper useful.

XaaRii commented 2 years ago

It works really good! I had to go bughunting to find anything significant to report.

So, here are a few things i noticed:

I didn't test Syncplay and download features, atm i have no one to test syncplay with and i don't thing anything changed in the download part of the code.

sdaqo commented 2 years ago

Very nice, thank you for the report.

sdaqo commented 2 years ago

Ok so now, I fixed all of it, except of the personal config thing, yeah it will be a bit annoying changing it every time a new option is added, but coding is more so. Moreover the mpv resizing is standart in mpv look at this mpv script it might help you: https://gist.github.com/TheAMM/5e07ad787dd95d76131b61840f403a79. Also the seekbar now shows, on Linux that is idk about it working on windows since I don't have anything to test rn.

sdaqo commented 2 years ago

Alright closing this now as done.

XaaRii commented 2 years ago

Didn't know mpv supports lua scripts, thet's pretty cool. The resizing solution looks neat, will try that out when i get back home. That said, i'm also limited for the next week to raspbian only, but i'll set a reminder and check the navbar, out once i get home (altho i doubt it will differ from linux).

(probably unpopular opinion) Regarding the config file error, i see it as an advantage rather than a problem. At least i can get to know there are new options to play with.

XaaRii commented 2 years ago

So i did the classic python -m pip install git+https://github.com/sdaqo/anipy-cli to download from source. I haven't tested it much yet but i did try the seekbar. And the seekbar is indeed there... but the window persistence vanished (window acts like before, closes on video end or on episode change). And i did make sure it is still enabled in my config_personal

Also, i wanted to make sure i was running the latest version, but i couldn't find a way to check it locally (version arg isn't present and help arg doesn't show it, i also didn't find any file containing it)

VoidAny commented 2 years ago

You can check the version by using pip show anipy-cli

XaaRii commented 2 years ago

Sorry for late response, was a bit busy with irl things...

Alright, so pip show anipy-cli reports version 2.4.30 (thanks Dabbing-Guy)

That's all from my testings, thanks again for adding my suggestion, and take care.

XaaRii commented 2 years ago

Ehm, not sure how notifications work on closed issues, so I'll try one last time: This feature is not yet fixed, please at least rollback it to the previous state in which it worked (the one without seekbar) sorry if i'm being rude but it worked well before and now i'm getting pretty much ignored.

sdaqo commented 2 years ago

I don't have time (and no access to a computer) right now, you can install a specific version like so: pip Install anipy-cli==version here

sdaqo commented 2 years ago

sorry if i'm being rude but it worked well before and now i'm getting pretty much ignored.

Don't worry but this is a open source project and no one gets paid here to do anything, we do it because we like it. Here and on other repos you should keep that in mind.

XaaRii commented 2 years ago

I get it, all i wanted was at least some kind of a response (wouldn't be the first time github screwed me over with notifications, so i was a bit anxious about it). If i spare some time, i could go and try to fix it myself. Altho, i'd have to learn more about github's pull requests, as i am sort of a lone wolf in coding and never used it before. Anyways, huge thanks for your response and for your hard work on this project. And sorry once again for my anxious self.

sdaqo commented 2 years ago

Fixed in 2.4.31