Mostafa-wael / Quran-cli

A simple command line interface for listening to Quran.

Home Page:https://www.npmjs.com/package/@quran-cli/q-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Way to Pause and Stop mpv

BigFish2086 opened this issue · 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

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?

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 passing keystrokes to mpv will do best if possible.

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.

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

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.

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