From 1bffb33b70e6cc96f85ae6aed0bdbbcb59430d0e Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Sun, 8 Jan 2017 23:54:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- sphinx.conf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b5ef799..fa28ff7 100644 --- a/index.js +++ b/index.js @@ -101,7 +101,7 @@ io.on('connection', function(socket) function baseRowData(row) { return { - hash: row.hash || row.id, + hash: row.hash, name: row.name, size: row.size, files: row.files, diff --git a/sphinx.conf b/sphinx.conf index a32452f..7e8e9c7 100644 --- a/sphinx.conf +++ b/sphinx.conf @@ -52,11 +52,12 @@ source torrents_index sql_port = 3306 # optional, default is 3306 sql_query = \ - SELECT torrents.hash as hash, torrents.name as name, torrents.size as size, \ + SELECT torrents.torrentid, torrents.hash as hash, torrents.name as name, torrents.size as size, \ torrents.seeders, torrents.leechers, torrents.completed, \ torrents.files, torrents.contentType, torrents.contentCategory \ FROM torrents + sql_attr_string = hash sql_field_string = name sql_attr_bigint = size sql_attr_uint = files