Last active
January 30, 2022 22:26
-
-
Save donno2048/77bc2f0f7730a60b634273bf927077d4 to your computer and use it in GitHub Desktop.
Stream movies from cmd for wsl
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
# Stream movies from cmd for wsl (requires xlaunch and pulseaudio) | |
# Install requirements: sudo npm i peerflix -g && sudo apt install mpv -y | |
# Execute: bash stream.sh endgame | |
/mnt/c/pulseaudio/bin/pulseaudio.exe 2>/dev/null & export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 && sleep 1 && export PULSE_SERVER=tcp:$(grep nameserver /etc/resolv.conf | awk '{print $2}'); | |
peerflix -k $(curl -s https://1337x.wtf/$(curl -s https://1337x.wtf/search/$(printf '%s' "$*" | tr ' ' '+' )/1/ | grep -Eo "torrent\/[0-9]{7}\/[a-zA-Z0-9?%-]*/" | head -n 1) | grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" | head -n 1) > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment