[Resolved] Share with your own domain

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Re: [Resolved] Share with your own domain

Postby Fenny » Mon Jul 22, 2013 2:13 am

theG wrote:I thought I'd post my fix wich should work with any version.
There are two files to modify wich are located in /subsonic/jetty/XXXX/webapp/WEB-INF/jsp/ where XXX should be a 4 digit number depending on the Subsonic version you are using.



First file: createShare.jsp
Copy these two lines under the <body.....> tag
<c:set var="newurlfix1" value="${model.playUrl}"/>
<c:set var="newurlfix2" value="${fn:replace(newurlfix1,'yoursubdomain.subsonic.com', 'yourdomain.com')}" />

Then replace every instance (after these two lines) of ${model.playUrl} in the file with ${newurlfix2}



Second file: shareSettings.jsp
Copy these two lines under the <body.....> tag
<c:set var="newurlfix1" value="${model.shareBaseUrl}"/>
<c:set var="newurlfix2" value="${fn:replace(newurlfix1,'yoursubdomain.subsonic.com', 'yourdomain.com')}" />

Then replace every instance (after these two lines, there should be only one instance) of ${model.shareBaseUrl} in the file with ${newurlfix2}

Done.

I haven't tester with the recent Subsonic versions since I'm still using an old one but this should work.


Remarkably similar to my fix :D

I did this:

in shareSettings.jsp replace all instances of
Code: Select all
${model.shareBaseUrl}

with
Code: Select all
${fn:replace(model.shareBaseUrl,".subsonic.org","")}


and in createShare.jsp
Code: Select all
${model.playUrl}

with
Code: Select all
${fn:replace(model.playUrl,".subsonic.org","")}


And I know this is cosmetic but it bothers me otherwise. :P

in networkSettings.jsp
Code: Select all
        <p>http://<form:input id="urlRedirectFrom" path="urlRedirectFrom" size="16" cssStyle="margin-left:0.25em"/>.subsonic.org</p>

with
Code: Select all
<p>http://<form:input id="urlRedirectFrom" path="urlRedirectFrom" size="32" cssStyle="margin-left:0.25em"/></p>



Or in a three line bash script that I can use for each update:
Code: Select all
sed -i 's/model.playUrl/fn:replace(model.playUrl,\".subsonic.org\",\"\")/g' /path/to/subsonic/jetty/*/webapp/WEB-INF/jsp/createShare.jsp
sed -i 's/model.shareBaseUrl/fn:replace(model.shareBaseUrl,\".subsonic.org\",\"\")/g' /path/to/subsonic/jetty/*/webapp/WEB-INF/jsp/createShare.jsp
sed -i 's/path=\"urlRedirectFrom\" size=\"16\"/path=\"urlRedirectFrom\" size=\"32\"/g;s/>.subsonic.org</></g' /path/to/subsonic/jetty/*/webapp/WEB-INF/jsp/networkSettings.jsp
Fenny
 
Posts: 21
Joined: Wed Oct 12, 2011 4:06 pm

Re: [Resolved] Share with your own domain

Postby jedinerd » Fri May 15, 2015 1:40 am

I found this one in shareSettings.jsp that also needed to be changed:

<a href="${fn:replace(model.shareBaseUrl,".subsonic.org","")}${share.name}" target="_blank">${share.name}</a></td>
jedinerd
 
Posts: 4
Joined: Thu May 14, 2015 10:18 pm

Previous

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 4 guests