diff --git a/install.sh b/install.sh index cff8d9c..dbe59a5 100755 --- a/install.sh +++ b/install.sh @@ -13,4 +13,3 @@ sudo mkdir /etc/chromium-browser/native-messaging-hosts sudo cp native/run_omx.json /etc/chromium-browser/native-messaging-hosts/ chromium-browser chrome://extensions & sudo leafpad /etc/chromium-browser/native-messaging-hosts/run_omx.json - diff --git a/native/rpi-youtube_5.0.0-1.deb b/native/rpi-youtube_5.0.0-1.deb deleted file mode 100644 index d1380e1..0000000 Binary files a/native/rpi-youtube_5.0.0-1.deb and /dev/null differ diff --git a/native/rpi-youtube_5.0.1-1.deb b/native/rpi-youtube_5.0.1-1.deb new file mode 100644 index 0000000..fc10517 Binary files /dev/null and b/native/rpi-youtube_5.0.1-1.deb differ diff --git a/native/run_omxplayer.py b/native/run_omxplayer.py index dd29e09..7a34cfe 100755 --- a/native/run_omxplayer.py +++ b/native/run_omxplayer.py @@ -48,6 +48,6 @@ def read_thread_func(): try: urllib2.urlopen('http://localhost:9192') except: - subprocess.Popen(['nohup', 'ytdl_server.py', '&'], stdout=FNULL) + subprocess.Popen(['nohup', 'start_ytdl_server.sh', '&'], stdout=FNULL) subprocess.call("omxplayergui ytdl " + url, shell=True) diff --git a/native/start_ytdl_server.sh b/native/start_ytdl_server.sh new file mode 100755 index 0000000..6a55985 --- /dev/null +++ b/native/start_ytdl_server.sh @@ -0,0 +1,14 @@ +#!/bin/bash +ytdl_server.py > /dev/null 2>&1 & + +while ((1)); do + if pgrep chromium-browse > /dev/null + then + #Fine + echo "HI" > /dev/null + else + wget -qO /dev/null http://localhost:9192/stop + exit 0 + fi + sleep 5 +done