rtorrentmagnet.sh 173 B

123456
  1. #!/bin/bash
  2. watch_folder=~/.rtorrent/watch
  3. cd $watch_folder
  4. [[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
  5. echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"