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

Closing mpv closes the whole application #16

Closed
LupSpie opened this issue Nov 17, 2022 · 2 comments
Closed

Closing mpv closes the whole application #16

LupSpie opened this issue Nov 17, 2022 · 2 comments

Comments

@LupSpie
Copy link

LupSpie commented Nov 17, 2022

Hello, I've just found this project and I absolutely love it! One small issue that I have with it though is that when you close the player through MPV it closes the whole application instead of just closing MPV like it does when pressing shift + s on the terminal.

I've also seen 34ad4bb, so I presume this is unexpected behavior that should not be happening?

Anyways, I hope this can get fixed 😄

@darkhz
Copy link
Owner

darkhz commented Nov 18, 2022

The reason invidtui also closes when MPV exits is because MPV is no longer listening to a socket anymore, so media playback wont work unless MPV is restarted with the correct parameters and socket path. This behavior is intentional.

For now, I propose just minimizing MPV (or controlling all media based operations via invidtui instead of MPV) while you use invidtui, since MPV will automatically switch between video and audio modes according to the media type (I'm assuming you attempt to exit the MPV player after watching a video, since that is the only time MPV's GUI is exposed to the user). For example, if you've just finished playing a video, and an audio-only media is next in your playlist, MPV's video player will automatically close.

I will work on a fix in the coming month, since I'm actively working on another project. Perhaps someone can file a PR by then? I'd be happy to merge it (after testing the patch, of course). A possible solution is to use a loop, launch MPV with parameters, wait for exit, and relaunch it again. Or perhaps if there's a setting in MPV that prevents it from exiting when the GUI is closed, that would be useful. An issue could be filed with MPV's git repo.

(Also, 34ad4bb is not related to this.)

@LupSpie
Copy link
Author

LupSpie commented Nov 18, 2022

(Also, 34ad4bb is not related to this.)

Ah, forgive me then. I read #5 (comment), and subsequent commit, and ended up misunderstanding it as being related to my issue.

@darkhz darkhz closed this as completed Jun 30, 2023
@darkhz darkhz reopened this Jun 30, 2023
@darkhz darkhz closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants