Skip to content

Commit

Permalink
add video to the chain
Browse files Browse the repository at this point in the history
  • Loading branch information
DGaffney committed Jan 25, 2024
1 parent a7712b7 commit 0ae8e66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/alegre_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def relate_project_media(project_media, field=nil)
end

def get_items_with_similar_media_v2(media_url, threshold, team_ids, type)
alegre_path = ['audio', 'image'].include?(type) ? self.sync_path_for_type(type) : "/#{type}/similarity/search/"
alegre_path = ['audio', 'image', 'video'].include?(type) ? self.sync_path_for_type(type) : "/#{type}/similarity/search/"
# FIXME: Stop using this method from v1 once all media types are supported by v2
# FIXME: Alegre crashes if `media_url` was already requested before, this is why I append a hash
self.get_items_with_similar_media("#{media_url}?hash=#{SecureRandom.hex}", threshold, team_ids, alegre_path)
Expand Down

0 comments on commit 0ae8e66

Please sign in to comment.