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
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.
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