sumzary / yt2p

Watch videos in an external player.
https://addons.mozilla.org/en-US/firefox/addon/yt2p/
MIT License
22 stars 5 forks source link

Native app is not installed #8

Open sr-tream opened 4 years ago

sr-tream commented 4 years ago

I install latest version of extension and native app. After click on URL it open video in mpv, but after close mpv it show notification "native app is not installed" and open extension settings. I try to use wrapper for mpv with force return 0 after close, but it does not help me.

OS Linux.

Firefox 72

TilCreator commented 4 years ago

Can confirm this bug, here is also the list of subprocesses that spawn mpv:

   2213 tilcreato  20   0 5525M 1412M  530M S  7.1  6.4  3h42:04 ├─ /usr/lib64/firefox/firefox
 731140 tilcreato  20   0  7480  3256  2800 S  0.0  0.0  0:00.00 │  ├─ /bin/sh /home/tilcreator/.local/lib/ee.sumzary.yt2p/host.sh /home/tilcreator/.mozilla/native-messaging-hosts/ee.sumzary.yt2p.json YT2Player@Rasmus.Riiner
 731143 tilcreato  20   0  7480  3396  2932 S  0.0  0.0  0:00.00 │  │  └─ /bin/sh ./luajit host.lua /home/tilcreator/.mozilla/native-messaging-hosts/ee.sumzary.yt2p.json YT2Player@Rasmus.Riiner
 731145 tilcreato  20   0  4776  2660  2176 S  0.0  0.0  0:00.08 │  │     └─ /home/tilcreator/.local/lib/ee.sumzary.yt2p/data/linux64/luajit-bin host.lua /home/tilcreator/.mozilla/native-messaging-hosts/ee.sumzary.yt2p.json YT2Player@Rasmus.Riiner
 731146 tilcreato  20   0  7480  2796  2460 S  0.0  0.0  0:00.00 │  │        └─ sh -c ./luajit "/tmp/lua_A26oxX" 2>&1
 731147 tilcreato  20   0  7480  3488  3024 S  0.0  0.0  0:00.00 │  │           └─ /bin/sh ./luajit /tmp/lua_A26oxX
 731149 tilcreato  20   0  4388  2204  2036 S  0.0  0.0  0:00.00 │  │              └─ /home/tilcreator/.local/lib/ee.sumzary.yt2p/data/linux64/luajit-bin /tmp/lua_A26oxX
 731150 tilcreato  20   0 3309M  422M 95804 S 23.8  1.9  6:49.69 │  │                 └─ /usr/bin/mpv --fs https://www.youtube.com/watch?v=<someid>
TilCreator commented 4 years ago

The error seams to be in the native app that fails to return valid JSON, but don't really understand the native app...

TilCreator commented 4 years ago

I wrote a replacement Python native app: https://github.com/TilCreator/yt2p I way don't support all features, but most things should work fine, without error.