-
-
Save asm0dey/c0907d8f30233cb8f1f4b6d8c23e23dd to your computer and use it in GitHub Desktop.
Use peerflix for kodi@OSMC on raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ~/ins | |
cd ~/ins | |
wget http://node-arm.herokuapp.com/node_latest_armhf.deb | |
sudo dpkg -i node_latest_armhf.deb | |
sudo npm install -g peerflix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
if [ -z "$1" ]; then | |
echo "No argument supplied" | |
exit 1 | |
fi | |
MAGNET="$1" | |
STREAM_FILE=$(mktemp) | |
ON_LISTENING=$(mktemp) | |
trap 'rm -f '"$STREAM_FILE $ON_LISTENING" 1 2 | |
echo 'http://127.0.0.1:8888' > "$STREAM_FILE" | |
echo 'xbmc-send --host=127.0.0.1 --port=9777 --action="'"PlayMedia($STREAM_FILE)"'"' > "$ON_LISTENING" | |
chmod +x "$ON_LISTENING" | |
peerflix "$MAGNET" -q -f ~/Downloads --on-listening "$ON_LISTENING" & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment