очиска лишних логов
This commit is contained in:
@ -16,18 +16,17 @@ socketMysql.connect(function(mysqlError) {
|
||||
return;
|
||||
}
|
||||
|
||||
socketMysql.query('SELECT * FROM `torrents` WHERE `contentType` IS NULL', function (error, rows, fields) {
|
||||
rows.forEach((torrent) => {
|
||||
let inc = 0;
|
||||
socketMysql.query('SELECT * FROM `torrents` WHERE `contentType` IS NULL', function (error, torrents, fields) {
|
||||
torrents.forEach((torrent) => {
|
||||
socketMysql.query('SELECT * FROM `files` WHERE hash = ?', torrent.hash, function (error, files, fields) {
|
||||
torrentTypeDetect(torrent, files);
|
||||
if(torrent.contentType) {
|
||||
socketMysql.query('UPDATE `torrents` SET `contentType` = ? WHERE `hash` = ?', [torrent.contentType, torrent.hash], function (error, files, fields) {
|
||||
console.log(error + ':' + torrent.contentType);
|
||||
console.log((++inc) + '/' + torrents.length);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
console.log('end');
|
Reference in New Issue
Block a user