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