Merge pull request #21 from lrusak/major-rework

Cleanup add-on for building with LibreELEC
This commit is contained in:
Gustavo 2016-05-05 16:30:01 -03:00
commit c371ff8652
21 changed files with 48 additions and 248 deletions

View file

@ -9,7 +9,7 @@ import urlparse
import sys
import os
from resources.moonlight import LibGameStream
from lib.moonlight import LibGameStream
base_url = sys.argv[0]
addon_handle = int(sys.argv[1])

View file

@ -1,32 +0,0 @@
abs_x = 0
abs_y = 1
abs_z = 2
abs_rx = 3
abs_ry = 4
abs_rz = 5
abs_deadzone = 0
abs_dpad_y = 16
abs_dpad_x = 17
reverse_x = false
reverse_y = true
reverse_rx = false
reverse_ry = true
reverse_dpad_y = false
reverse_dpad_x = false
btn_south = 304
btn_east = 305
btn_north = 307
btn_west = 308
btn_select = 314
btn_start = 315
btn_mode = 316
btn_thumbl = 317
btn_thumbr = 318
btn_tl = 310
btn_tr = 311
btn_tl2 = 312
btn_tr2 = 313
btn_dpad_up = 544
btn_dpad_down = 545
btn_dpad_left = 546
btn_dpad_right = 547

View file

@ -1,32 +0,0 @@
abs_x = 0
abs_y = 1
abs_z = -1
abs_rx = 2
abs_ry = 3
abs_rz = -1
abs_deadzone = 0
abs_dpad_x = -1
abs_dpad_y = -1
reverse_x = false
reverse_y = false
reverse_rx = false
reverse_ry = false
reverse_dpad_x = false
reverse_dpad_y = false
btn_west = 303
btn_south = 302
btn_north = 300
btn_east = 301
btn_select = 288
btn_start = 291
btn_mode = 304
btn_thumbl = 289
btn_thumbr = 290
btn_tl = 298
btn_tr = 299
btn_tl2 = 296
btn_tr2 = 297
btn_dpad_up = 292
btn_dpad_down = 294
btn_dpad_left = 295
btn_dpad_right = 293

View file

@ -1,32 +0,0 @@
abs_x = 0
abs_y = 1
abs_z = 48
abs_rx = 2
abs_ry = 5
abs_rz = 49
abs_deadzone = 0
abs_dpad_x = -1
abs_dpad_y = -1
reverse_x = false
reverse_y = true
reverse_rx = false
reverse_ry = true
reverse_dpad_x = false
reverse_dpad_y = false
btn_west = 303
btn_south = 302
btn_north = 300
btn_east = 301
btn_select = 288
btn_start = 291
btn_mode = 304
btn_thumbl = 289
btn_thumbr = 290
btn_tl = 298
btn_tr = 299
btn_tl2 = 296
btn_tr2 = 297
btn_dpad_up = 292
btn_dpad_down = 294
btn_dpad_left = 295
btn_dpad_right = 293

View file

@ -1,32 +0,0 @@
abs_x = 0
abs_y = 1
abs_z = 3
abs_rx = 2
abs_ry = 5
abs_rz = 4
abs_deadzone = 0
abs_dpad_x = 16
abs_dpad_y = 17
reverse_x = false
reverse_y = true
reverse_rx = false
reverse_ry = true
reverse_dpad_x = false
reverse_dpad_y = false
btn_west = 304
btn_south = 305
btn_north = 307
btn_east = 306
btn_select = 312
btn_start = 313
btn_mode = 316
btn_thumbl = 314
btn_thumbr = 315
btn_tl = 308
btn_tr = 309
btn_tl2 = 310
btn_tr2 = 311
btn_dpad_up = -1
btn_dpad_down = -1
btn_dpad_left = -1
btn_dpad_right = -1

View file

@ -1,31 +0,0 @@
abs_x = 0
abs_y = 1
abs_z = -1
reverse_x = false
reverse_y = true
abs_rx = 2
abs_ry = 5
abs_rz = -1
reverse_rx = false
reverse_ry = true
abs_dpad_x = 16
abs_dpad_y = 17
reverse_dpad_x = false
reverse_dpad_y = false
btn_north = 291
btn_east = 290
btn_south = 289
btn_west = 288
btn_select = 297
btn_start = 296
btn_mode = 0
btn_thumbl = 298
btn_thumbr = 299
btn_tl = 292
btn_tr = 293
btn_tl2 = 294
btn_tr2 = 295
btn_dpad_up = -1
btn_dpad_down = -1
btn_dpad_left = -1
btn_dpad_right = -1

View file

@ -1,32 +0,0 @@
abs_x = 0
abs_y = 1
abs_z = 2
abs_rx = 3
abs_ry = 4
abs_rz = 5
abs_deadzone = 0
abs_dpad_x = 16
abs_dpad_y = 17
reverse_x = false
reverse_y = true
reverse_rx = false
reverse_ry = true
reverse_dpad_x = false
reverse_dpad_y = false
btn_east = 305
btn_south = 304
btn_north = 308
btn_west = 307
btn_select = 314
btn_start = 315
btn_mode = 316
btn_thumbl = 317
btn_thumbr = 318
btn_tl = 310
btn_tr = 311
btn_tl2 = -1
btn_tr2 = -1
btn_dpad_up = -1
btn_dpad_down = -1
btn_dpad_left = -1
btn_dpad_right = -1

Binary file not shown.

View file

@ -4,13 +4,8 @@
oe_setup_addon script.moonlight
chmod a+x $ADDON_DIR/bin/*
while [ 1 ]
do
if [ -f $ADDON_DIR/start_moonlight.tmp ]
then
oe_setup_addon script.moonlight
while [ 1 ]; do
if [ -f $ADDON_DIR/start_moonlight.tmp ]; then
MOONLIGHT_APP=`cat $ADDON_DIR/start_moonlight.tmp`
@ -65,7 +60,7 @@ do
fi
if [ "$MOON_MAPPING" != "" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/bin/mappings/${MOON_MAPPING}.conf\""
MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/share/moonlight/mappings/${MOON_MAPPING}.conf\""
fi
if [ "$MOONLIGHT_APP" != "" ]; then
@ -78,17 +73,15 @@ do
MOONLIGHT_ARG="$MOONLIGHT_ARG $MOON_SERVER_IP"
fi
if pgrep "kodi.bin" > /dev/null
then
if pgrep "kodi.bin" > /dev/null; then
systemctl stop kodi
fi
modprobe snd_bcm2835
modprobe snd_bcm2835 || :
echo $MOONLIGHT_ARG >> $ADDON_LOG_FILE
/bin/sh -c "${ADDON_DIR}/bin/moonlight ${MOONLIGHT_ARG} > ${ADDON_LOG_FILE} 2>&1"
rmmod snd_bcm2835
rmmod snd_bcm2835 || :
systemctl start kodi
fi
sleep 1
done

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -110,4 +110,3 @@ class LibGameStream:
ret = self.gslib.gs_pair(self.server, ctypes.c_char_p(pin))
return ret == GS_OK

View file

@ -1 +0,0 @@
#

View file

@ -4,7 +4,7 @@ After=graphical.target
[Service]
Type=idle
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/script.moonlight/bin/service.sh"
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/script.moonlight/bin/moonlight.sh"
TimeoutStopSec=1
Restart=always
RestartSec=2