Timeout fixes for bad VPN's
This commit is contained in:
8
wolfpack
8
wolfpack
@@ -57,7 +57,7 @@ function nextairdate {
|
||||
echo "Need a show to search for"
|
||||
exit 1;
|
||||
fi
|
||||
lynx --dump "https://www.episodate.com/tv-show/$(echo $1 | tr '[:upper:]' '[:lower:]' | tr ' ' '-')?season=99" | grep 'and airs on' | sed 's# Season [0-9] / Episode [0-9][0-9] and airs on ##'
|
||||
lynx -read_timeout=5 -connect_timeout=5 --dump "https://www.episodate.com/tv-show/$(echo $1 | tr '[:upper:]' '[:lower:]' | tr ' ' '-')?season=99" 2>&1 | grep 'and airs on' | sed 's# Season [0-9]\+ / Episode [0-9]\+ and airs on ##'
|
||||
return
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ function torrent {
|
||||
for i in $(tail -n +3 "$1"); do
|
||||
getmagnetlink "$i"
|
||||
if [ "$magnetlink" != "" ]; then
|
||||
/usr/bin/transmission-cli -d 1000 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"
|
||||
/usr/bin/transmission-cli -d 600 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"
|
||||
sed -i "/$i/d" "$1"
|
||||
echo Downloaded and removed $i | tee -a $logfile
|
||||
fi
|
||||
@@ -111,7 +111,7 @@ function shows {
|
||||
if [ "$magnetlink" != "" ]; then
|
||||
# We found an episode.
|
||||
echo $i | tee -a $logfile
|
||||
# /usr/bin/transmission-cli -d 600 -u 1 -er -w "$downloaddir" -b -f "/usR/Local/bin/wolfpack-stoptorrent" "$magnetlink"
|
||||
/usr/bin/transmission-cli -d 300 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"
|
||||
sed -i "s/$i/S${season}E${newep}#${showName}#${modifier}/" "$1"
|
||||
echo Downloaded and pup updated. | tee -a $logfile
|
||||
rm -Rf ~/.config/transmission/resume/*
|
||||
@@ -165,7 +165,7 @@ function download {
|
||||
echo Deduped! Removed $i from $downloaddir | tee -a $logfile
|
||||
rm -Rf $i;
|
||||
done
|
||||
wget -q -O "$filename" "$nexturl"
|
||||
wget --timeout=5 -q -O "$filename" "$nexturl"
|
||||
echo Downloaded | tee -a $logfile
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user