From e60037ee0e547e6ffd96dc4885ead3cf9f6d4a95 Mon Sep 17 00:00:00 2001 From: cxford Date: Thu, 25 Aug 2016 23:25:11 -0500 Subject: [PATCH] Fixes and stability --- Makefile | 1 - wolfpack | 38 +++++++++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 4bda53e..38d69fc 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ configure: install: /usr/bin/wget /usr/bin/transmission-cli /usr/bin/googler wolfpack wolfpack-stoptorrent /usr/local/bin/whatismyip cp -p /usr/local/src/WolfPack/wolfpack /usr/local/bin/wolfpack cp -p /usr/local/src/WolfPack/wolfpack-stoptorrent /usr/local/bin/wolfpack-stoptorrent - [ ! -f /root/.bashrc ] || (grep 'transmission-cli' /root/.bashrc) || echo 'alias transmission-cli="transmission-cli -d 600 -u 1 -er -w /srv/yggdrasil/new_acquisition -b"' >> /root/.bashrc chmod 0700 /usr/local/bin/wolfpack-stoptorrent chmod 0755 /usr/local/bin/wolfpack chown root:root /usr/local/bin/wolfpack* diff --git a/wolfpack b/wolfpack index 9bef121..b85cf12 100755 --- a/wolfpack +++ b/wolfpack @@ -1,8 +1,10 @@ #!/bin/bash - export IFS=" " - +export torrentengine="https://1337x.to/search/%s/1/" +export torrentterms='printf https://1337x.to; grep "/torrent/" | head -n 1 | cut -f 2 -d \"' +export magnetposition=4 +export torrentdebugging="false" export logfile='/var/log/wolfpack.log' function helptext { @@ -54,11 +56,18 @@ function torrent { fi for i in $(tail -n +3 "$1"); do export searchstring="$(echo $i | sed 's/ /+/g')" - export searchlink="http://torrentproject.org/?t=""$searchstring" - export searchresult=$(wget -q -O - "$searchlink" | grep torrentproject.org | grep '
> $logfile @@ -107,8 +123,8 @@ function shows { export episode=$(echo $sepisode | cut -f 2 -d 'E') export newseason=$(printf "%02d\n" $((${season#0} + 1))) export newsearch="$(echo $searchlink | sed 's/S'$season'E'$episode'/S'$newseason'E01/')" - export searchresult=$(wget -q -O - "$newsearch" | grep torrentproject.org | grep '
> $logfile /usr/bin/transmission-cli -d 600 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"