Import current state of 5.3-kang branch
This commit is contained in:
@@ -668,14 +668,11 @@ public class SettingsService {
|
||||
}
|
||||
|
||||
public boolean isLicenseValid() {
|
||||
return isLicenseValid(getLicenseEmail(), getLicenseCode()) && licenseValidated;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isLicenseValid(String email, String license) {
|
||||
if (email == null || license == null) {
|
||||
return false;
|
||||
}
|
||||
return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
|
||||
return true;
|
||||
}
|
||||
|
||||
public LicenseInfo getLicenseInfo() {
|
||||
@@ -1401,34 +1398,8 @@ public class SettingsService {
|
||||
private void validateLicense() {
|
||||
String email = getLicenseEmail();
|
||||
Date date = getLicenseDate();
|
||||
|
||||
if (email == null || date == null) {
|
||||
licenseValidated = false;
|
||||
return;
|
||||
}
|
||||
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
HttpConnectionParams.setConnectionTimeout(client.getParams(), 120000);
|
||||
HttpConnectionParams.setSoTimeout(client.getParams(), 120000);
|
||||
HttpGet method = new HttpGet("http://subsonic.org/backend/validateLicense.view" + "?email=" + StringUtil.urlEncode(email) +
|
||||
"&date=" + date.getTime() + "&version=" + versionService.getLocalVersion());
|
||||
try {
|
||||
ResponseHandler<String> responseHandler = new BasicResponseHandler();
|
||||
String content = client.execute(method, responseHandler);
|
||||
licenseValidated = content != null && !content.contains("false");
|
||||
if (!licenseValidated) {
|
||||
LOG.warn("License key is not valid.");
|
||||
}
|
||||
String[] lines = StringUtils.split(content);
|
||||
if (lines.length > 1) {
|
||||
licenseExpires = new Date(Long.parseLong(lines[1]));
|
||||
}
|
||||
|
||||
} catch (Throwable x) {
|
||||
LOG.warn("Failed to validate license.", x);
|
||||
} finally {
|
||||
client.getConnectionManager().shutdown();
|
||||
}
|
||||
licenseValidated = true;
|
||||
return;
|
||||
}
|
||||
|
||||
public synchronized void scheduleLicenseValidation() {
|
||||
|
||||
+2
-1
@@ -293,7 +293,8 @@ help.contact.title = Contact
|
||||
help.contact.text = {0} is developed and maintained by Sindre Mehus \
|
||||
(<a href="mailto:sindre@activeobjects.no">sindre@activeobjects.no</a>). \
|
||||
If you have any questions, comments or suggestions for improvements, please visit the \
|
||||
<a href="http://forum.subsonic.org" target="_blank">Subsonic Forum</a>.
|
||||
<a href="http://forum.subsonic.org" target="_blank">Subsonic Forum</a>.<br \> \
|
||||
Changes to the source have been made by <a href="https://madeitwor.se/">Eugene E. Kashpureff Jr</a>. No support is provided by him, and you may not receive support from the official Subsonic channels as a result.
|
||||
help.log = Log
|
||||
help.logfile = The complete log is saved in {0}.
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
# Estonian localization.
|
||||
# Author: Olav Mägi
|
||||
#
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<fmt:message key="common.unknown" var="versionString"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="versionString" value="${model.localVersion} (build ${model.buildNumber})"/>
|
||||
<c:set var="versionString" value="${model.localVersion}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
@@ -36,35 +36,7 @@
|
||||
|
||||
<table width="75%" class="ruleTable indent">
|
||||
|
||||
<tr><td class="ruleTableHeader"><fmt:message key="help.premium.title"/></td>
|
||||
<td class="ruleTableCell">
|
||||
<c:choose>
|
||||
<c:when test="${model.licenseInfo.licenseValid}">
|
||||
<c:choose>
|
||||
<c:when test="${model.user.settingsRole}">
|
||||
<a href="premiumSettings.view">Subsonic Premium</a>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
Subsonic Premium
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:if test="${not empty model.licenseInfo.licenseExpires}">
|
||||
<fmt:message key="help.premium.expires">
|
||||
<fmt:param><fmt:formatDate type="date" dateStyle="long" value="${model.licenseInfo.licenseExpires}"/></fmt:param>
|
||||
</fmt:message>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<fmt:message key="help.premium.upgrade"/>
|
||||
<c:if test="${not empty model.licenseInfo.licenseExpires}">
|
||||
<fmt:message key="help.premium.expired">
|
||||
<fmt:param><fmt:formatDate type="date" dateStyle="long" value="${model.licenseInfo.licenseExpires}"/></fmt:param>
|
||||
</fmt:message>
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td></tr>
|
||||
<tr><td class="ruleTableHeader"><fmt:message key="help.version.title"/></td><td class="ruleTableCell">${versionString} – ${buildDateString}</td></tr>
|
||||
<tr><td class="ruleTableHeader"><fmt:message key="help.version.title"/></td><td class="ruleTableCell">${versionString}-KANG – ${buildDateString}</td></tr>
|
||||
<tr><td class="ruleTableHeader"><fmt:message key="help.server.title"/></td><td class="ruleTableCell">${model.serverInfo} (<sub:formatBytes bytes="${model.usedMemory}"/> / <sub:formatBytes bytes="${model.totalMemory}"/>)</td></tr>
|
||||
<tr><td class="ruleTableHeader"><fmt:message key="help.license.title"/></td><td class="ruleTableCell">
|
||||
<a href="http://www.gnu.org/copyleft/gpl.html" target="_blank"><img style="float:right;margin-left: 10px" alt="GPL 3.0" src="<c:url value="/icons/default_light/gpl.png"/>"></a>
|
||||
@@ -94,4 +66,4 @@
|
||||
|
||||
<div class="forward"><a href="help.view?"><fmt:message key="common.refresh"/></a></div>
|
||||
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function init() {
|
||||
<c:if test="${model.listType eq 'random'}">
|
||||
setTimeout("refresh()", 20000);
|
||||
</c:if>
|
||||
setTimeout("refresh()", 60000);
|
||||
|
||||
<c:if test="${not model.musicFoldersExist}">
|
||||
$().toastmessage("showNoticeToast", "<fmt:message key="top.missing"/>");
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</script>
|
||||
</c:if>
|
||||
|
||||
<c:set var="categories" value="${param.restricted ? 'personal password player share premium' : 'musicFolder general advanced personal user player network share premium dlna sonos transcoding internetRadio podcast'}"/>
|
||||
<c:set var="categories" value="${param.restricted ? 'personal password player share' : 'musicFolder general advanced personal user player network share dlna sonos transcoding internetRadio podcast'}"/>
|
||||
<h1>
|
||||
<img src="<spring:theme code="settingsImage"/>" alt=""/>
|
||||
<span style="vertical-align: middle"><fmt:message key="settingsheader.title"/></span>
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
<fmt:message key="top.starred" var="starred"/>
|
||||
<fmt:message key="left.playlists" var="playlists"/>
|
||||
<fmt:message key="top.settings" var="settings"/>
|
||||
<fmt:message key="top.status" var="status" />
|
||||
<fmt:message key="top.podcast" var="podcast"/>
|
||||
<fmt:message key="top.more" var="more"/>
|
||||
<fmt:message key="top.help" var="help"/>
|
||||
@@ -75,37 +76,41 @@
|
||||
<img id="show-left-frame" src="<spring:theme code="viewAsListImage"/>" onclick="showLeftFrame()" alt="" style="display:${model.showSideBar ? 'none' : 'inline'};cursor:pointer">
|
||||
<img id="hide-left-frame" src="<spring:theme code="viewAsListImage"/>" onclick="hideLeftFrame()" alt="" style="display:${model.showSideBar ? 'inline' : 'none'};cursor:pointer">
|
||||
</td>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="home.view?" target="main"><img src="<spring:theme code="homeImage"/>" title="${home}" alt="${home}"></a>
|
||||
<div class="topHeader"><a href="home.view?" target="main">${home}</a></div>
|
||||
</td>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="nowPlaying.view?" target="main"><img src="<spring:theme code="nowPlayingImage"/>" title="${nowPlaying}" alt="${nowPlaying}"></a>
|
||||
<div class="topHeader"><a href="nowPlaying.view?" target="main">${nowPlaying}</a></div>
|
||||
</td>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="starred.view?" target="main"><img src="<spring:theme code="starredImage"/>" title="${starred}" alt="${starred}"></a>
|
||||
<div class="topHeader"><a href="starred.view?" target="main">${starred}</a></div>
|
||||
</td>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="playlists.view?" target="main"><img src="<spring:theme code="playlistImage"/>" title="${playlists}" alt="${playlists}"></a>
|
||||
<div class="topHeader"><a href="playlists.view?" target="main">${playlists}</a></div>
|
||||
</td>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:4em;padding-right:1em;text-align: center">
|
||||
<a href="podcastChannels.view?" target="main"><img src="<spring:theme code="podcastLargeImage"/>" title="${podcast}" alt="${podcast}"></a>
|
||||
<div class="topHeader"><a href="podcastChannels.view?" target="main">${podcast}</a></div>
|
||||
</td>
|
||||
<c:if test="${model.user.settingsRole}">
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="settings.view?" target="main"><img src="<spring:theme code="settingsImage"/>" title="${settings}" alt="${settings}"></a>
|
||||
<div class="topHeader"><a href="settings.view?" target="main">${settings}</a></div>
|
||||
</td>
|
||||
</c:if>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="status.view?" target="main"><img src="<spring:theme code="statusImage"/>" title="${status}" alt="${status}"></a>
|
||||
<div class="topHeader"><a href="status.view?" target="main">${status}</a></div>
|
||||
</td>
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="more.view?" target="main"><img src="<spring:theme code="moreImage"/>" title="${more}" alt="${more}"></a>
|
||||
<div class="topHeader"><a href="more.view?" target="main">${more}</a></div>
|
||||
</td>
|
||||
<td style="min-width:4em;padding-right:2em;text-align: center">
|
||||
<td style="min-width:3em;padding-right:1em;text-align: center">
|
||||
<a href="help.view?" target="main"><img src="<spring:theme code="helpImage"/>" title="${help}" alt="${help}"></a>
|
||||
<div class="topHeader"><a href="help.view?" target="main">${help}</a></div>
|
||||
</td>
|
||||
@@ -139,4 +144,4 @@
|
||||
|
||||
</tr></table>
|
||||
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
||||
Reference in New Issue
Block a user