From 4f1a786a26c4e880196836abe0fdeb7b1e754890 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 9 Feb 2019 16:30:17 -0800 Subject: [PATCH] Fixing scan torrents. --- scripts/scan_torrents.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/scan_torrents.sh b/scripts/scan_torrents.sh index 6537c5b..49d5280 100755 --- a/scripts/scan_torrents.sh +++ b/scripts/scan_torrents.sh @@ -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"