Patch that disables Subsonic license checking and validation
Index: subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
===================================================================
--- subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (revision 2462)
+++ subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (working copy)
@@ -589,10 +589,7 @@
}
public boolean isLicenseValid(String email, String license) {
- if (email == null || license == null) {
- return false;
- }
- return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
+ return true;
}
public String getDownsamplingCommand() {
@@ -1136,31 +1133,7 @@
}
private void validateLicense() {
- String email = getLicenseEmail();
- Date date = getLicenseDate();
-
- if (email == null || date == null) {
- licenseValidated = false;
- return;
- }
-
licenseValidated = true;
-
- 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=" + email +
- "&date=" + date.getTime() + "&version=" + versionService.getLocalVersion());
- try {
- ResponseHandler<String> responseHandler = new BasicResponseHandler();
- String content = client.execute(method, responseHandler);
- licenseValidated = content != null && content.contains("true");
- LOG.debug("License validated: " + licenseValidated);
- } catch (Throwable x) {
- LOG.warn("Failed to validate license.", x);
- } finally {
- client.getConnectionManager().shutdown();
- }
}
public void validateLicenseAsync() {
Update: Go to this repository to find a maintained fork of Subsonic without the licensing. This other repository is another fork and has more followers.
A patch to disable the licensing functionality in Subsonic, a GPL-licensed media streaming server/web interface. Use of the mobile apps requires you to get a license after 30 days of trial. You obtain a license via donation.
Except that's not a donation. So, here's a patch to fix that. Support the Subsonic project with a donation that's actually a donation. The program is developed and maintained very well.
svn co https://subsonic.svn.sourceforge.net/svnroot/subsonic/trunk subsonic
Check out a different branch if you want a specific version.
From the branch root:
patch -p0 < nolicense.patch
mvn install
cd subsonic-booter/
mvn install
Replace the downloaded subsonic.war and subsonic-booter-with-dependencies.jar with the newly compiled ones. Compilation of subsonic-booter is probably optional. It's just a precaution in case the branch you are compiling is newer than whatever version you downloaded.