feat: add mpv playlist support#1755
Conversation
|
This has been a desired feature for multi-ep handling in the past, but I can tell you right now that we're not merging a +89-15 diff |
|
If you're willing, playlist support for syncplay would also be valuable |
|
So the size alone would be disqualifying? What size would be suitable? A decent bit of the diff comes from extracting the title into "$media_title" and extracting the play_episode mpv case into The changes outside of extracting in
|
|
We have a strong preference for brevity and consistently apply this priority to choose what feature requests to accept or reject. This is because ani-cli is a finished product and well into the maintenance phase from a lifecycle standpoint, so if we never add another feature again it's still a success. It should be noted that modifications to the readme and the man page don't count towards this limit |
|
To explain why I think this feature is very desirable:
But either way, I understand the concern. Just let me know if there is something I can do to make it meet the requirements, like how much more concise it would need to be etc. cause I do think people would appreciate this feature, otherwise I am happy just using my personal fork. |
|
I don't want to completely say no to this feature, I beleive it could be rather useful; as a refactor. Making it another bolt-on feature would be coutraproductive in my opinion too. The way I would've approached it would have been to spawn a player process at startup, and only terminate it on shutdown. Next, previous, replay and list would be handled by socket commands to this player process. The issue was downloading. Implementing socket control for download would be ridiculous, but since downloanding was modified to quit after the requested episodes were downloaded, it can separate early in the control flow, and maybe not require too much extra code. The other issue is android, @CoolnsX probably has the best idea if it'd work there or not. iSH is broken anyway, so I wouldn't sweat that. So my personal approach would be to get rid of the old way of playing in favor of the new, make it so that it works with VLC, see if it works out or not, and then merge after a ton of testing. |
Pull Request Template
Type of change
Description
Added an option
-por--playlistwhich adds episodes to a single mpv instance's playlist instead of spawning a new instance each episode. A new episode is only added to the mpv playlist when you have reached the last playlist entry and you haven't reached the end of the range i.e.get_episode_urlwill only run as needed to avoid spamming.I neglected to update the README/Manpage yet because I am wondering about the implications of me adding the dependency
socatfor listening to the mpv IPC unix socket. Is this dependency justified? I am not familiar with how ani-cli works Windows and it seems like won't support this unix socket approach. In that case usingnetcator something for tcp sockets could be best? Or would this be fine as unix only for now? And if no dependencies are justified for this then it could be possibly reworked with fifos and an mpv lua script, but since they block I think that would be more complicated with the current code structure, and that would still be unix only.Anyways, I wanted to ask before messing with it more as I am happy with where this is at for my own purposes. Let me know if there are any suggestions or required changes
Checklist
-chistory and continue work-ddownloads work-ssyncplay works-qquality works-vvlc works-e(select episode) aka-r(range selection) works-Sselect index works--skipani-skip works--skip-titleani-skip title argument works--no-detachno detach works--exit-after-playauto exit after playing works--nextep-countdowncountdown to next ep works--duband regular (sub) mode both work-hhelp info is up to dateAdditional Testcases