for torrents-import.php:
find:
find:
$ret = mysql_query("INSERT INTO torrents
Add before:
if ($external == "no") {
require_once("backend/BDecode.php");
require_once("backend/BEncode.php");
$dict = BDecode(file_get_contents("$dir/$fname"));
$dict["info"]["private"] = 1;
$fs = fopen("$dir/$fname", "w");
fwrite($fs, BEncode($dict));
fclose($fs);
$TorrentInfo = array();
$TorrentInfo = ParseTorrent("$dir/$fname");
$infohash = $TorrentInfo[1];
}