Removed the rest of the license, now builds

master
Zak Peirce 8 years ago
parent 66ae21856c
commit e06d9dbc22
  1. 3
      libresonic-main/src/main/java/org/libresonic/player/controller/NetworkSettingsController.java
  2. 89
      libresonic-main/src/main/java/org/libresonic/player/domain/LicenseInfo.java
  3. 1
      libresonic-main/src/main/java/org/libresonic/player/security/RESTRequestParameterProcessingFilter.java
  4. 1
      libresonic-main/src/main/java/org/libresonic/player/service/NetworkService.java
  5. 3
      libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java

@ -56,7 +56,6 @@ public class NetworkSettingsController {
command.setUrlRedirectFrom(settingsService.getUrlRedirectFrom());
command.setUrlRedirectCustomUrl(settingsService.getUrlRedirectCustomUrl());
command.setPort(settingsService.getPort());
command.setLicenseInfo(settingsService.getLicenseInfo());
model.addAttribute("command",command);
}
@ -86,4 +85,4 @@ public class NetworkSettingsController {
return "networkSettings";
}
}
}

@ -1,89 +0,0 @@
/*
This file is part of Libresonic.
Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/
package org.libresonic.player.domain;
import java.util.Date;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.service.SettingsService;
/**
* Controller for the "Podcast receiver" page.
*
* @author Sindre Mehus
*/
public class LicenseInfo {
private String licenseEmail;
private boolean licenseValid;
private final Date trialExpires;
private long trialDaysLeft;
private final Date licenseExpires;
public LicenseInfo(String licenseEmail, boolean licenseValid, Date trialExpires,
long trialDaysLeft, Date licenseExpires) {
this.licenseEmail = licenseEmail;
this.licenseValid = licenseValid;
this.trialExpires = trialExpires;
this.trialDaysLeft = trialDaysLeft;
this.licenseExpires = licenseExpires;
}
public String getLicenseEmail() {
return licenseEmail;
}
public void setLicenseEmail(String licenseEmail) {
this.licenseEmail = StringUtils.trimToNull(licenseEmail);
}
public boolean isLicenseValid() {
return licenseValid;
}
public void setLicenseValid(boolean licenseValid) {
this.licenseValid = licenseValid;
}
public boolean isTrial() {
return trialExpires != null && !licenseValid;
}
public boolean isTrialExpired() {
return trialExpires != null && (trialExpires.before(new Date()) || trialDaysLeft > SettingsService.TRIAL_DAYS + 1);
}
public boolean isLicenseOrTrialValid() {
return isLicenseValid() || !isTrialExpired();
}
public Date getTrialExpires() {
return trialExpires;
}
public long getTrialDaysLeft() {
return trialDaysLeft;
}
public Date getLicenseExpires() {
return licenseExpires;
}
}

@ -24,7 +24,6 @@ import org.apache.commons.lang.StringUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.controller.JAXBWriter;
import org.libresonic.player.controller.RESTController;
import org.libresonic.player.domain.LicenseInfo;
import org.libresonic.player.domain.User;
import org.libresonic.player.domain.Version;
import org.libresonic.player.service.SecurityService;

@ -240,7 +240,6 @@ public class NetworkService {
params.add(new BasicNameValuePair("localIp", settingsService.getLocalIpAddress()));
params.add(new BasicNameValuePair("localPort", String.valueOf(port)));
params.add(new BasicNameValuePair("contextPath", settingsService.getUrlRedirectContextPath()));
}

@ -236,6 +236,7 @@ public class SettingsService {
private static File libresonicHome;
private static final long LOCAL_IP_LOOKUP_DELAY_SECONDS = 60;
private String localIpAddress;
public SettingsService() {
@ -261,6 +262,7 @@ public class SettingsService {
}
}
}
}
/**
@ -1331,7 +1333,6 @@ public class SettingsService {
localIpAddress = Util.getLocalIpAddress();
}
};
executor.scheduleWithFixedDelay(task, 0L, LOCAL_IP_LOOKUP_DELAY_SECONDS, TimeUnit.SECONDS);
}
public void setInternetRadioDao(InternetRadioDao internetRadioDao) {

Loading…
Cancel
Save