Only look at .torrent files in the bash implementation

This commit is contained in:
Tony Blyler 2016-05-16 09:55:56 -04:00
parent 8e86703f0e
commit 80929d25ed
No known key found for this signature in database
GPG key ID: 25C9D3A655D1A65C

View file

@ -261,7 +261,7 @@ while true; do
# check if the path is a directory
if [[ -d "${file}" ]]; then
# enumerate the directory
for sub_file in `find "${file}" -type f`; do
for sub_file in `find "${file}" -type f -name '*.torrent'`; do
# this is the furthest we will descend
if [[ -f "${sub_file}" ]]; then
# get the torrent hash for the .torrent file
@ -278,7 +278,7 @@ while true; do
fi
done
# check that the path is a file
elif [[ -f "${file}" ]]; then
elif [[ -f "${file}" ]] && echo "${file}" | egrep -q '\.torrent$'; then
# get the torrent hash for the .torrent file
torrent_hash=`get_torrent_hash "${file}"`
if [[ ! $? ]]; then