dotfiles/.local/bin/rtorrent-magnet

7 lines
219 B
Text
Raw Normal View History

2018-12-26 00:40:38 +01:00
#!/bin/bash
watch_folder=~/rtorrent/watch/start
cd $watch_folder
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"
notify-send "rTorrent" "Torrent ajouté"