Import current state of 5.3-kang branch

master
Eugene E. Kashpureff Jr 9 years ago
parent 73fedc1132
commit 4d160db69b
  1. 3
      .gitignore
  2. 6
      CONTRIBUTING.md
  3. 67
      INSTALL.md
  4. 1
      ISSUE_TEMPLATE.md
  5. 1
      PULL_REQUEST_TEMPLATE.md
  6. 46
      README.md
  7. 6
      pom.xml
  8. 8
      subsonic-installer-debian/pom.xml
  9. 37
      subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
  10. 3
      subsonic-main/src/main/resources/net/sourceforge/subsonic/i18n/ResourceBundle_en.properties
  11. 2
      subsonic-main/src/main/resources/net/sourceforge/subsonic/i18n/ResourceBundle_et.properties
  12. 34
      subsonic-main/src/main/webapp/WEB-INF/jsp/help.jsp
  13. 4
      subsonic-main/src/main/webapp/WEB-INF/jsp/home.jsp
  14. 2
      subsonic-main/src/main/webapp/WEB-INF/jsp/index.jsp
  15. 2
      subsonic-main/src/main/webapp/WEB-INF/jsp/settingsHeader.jsp
  16. 23
      subsonic-main/src/main/webapp/WEB-INF/jsp/top.jsp

3
.gitignore vendored

@ -1,2 +1 @@
.idea
target
target/

@ -0,0 +1,6 @@
Guidelines for Contributing
---------------------------
Libresonic currently does **NOT** diverge substantially from the original [Subsonic](http://subsonic.org). Please visit Issue #40 on Github for more details about the Rebrand process before continuing.
Until the Rebrand has finished Issues and Pull Requests will most likely not be accepted or put on hold. Please check back later once the Rebrand has been completed.

@ -0,0 +1,67 @@
<!--
# INSTALL.md
# Libresonic/libresonic
-->
Requirements
------------
* Recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.7.x series of OpenJDK or Oracle JDK 7+ should work.
* Optional: lintian and fakeroot, for .deb package
* Test as follows:
```
$ which mvn
/usr/local/bin/mvn
$ echo $JAVA_HOME
/usr/lib/jvm/java-1.7.0-openjdk.x86_64
$
```
Now you can clone a copy of this repository and switch to the `release` branch if it is not automatically checked out:
```
$ git clone git://github.com/Libresonic/libresonic.git
$ cd libresonic
$ git checkout release
$
```
Standalone WAR
--------------
At this point you are ready to build the basic Subsonic WAR. This is required for all the other build targets, so you should do it before proceeding.
```
$ mvn package
<lots of buildspam>
[INFO] Building war: /path/to/repo/subsonic/subsonic-main/target/subsonic.war
<more buildspam>
$
```
Tomcat Installation
-------------------
The WAR may be copied directly to a Tomcat server's webapps/ directory and deployed.
```
$ cp subsonic-main/target/subsonic.war /var/lib/tomcat6/webapps/
$
```
Packaged .deb
-------------
You can furthermore go ahead to create a .deb suitable for installation on Debian or Ubuntu. These instructions should similarly work with rpm(for RedHat/CentOS or Fedora), but it is has not been tested.
```
$ mvn -P full -pl subsonic-booter -am install
$ mvn -P full -pl subsonic-installer-debian/ -am install
$ sudo dpkg -i ./subsonic-installer-debian/target/subsonic-*.deb
$
```
Good luck!

@ -0,0 +1 @@
CONTRIBUTING.md

@ -0,0 +1 @@
CONTRIBUTING.md

@ -1,13 +1,43 @@
# Subsonic
Subsonic is a web-based media streamer, providing ubiquitous access to your music and video collection.
<!--
# README.md
# Libresonic/libresonic
-->
Libresonic
========
More than 20 apps are available for Android, iPhone, Windows Phone, Sonos etc.
What is Libresonic?
-----------------
Supports virtually all media formats, converting files on the fly.
Libresonic is a free, web-based media streamer, providing ubiqutious access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room.
Also includes a Podcast receiver and jukebox feature allowing you to control what's playing on your computer from your mobile phone.
Libresonic is designed to handle very large music collections (hundreds of gigabytes). Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins, Libresonic supports on-the-fly conversion and streaming of virtually any audio format, including WMA, FLAC, APE, Musepack, WavPack and Shorten.
Please see subsonic.org for more details.
If you have constrained bandwidth, you may set an upper limit for the bitrate of the music streams. Libresonic will then automatically resample the music to a suitable bitrate.
### Note
This source code is for Subsonic 5.3, which is the last version of Subsonic released with an open source license.
In addition to being a streaming media server, Libresonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Libresonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes.
Based on Java technology, Libresonic runs on most platforms, including Windows, Mac, Linux and Unix variants.
History
-----
The original [Subsonic](http://www.subsonic.org/) is developed by [Sindre Mehus](mailto:sindre@activeobjects.no). Subsonic was open source through version 6.0-beta1, and closed-source from then onwards.
Libresonic is maintained by [Eugene E. Kashpureff Jr](mailto:eugene@kashpureff.org). It originated as an unofficial("Kang") of Subsonic which did not contain the Licensing code checks present in the official builds. With the announcement of Subsonic's closed-source future, a decision was made to make a full fork and rebrand to Libresonic.
Libresonic will strive to maintain compatibility and stability for Subsonic users, including a clean upgrade path. New features and refactoring are welcomed as a Pull Request on Github.
License
-------
Libresonic is free software and licensed under the [GNU General Public License version 3](http://www.gnu.org/copyleft/gpl.html). The code in this repository(and associated binaries) are free of any "license key" or other restrictions. If you wish to thank the maintainer of this repository, please consider a donation to the [Electronic Frontier Foundation](https://supporters.eff.org/donate).
The original Subsonic was released under the GPLv3 through version 5.3. Beginning with 6.0, the software is only available under a commercial license. There is a [Subsonic Premium](http://www.subsonic.org/pages/premium.jsp) package which offers extra functionality. Subsonic also offers RPM, Deb, Exe, and other pre-built packages that Libresonic does not.
Usage
-----
A WAR compiled from the latest tag is provided on the [Releases page](https://github.com/Libresonic/libresonic/releases). This can be installed as a Tomcat or compatible webapp, and should "just work". Please see the [INSTALL document](https://github.com/Libresonic/libresonic/blob/release/INSTALL.md) for instructions on building from source.

@ -53,10 +53,6 @@
<name>Local Repository 2</name>
<url>file:../repo</url>
</pluginRepository>
<pluginRepository>
<id>Codehaus Repository</id>
<url>http://repository.codehaus.org/</url>
</pluginRepository>
</pluginRepositories>
<scm>
@ -99,6 +95,8 @@
<module>subsonic-installer-mac</module>
<module>subsonic-installer-debian</module>
<module>subsonic-installer-rpm</module>
<module>subsonic-backend</module>
<module>subsonic-site</module>
<module>subsonic-assembly</module>
</modules>
</profile>

@ -16,11 +16,11 @@
<profiles>
<profile>
<id>debian</id>
<id>linux</id>
<activation>
<property>
<name>debian</name>
</property>
<os>
<family>linux</family>
</os>
</activation>
<build>

@ -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() {

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

@ -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} &ndash; ${buildDateString}</td></tr>
<tr><td class="ruleTableHeader"><fmt:message key="help.version.title"/></td><td class="ruleTableCell">${versionString}-KANG &ndash; ${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"/>");

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

Loading…
Cancel
Save