summaryrefslogtreecommitdiffstats
path: root/.local/bin/youtube-kodi
blob: 340232a837655e5b5264b339afe8d3fac2ee19eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

url=$(yt-dlp -f b -g --no-playlist "$1")
if (pidof kodi.bin);
then
	address=127.0.0.1
else
	address=$(grep htpc -A3 "$HOME/.ssh/config" | awk '/Hostname/ {print $2}')
fi

kodi-send --host="$address" -a "PlayMedia($url,[noresume])"