Fixing scan torrents.

This commit is contained in:
Dessalines 2019-02-09 16:30:17 -08:00
parent e2b57ec11e
commit 4f1a786a26
1 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,8 @@ fi
pushd $torrents_dir
# Copy the unscanned torrent files to a temp dir
mkdir $tmp_torrent_dir
find `pwd` -name "*.torrent" | sort -n | grep -vFf $scanned_out | while read torrent_file ; do
# TODO need to find a better way to do this for huge dirs
find `pwd` -name "*.torrent" | grep -vFf $scanned_out | while read torrent_file ; do
cp "$torrent_file" "$tmp_torrent_dir"
done
@ -75,5 +76,5 @@ popd
rm -rf "$tmp_torrent_dir"
# Scan the torrent dir for new files, and add them
node scan_torrent_files.js --dir "$torrents_dir"
node --max-old-space-size=8192 scan_torrent_files.js --dir "$torrents_dir"