очиска лишних логов
This commit is contained in:
parent
ec1191771c
commit
ed324d01d2
@ -181,7 +181,6 @@ const fileDetect = (file) => {
|
|||||||
if(extension.length == 0)
|
if(extension.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
console.log(name + ':' + extension);
|
|
||||||
return ExtesionBase[extension];
|
return ExtesionBase[extension];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,9 +205,6 @@ const torrentTypeDetect = (torrent, files) => {
|
|||||||
});
|
});
|
||||||
if(priority.length > 0)
|
if(priority.length > 0)
|
||||||
torrent[ContentTypeProp] = priority[0];
|
torrent[ContentTypeProp] = priority[0];
|
||||||
|
|
||||||
console.log(typesPriority);
|
|
||||||
console.log(priority);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = torrentTypeDetect;
|
module.exports = torrentTypeDetect;
|
@ -16,18 +16,17 @@ socketMysql.connect(function(mysqlError) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
socketMysql.query('SELECT * FROM `torrents` WHERE `contentType` IS NULL', function (error, rows, fields) {
|
let inc = 0;
|
||||||
rows.forEach((torrent) => {
|
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) {
|
socketMysql.query('SELECT * FROM `files` WHERE hash = ?', torrent.hash, function (error, files, fields) {
|
||||||
torrentTypeDetect(torrent, files);
|
torrentTypeDetect(torrent, files);
|
||||||
if(torrent.contentType) {
|
if(torrent.contentType) {
|
||||||
socketMysql.query('UPDATE `torrents` SET `contentType` = ? WHERE `hash` = ?', [torrent.contentType, torrent.hash], function (error, files, fields) {
|
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');
|
|
Loading…
Reference in New Issue
Block a user