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"