iqdb fixes

This commit is contained in:
r888888888
2014-04-12 01:34:21 -07:00
parent 01eb6fd0ac
commit 7d1bf4864f
2 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
module Iqdb
class Download
attr_reader :source, :download, :similar_posts
attr_reader :source, :download, :matches
def initialize(source)
@source = source
@@ -14,7 +14,7 @@ module Iqdb
def find_similar
if Danbooru.config.iqdb_hostname_and_port
@similar_posts = Iqdb::Server.new(*Danbooru.config.iqdb_hostname_and_port).query(0, 3, @download.file_path)
@matches = Iqdb::Server.new(*Danbooru.config.iqdb_hostname_and_port).query(0, 3, @download.file_path).matches
end
end
end

View File

@@ -1,6 +1,6 @@
<% if @download.similar_posts %>
<% if @download.matches %>
<h3>Similar</h3>
<% @download.similar_posts.each do |similar| %>
<%= PostPresenter.preview(Post.find(similar.post_id)) %>
<% @download.matches.each do |match| %>
<%= PostPresenter.preview(Post.find(match.post_id)) %>
<% end %>
<% end %>