Quran-cli icon indicating copy to clipboard operation
Quran-cli copied to clipboard

A Way to Pause and Stop mpv

Open BigFish2086 opened this issue 3 years ago • 6 comments

Provide a way to pause and stop the playing without just brutely killing the process may be like this ~ ❯ ps -ef | grep mpv | grep -v grep | awk '{print $2}' | xargs -n1 kill -9

BigFish2086 avatar Jul 18 '22 22:07 BigFish2086

Well, it would be better if there are shortcuts for pausing and resuming. Like, press p to pause and r to resume. What do you think?

Mostafa-wael avatar Jul 19 '22 05:07 Mostafa-wael

I actually had a very similar idea which is to have the q-cli be runing in a kind of a watching state like if you wish rustlings and user will be able to use commands like pause/stop instead of just seeing Fetching Data statement. Also, I though of another idea which is to have the q-cli --(paus/stop) to pause/stop the current running q-cli process if any. Which do you think is relatively easy to begin implemeting?

BigFish2086 avatar Jul 19 '22 08:07 BigFish2086

I think passing keystrokes to mpv will do best if possible.

GhiathAjam avatar Jul 20 '22 04:07 GhiathAjam

I actually had a very similar idea which is to have the q-cli be runing in a kind of a watching state like if you wish rustlings and user will be able to use commands like pause/stop instead of just seeing Fetching Data statement. Also, I though of another idea which is to have the q-cli --(paus/stop) to pause/stop the current running q-cli process if any. Which do you think is relatively easy to begin implemeting?

I think a watching state would be more user-friendly.

Mostafa-wael avatar Jul 20 '22 04:07 Mostafa-wael

What about showing the actually showing the mpv running app? Then the user can use its GUI to do the job.

BigFish2086 avatar Jul 21 '22 17:07 BigFish2086

When we developed the app, we agreed that we wanted it to be as simple and minimal as possible. showing MVP running was against this. we agreed that we wanted all the operations to be done through q-cli directly.

Mostafa-wael avatar Jul 21 '22 19:07 Mostafa-wael

Issue fixed, now you can toggle between pause and resume using p button and also can exist easily using q check this PR #15

ahmedihabb2 avatar Sep 28 '23 12:09 ahmedihabb2