Created
September 3, 2016 17:36
-
-
Save sysradium/1a9b3709b22477cbdfb4733c2d8001b2 to your computer and use it in GitHub Desktop.
Getting a list of files in torrent given a magnet link
This file contains 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
magnet-info() { | |
hash=$(echo "${1,,}" | grep -oP "(?<=btih:).*?(?=&)") | |
echo "Magnet hash: $hash" | |
aria2c --bt-metadata-only=true --bt-save-metadata=true -q "$1" | |
aria2c "$hash.torrent" -S | |
rm "$hash.torrent" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment