Skip to content

Instantly share code, notes, and snippets.

@darnir
Created September 24, 2017 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darnir/da3e981529446e5945c1136091da4079 to your computer and use it in GitHub Desktop.
Save darnir/da3e981529446e5945c1136091da4079 to your computer and use it in GitHub Desktop.
Stream from server
stream ()
{
local URL="$1";
local MPV_PARAM="${@:2}";
local USER="go7box";
local PASS=$(pass Server/rutorrent/${USER});
local _final_url=$(sed -e "s#\(https://\)#\1${USER}:${PASS}@#" <<< "$URL");
echo "$_final_url";
mpv --cache=2048000 --cache-secs=1000 "$MPV_PARAM" "$_final_url"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment