rjw57 / yt

Experiments with the YouTube API
MIT License
83 stars 25 forks source link

mpv has no novideo option #48

Closed DragonGhost7 closed 3 years ago

DragonGhost7 commented 5 years ago

In the code, the function play_url_mpv takes novideo as an argument but does nothing with it.I scripted a solution resembling other function, as i found that mpv has a --no-video option. It looks like this:

def play_url_mpv(url, novideo): if novideo: player = subprocess.Popen(['mpv', '--really-quiet',' ', '--no-video', '--', url], stdout = subprocess.PIPE, stderr = subprocess.PIPE) player.wait() else: player = subprocess.Popen(['mpv', '--really-quiet','--', url], stdout = subprocess.PIPE, stderr = subprocess.PIPE) player.wait()

It is not pretty, but it gets the work done. Problem is that while in no video mode, mpv stops taking keyboard input thru yt for whatever reason.

Any ideas?