Only look at .torrent files in the bash implementation
This commit is contained in:
parent
8e86703f0e
commit
80929d25ed
1 changed files with 2 additions and 2 deletions
|
@ -261,7 +261,7 @@ while true; do
|
||||||
# check if the path is a directory
|
# check if the path is a directory
|
||||||
if [[ -d "${file}" ]]; then
|
if [[ -d "${file}" ]]; then
|
||||||
# enumerate the directory
|
# 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
|
# this is the furthest we will descend
|
||||||
if [[ -f "${sub_file}" ]]; then
|
if [[ -f "${sub_file}" ]]; then
|
||||||
# get the torrent hash for the .torrent file
|
# get the torrent hash for the .torrent file
|
||||||
|
@ -278,7 +278,7 @@ while true; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# check that the path is a file
|
# 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
|
# get the torrent hash for the .torrent file
|
||||||
torrent_hash=`get_torrent_hash "${file}"`
|
torrent_hash=`get_torrent_hash "${file}"`
|
||||||
if [[ ! $? ]]; then
|
if [[ ! $? ]]; then
|
||||||
|
|
Loading…
Reference in a new issue