From dad6a992844ea15421667b5f64bf3f1b02dd68c9 Mon Sep 17 00:00:00 2001 From: kusti8 Date: Sat, 7 May 2016 18:39:19 -0400 Subject: [PATCH 1/3] Add ytdl_server stopping when Chromium closed --- native/run_omxplayer.py | 2 +- native/start_ytdl_server.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 native/start_ytdl_server.sh 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 100644 index 0000000..e63b878 --- /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 20 +done From 957867301462d10921d2107d9487a16e107f3e2b Mon Sep 17 00:00:00 2001 From: kusti8 Date: Sat, 7 May 2016 23:12:46 +0000 Subject: [PATCH 2/3] Change time to shorter; tested --- install.sh | 2 +- native/start_ytdl_server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 native/start_ytdl_server.sh diff --git a/install.sh b/install.sh index 58e7c35..8ee01ea 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ wget -qO - http://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add - echo "deb http://dl.bintray.com/kusti8/chromium-rpi jessie main" | sudo tee -a /etc/apt/sources.list sudo apt-get update -sudo apt-get install chromium-browser rpi-youtube -y +sudo apt-get install chromium-browser kweb -y diff --git a/native/start_ytdl_server.sh b/native/start_ytdl_server.sh old mode 100644 new mode 100755 index e63b878..6a55985 --- a/native/start_ytdl_server.sh +++ b/native/start_ytdl_server.sh @@ -10,5 +10,5 @@ while ((1)); do wget -qO /dev/null http://localhost:9192/stop exit 0 fi - sleep 20 + sleep 5 done From 3406cd478160b9ee10ce9ad2bd9f6a5e59678253 Mon Sep 17 00:00:00 2001 From: kusti8 Date: Sat, 7 May 2016 23:14:26 +0000 Subject: [PATCH 3/3] Add deb --- native/rpi-youtube_5.0.0-1.deb | Bin 2236 -> 0 bytes native/rpi-youtube_5.0.1-1.deb | Bin 0 -> 2376 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 native/rpi-youtube_5.0.0-1.deb create mode 100644 native/rpi-youtube_5.0.1-1.deb 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 d1380e1f91e23feb5c6d347ede411478ef523ffe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2236 zcma);XHXLg630V*5I|xO5DXHU(g^|b5D<|PAxIN16ot@h5)eZR(n5`hNH0oLq)Ahx zNeK!VigbhrNVU+bpb#KAy?J+E-~DE1cXoFEAAd6|rse48?4b>Gadq-^#49*?;vM~h zp-`x@Dnj`Z0s&V+K%uZ-`+vJK42Doug+hPT-#7r_iZGzF51!!XgHrLG=T%~8&;N$44ls>3`9NB$X~RTWXJYf<`=N&Pu@q6>*CQ50#iS$lP4q}V%_b2 zkOl{y%h?HewCM0dA!UiKn1Q9aL!bN&)c|_q0XMOgy{+Zy;7r(r-u~$Jabz4atYNxq zCvq)NcxXD z?b5q&rihfHS_yqupmUMiqj!Z_pOuw#!<(B$|J1d$0$xC6SIUyIil5cz^U*VCX1eca05Eb1TeY{zTsFFI zeliglJ{C^>lQw6E+|;__rNK0q8&TRxEJ8`Ezm|FJ!GSsDD5Sze9`72uV_vu43IX@; zMttGYba@C)wg>k-p@DruegOK|DvCD_zJXTD--L$pRVp5YI4_@UCS(|-UXQK`=P@n& zA`5A$RYItd>~0D?BS(zy5a9TCF2qwMsgw8i=$Aj3z4s;T-XS7lca{!=;F`In^T&j+ zSHjteHQ_fHt$L}r&);`$W%ZYcQv2O%U2)^Bfz6voY+SFsIDj%0$Se`A(oc1dnv{l1N42y}m~@G?lf7A+kARJTho)ljtyhQsKrXfG=wrpD;cwZE_|j3_ zyl^CExM)XcW%UOIcwFIDd%>RexwA;?9~SaRkSPJn4+$E|=SK-4FPaM9sf0|$46lRH zGUJ94&6S9>cTM3*C@+>rGh!5>o9lP2q?5u>atf_&R(tUTYju1>yQlE}LsW{{F3eTYqkFOQ5GuE)} z;TWamkdl@4z&kao^>dPZ43yRh?YvgW3Pr|5kkJN5=Y&nE1t!l=B!7fccg^mKOfBKd zDCns`ooU8t-`<*S*P=*;?y0B7!0F6;ZDhx1r#iwKna(*6jwx+_uv5F$gB#sLqPbO{db3!x8hlv%CA(;k&z3Y`1J&QR zyvpLn_e;;;W5p68JupOic_tfei^cv z5j_IQT}3cxTxF#b3Z_X6UjO7zJ~^ctCVEi{%Mnf2jE*sWJbkgszHNa?`GTkA__Iq%1RdJ?AGf)pOaz85^qIGhcPK~!Cp{Y>vgk)AwuW@&HJk}1 z`LPJ>`|3~nI%ESQn2^`tkIkOYXGKz;B}&7~(-UMfA3UeC)ST~TA00C-^%rl8^P|WF z<@Ai}9%Q|0Sf~dThZ4+2Pj4wck^`!13OJoy(IC`1+Cg*cbImi-|)CvS& u6L|l+;pjU5Als+Q`S(wN+CoPFn9?~T%mILjGA?Fq7*7K8?*o&K?Y{xW?h1hb 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 0000000000000000000000000000000000000000..fc10517db87c3952d60f8badbc0b1458764f5090 GIT binary patch literal 2376 zcmai$c{CJ?7stmgGa-##86i}d!JCC5Lt{zCk`^__7-F(agbcDXcnFQ1%9=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