Page 1 of 1

Add Discogs to search link enquiries

PostPosted: Fri Jun 11, 2010 2:44 am
by iceolate
I couldn't find any information about this, so I wanted to find out if there was a way to change the default links to search for a particular album. For example, each album page I have shows
Search Google | Wikipedia | allmusic | Last.fm

I would like to change that to use Discogs and, since I don't use allmusic and most of my albums aren't on Wikipedia. Is there a way to do this? I wouldn't mind editing some file if I knew which one it was and how to do it.

Thanks.

Instructions...

PostPosted: Fri Jan 14, 2011 7:54 am
by cexeh
Open up the "C:\subsonic\jetty\2087\webapp\WEB-INF\jsp" folder and inside that folder open the the "main.jsp" file in a text-editor like notepad++, preferably something with syntax highlighting.

Around line 124 or so, you will see <c:if test="${not empty artist and not empty album}">. The next line down starts the search engines. What you are going to want to do first is add the <sub:url></sub:url> entry as follows:
Code: Select all
<sub:url value="http://www.discogs.com/search" var="discogsUrl" encoding="UTF-8">
   <sub:param name="q" value="\"${artist}\" \"${album}\""/>
</sub:url>

Replace the last.fm code with the above code.

Next, you need to replace the last.fm link code with this:
Code: Select all
<a target="_blank" href="${discogsUrl}">Discogs</a>

This is located below the sub:url entries.

You can use this technique to add other search engines as well. Don't forget to save your file. Good luck!

PostPosted: Wed Jan 19, 2011 1:08 pm
by 3R3
Thank you for the easy-to-follow instructions. google music search doesnt even work outside the us yet, so its good to have it commented out for non-us servers.

PostPosted: Wed Jan 19, 2011 11:49 pm
by iceolate
Thank you for the instructions too. It worked perfectly. Discogs should be listed as one of the default search engines. I don't want to update this file every time there's a new version of Subsonic.

Re:

PostPosted: Mon Mar 26, 2012 7:32 am
by gardar
iceolate wrote:Thank you for the instructions too. It worked perfectly. Discogs should be listed as one of the default search engines. I don't want to update this file every time there's a new version of Subsonic.


I give my vote to this. Discogs is the most complete music database out there!

Re: Change default search links

PostPosted: Mon Mar 26, 2012 11:20 am
by BKKKPewsey
gardar wrote:I give my vote to this. Discogs is the most complete music database out there!


I would agree that a Discogs search link would be a useful addition to SS.

I am moving this thread to Feature Requests as hopefully it will be more likely to be noticed by Sindre :wink:

Re: Change default search links

PostPosted: Mon Mar 26, 2012 7:01 pm
by gardar
BKKKPewsey wrote:
gardar wrote:I give my vote to this. Discogs is the most complete music database out there!


I would agree that a Discogs search link would be a useful addition to SS.

I am moving this thread to Feature Requests as hopefully it will be more likely to be noticed by Sindre :wink:



Awesome!
On a related note, how about fetching information for tracks, can discogs be used for that too?