Opensearch works again
This commit is contained in:
parent
8a188cf6bd
commit
f76dea062c
|
@ -36,6 +36,10 @@ class ArtistController < ApplicationController
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def search
|
||||||
|
redirect_to "/#/artist/#{params[:q].gsub(/\s/, '+')}"
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def queue_loading artist_name, mbid
|
def queue_loading artist_name, mbid
|
||||||
|
|
|
@ -21,4 +21,6 @@ Beathaven::Application.routes.draw do
|
||||||
|
|
||||||
match 'artist/autocomplete' => 'last_fm#autocomplete'
|
match 'artist/autocomplete' => 'last_fm#autocomplete'
|
||||||
match 'artist/(:artist)' => 'artist#data', constraints: { artist: /.*/ }
|
match 'artist/(:artist)' => 'artist#data', constraints: { artist: /.*/ }
|
||||||
|
|
||||||
|
match 'search' => 'artist#search'
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
<ShortName>BeatHaven</ShortName>
|
<ShortName>BeatHaven</ShortName>
|
||||||
<Description>BeatHaven</Description>
|
<Description>BeatHaven</Description>
|
||||||
<Image height="16" width="16" type="image/x-icon">http://beathaven.org/favicon.ico</Image>
|
<Image height="16" width="16" type="image/x-icon">http://beathaven.org/favicon.ico</Image>
|
||||||
<Url type="text/html" method="get" template="http://beathaven.org/artist/#/{searchTerms}/"/>
|
<Url type="text/html" method="get" template="http://beathaven.org/search/?q={searchTerms}"/>
|
||||||
</OpenSearchDescription>
|
</OpenSearchDescription>
|
||||||
|
|
Loading…
Reference in New Issue