Disable URL redirection (for now)

Signed-off-by: Chetan Sarva <chetan@pixelcop.net>
This commit is contained in:
Chetan Sarva
2016-05-21 11:01:40 -04:00
parent d1c8acdbfe
commit 950133b30a
4 changed files with 25 additions and 4 deletions
@@ -100,6 +100,17 @@ public class NetworkService {
* @param test Whether to test that the redirection works.
*/
public synchronized void initUrlRedirection(boolean test) {
if (true) {
// This feature isn't currently supported, since it's a public service of subsonic.org
// Display a warning message for now
boolean enabled = settingsService.isUrlRedirectionEnabled() && settingsService.getUrlRedirectType() == UrlRedirectType.NORMAL;
if (enabled) {
LOG.warn("The URL redirection service is currently not enabled!");
}
return;
}
urlRedirectionStatus.setText("Idle");
if (urlRedirectionFuture != null) {
urlRedirectionFuture.cancel(true);
@@ -427,6 +427,8 @@ networksettings.urlredirectionenabled = Access your server over the Internet usi
networksettings.status = Status:
networksettings.normalurl = Use
networksettings.customurl = Use custom URL (advanced)
networksettings.urlRedirectDisabled = Feature not currently available
# transcodingSettings.jsp
transcodingsettings.name = Name
@@ -30,7 +30,7 @@
var custom = $("#urlRedirectTypeCustom").is(":checked");
$("#urlRedirectFrom").prop("disabled", !urlRedirectionEnabled || !normal);
$("#urlRedirectCustomUrl").prop("disabled", !urlRedirectionEnabled || !custom);
$("#urlRedirectCustomUrl").prop("disabled", !urlRedirectionEnabled || !custom);
$("#urlRedirectTypeNormal").prop("disabled", !urlRedirectionEnabled);
$("#urlRedirectTypeCustom").prop("disabled", !urlRedirectionEnabled);
}
@@ -75,7 +75,7 @@
<p>
<form:radiobutton id="urlRedirectTypeNormal" path="urlRedirectType" value="NORMAL" onclick="enableUrlRedirectionFields()"/>
<label for="urlRedirectTypeNormal"><fmt:message key="networksettings.normalurl"/></label>
http://<form:input id="urlRedirectFrom" path="urlRedirectFrom" size="16" cssStyle="margin-left:0.25em"/>.libresonic.org
http://<form:input id="urlRedirectFrom" path="urlRedirectFrom" size="16" cssStyle="margin-left:0.25em"/>.libresonic.org (<fmt:message key="networksettings.urlRedirectDisabled"/>)
</p>
<p>
@@ -100,4 +100,4 @@
</form:form>
</body>
</html>
</html>