Skip to content

Instantly share code, notes, and snippets.

@ibizaman
Created February 25, 2016 17:47
Show Gist options
  • Save ibizaman/267a926b502d7a4f8fa4 to your computer and use it in GitHub Desktop.
Save ibizaman/267a926b502d7a4f8fa4 to your computer and use it in GitHub Desktop.
Wrapper around t411 to make workflow more enjoyable
#!/bin/bash
# pip install percol
# pip install prompter
movie=$1
ok=false
while [ $ok = false ]; do
torrentId=$(t411 -l 40 search -c filmvideo/film "$movie" size | percol | awk '{ print $1}')
t411 details $torrentId
python -c "from prompter import yesno; import sys; sys.exit(not yesno('download? (Ctrl-c to quit)'))"
download=$?
if [ $download -eq 0 ]; then
t411 download $torrentId
ok=true
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment