meteor314 / stream-cli

A tool to watch all torrent video from piratebay directly from cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This program is depreacted, please use ny-cli with some add functionality and many bugs fixes

stream-cli

A tool which search magnet links and stream it with stream.The idea came while watching notflix and the latter I found very buggy so I made mine based on the piratebay much more complete and functional.

How does this work?

This is a shell script. It scape Piratebay and get the magnet link. After this it use peerlix to stream the video from magnet link. For scraping script use simple gnu utils like sed, awk, curl.

Requirements

You need NPM. You can follow this tutorial if you don't have node alreday installed.

  • node - Installation of Node.js on Linux
  • stream - A tool to stream torrent.
npm install @meteor314/stream -g

Installation

Linux

cURL stream-cli to your $PATH and give execute permissions.

sudo curl -sL "https://raw.githubusercontent.com/meteor314/stream-cli/master/stream-cli" -o /usr/local/bin/stream-cli
sudo chmod +x /usr/local/bin/stream-cli

Windows

You need scoop to install on your. you can find a complete documentation here. The easiest way to install it is to open powershell (as a simple user) and jsut paste these command :

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop bucket add extras
git clone https://github.com/meteor314/stream-cli.git 
cd stream-cli
scoop install stream-cli
npm install @meteor314/stream -g

MAC OS

//TO DO

Android

Install termux and Install mpv-android Don't forget to give termux file manager access. And just copy and paste this command:

pkg update
pkg install nodejs
npm install @meteor314/stream -g
pkg install fzf
pkg install git
git clone https://github.com/meteor314/stream-cli && cd stream-cli
cp stream-cli $PREFIX/bin/stream-cli
echo 'am start --user 0 -a android.intent.action.VIEW -d "$2" -n is.xyz.mpv/.MPVActivity' > $PREFIX/bin/mpv
chmod +x $PREFIX/bin/mpv

MAC OS

//TO DO

How to use ?

Juste write

stream-cli 
# stream-cli -h for help
  • To update,
stream-cli --update

How to delete ?

Remove path from local/bin

sudo rm -rf /usr/local/bin/stream-cli

Issue

If you are using first time, you can get an error, please restart terminal/cmd.

Sometime you can get this type of error :

stream: unable to open image 'magnet:?xt=urn:btih:fba17d3e02fe94df607b823afe822bd30efd203f': No such file or directory @ error/blob.c/OpenBlob/3533.
stream: no decode delegate for this image format `' @ error/constitute.c/ReadImage/738.
stream: unable to open image '--path': No such file or directory @ error/blob.c/OpenBlob/3533.
stream: unable to open image '--path': No such file or directory @ error/blob.c/OpenBlob/3533.
stream: no decode delegate for this image format `' @ error/constitute.c/ReadImage/738.
stream: no decode delegate for this image format `' @ error/constitute.c/ReadImage/738.
stream: unrecognized option `-a' @ error/stream.c/StreamImageCommand/306.

This error usually comes after an update. Just reinstall stream with this command in the terminal:

  npm i @meteor314/stream -g

TO DO / WISH LIST

  • [✓] Compatibilty with windows.
  • [✓] Download torrent in a specific folder (with stream-cli -d)
  • [] Send notification after download ( notify-send(?) ) for W10, Mac & Linux.
  • [] Compatibility with mac os.
  • [] Fix bugs with git bash in W10
  • [] Make a history of all torrent in ./.cache/history.ini
  • [] Detect files formats, for example, if it is a zip file or .exe just download it, don't try to open with mpv
  • [] add vlc player.
  • [✓] Create a custom node webserver based on webtorrent for a better compatibility.

License

This project is licensed under GPL.

Please read Disclaimer.md before any usage. Happy torrent :)

Just keep in mind that : "Video playing time may vary depending on torrent availability, or may not play if torrent is old and there are no seeders."

If you encounter a bug, don't hesitate to open an issue, and any help will be welcome ^_^

About

A tool to watch all torrent video from piratebay directly from cli

License:GNU General Public License v3.0