diff --git a/nyaa/search.py b/nyaa/search.py index 9e22f84..4db2879 100644 --- a/nyaa/search.py +++ b/nyaa/search.py @@ -25,6 +25,7 @@ def search_elastic(term='', user=None, sort='id', order='desc', 'id': 'id', 'size': 'filesize', # 'name': 'display_name', # This is slow and buggy + 'comments': 'comments_count', 'seeders': 'seed_count', 'leechers': 'leech_count', 'downloads': 'download_count' @@ -190,6 +191,7 @@ def search_db(term='', user=None, sort='id', order='desc', category='0_0', 'size': models.Torrent.filesize, # Disable this because we disabled this in search_elastic, for the sake of consistency: # 'name': models.Torrent.display_name, + 'comments': models.Torrent.comment_count, 'seeders': models.Statistic.seed_count, 'leechers': models.Statistic.leech_count, 'downloads': models.Statistic.download_count diff --git a/nyaa/static/css/main.css b/nyaa/static/css/main.css index 3368282..4d70ea0 100755 --- a/nyaa/static/css/main.css +++ b/nyaa/static/css/main.css @@ -62,6 +62,30 @@ table.torrent-list tbody tr td a:visited { color: #1d4568; } +/* comments count */ +table.torrent-list .hdr-comments { + border-left: hidden; + font-size: medium; +} + +table.torrent-list .hdr-comments i { + margin-right: 6px; +} + +table.torrent-list tbody .comments { + position: relative; + float: right; + border: 1px solid #d7d7d7; + border-radius: 3px; + color: #383838; + padding: 0 5px; + font-size: small; + background-color: #ffffff; +} +table.torrent-list tbody .comments i { + padding-right: 2px; +} + #torrent-description img { max-width: 100%; } diff --git a/nyaa/templates/search_results.html b/nyaa/templates/search_results.html index f4c5ff2..bcdc0b3 100644 --- a/nyaa/templates/search_results.html +++ b/nyaa/templates/search_results.html @@ -28,6 +28,9 @@ {% call render_column_header("hdr-name", "width:auto;") %}