Conflicts: libresonic-main/pom.xml libresonic-main/src/main/java/org/libresonic/player/controller/ChangeCoverArtController.java libresonic-main/src/main/java/org/libresonic/player/controller/DLNASettingsController.java libresonic-main/src/main/java/org/libresonic/player/controller/InternetRadioSettingsController.java libresonic-main/src/main/java/org/libresonic/player/controller/PlayQueueController.java libresonic-main/src/main/java/org/libresonic/player/controller/RightController.java libresonic-main/src/main/java/org/libresonic/player/controller/ShareManagementController.java libresonic-main/src/main/java/org/libresonic/player/controller/ShareSettingsController.java libresonic-main/src/main/java/org/libresonic/player/controller/SonosSettingsController.java libresonic-main/src/main/java/org/libresonic/player/controller/TranscodingSettingsController.java libresonic-main/src/main/webapp/WEB-INF/libresonic-servlet.xml pom.xmlmaster
commit
e5dc517fa1
@ -0,0 +1,69 @@ |
||||
/* |
||||
* 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; |
||||
|
||||
/** |
||||
* @author Sindre Mehus |
||||
* @version $Id$ |
||||
*/ |
||||
public class AlbumNotes { |
||||
|
||||
private final String notes; |
||||
private final String musicBrainzId; |
||||
private final String lastFmUrl; |
||||
private final String smallImageUrl; |
||||
private final String mediumImageUrl; |
||||
private final String largeImageUrl; |
||||
|
||||
public AlbumNotes(String notes, String musicBrainzId, String lastFmUrl, String smallImageUrl, |
||||
String mediumImageUrl, String largeImageUrl) { |
||||
this.notes = notes; |
||||
this.musicBrainzId = musicBrainzId; |
||||
this.lastFmUrl = lastFmUrl; |
||||
this.smallImageUrl = smallImageUrl; |
||||
this.mediumImageUrl = mediumImageUrl; |
||||
this.largeImageUrl = largeImageUrl; |
||||
} |
||||
|
||||
public String getNotes() { |
||||
return notes; |
||||
} |
||||
|
||||
public String getMusicBrainzId() { |
||||
return musicBrainzId; |
||||
} |
||||
|
||||
public String getLastFmUrl() { |
||||
return lastFmUrl; |
||||
} |
||||
|
||||
public String getSmallImageUrl() { |
||||
return smallImageUrl; |
||||
} |
||||
|
||||
public String getMediumImageUrl() { |
||||
return mediumImageUrl; |
||||
} |
||||
|
||||
public String getLargeImageUrl() { |
||||
return largeImageUrl; |
||||
} |
||||
} |
@ -0,0 +1,50 @@ |
||||
/* |
||||
* 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 2014 (C) Sindre Mehus |
||||
*/ |
||||
|
||||
package org.libresonic.player.domain; |
||||
|
||||
/** |
||||
* @author Sindre Mehus |
||||
* @version $Id$ |
||||
*/ |
||||
public class LastFmCoverArt { |
||||
|
||||
private final String imageUrl; |
||||
private final String artist; |
||||
private final String album; |
||||
|
||||
public LastFmCoverArt(String imageUrl, String artist, String album) { |
||||
this.imageUrl = imageUrl; |
||||
this.artist = artist; |
||||
this.album = album; |
||||
} |
||||
|
||||
public String getImageUrl() { |
||||
return imageUrl; |
||||
} |
||||
|
||||
public String getArtist() { |
||||
return artist; |
||||
} |
||||
|
||||
public String getAlbum() { |
||||
return album; |
||||
} |
||||
} |
||||
|
@ -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; |
||||
} |
||||
} |
@ -0,0 +1,49 @@ |
||||
/** |
||||
* 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 2014 (C) Sindre Mehus |
||||
*/ |
||||
|
||||
package org.libresonic.player.service; |
||||
|
||||
import java.util.LinkedHashMap; |
||||
import java.util.Map; |
||||
|
||||
import de.umass.lastfm.cache.ExpirationPolicy; |
||||
|
||||
/** |
||||
* Artist and album info is cached permanently. Everything else is cached one year. |
||||
* |
||||
* @author Sindre Mehus |
||||
* @version $Id$ |
||||
*/ |
||||
public class LastFmExpirationPolicy implements ExpirationPolicy { |
||||
|
||||
private final static long ONE_YEAR = 12 * 30 * 24 * 3600 * 1000L; |
||||
|
||||
private final Map<String, Long> methodToExpirationTime = new LinkedHashMap<String, Long>() {{ |
||||
put("artist.getInfo", Long.MAX_VALUE); // Cache forever
|
||||
put("album.getInfo", Long.MAX_VALUE); // Cache forever
|
||||
put("album.search", -1L); // Don't cache
|
||||
}}; |
||||
|
||||
@Override |
||||
public long getExpirationTime(String method, Map<String, String> params) { |
||||
Long expirationTime = methodToExpirationTime.get(method); |
||||
return expirationTime == null ? ONE_YEAR : expirationTime; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,26 @@ |
||||
package org.libresonic.player.spring; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import org.libresonic.player.Logger; |
||||
import org.springframework.core.Ordered; |
||||
import org.springframework.web.servlet.HandlerExceptionResolver; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
public class LoggingExceptionResolver implements HandlerExceptionResolver, Ordered { |
||||
|
||||
private static final Logger logger = Logger.getLogger(LoggingExceptionResolver.class); |
||||
|
||||
@Override |
||||
public ModelAndView resolveException( |
||||
HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e |
||||
) { |
||||
logger.error("Exception occurred", e); |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public int getOrder() { |
||||
return Integer.MIN_VALUE; |
||||
} |
||||
} |
@ -1,144 +1,143 @@ |
||||
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1" %> |
||||
<%@ include file="include.jsp" %> |
||||
|
||||
<%-- |
||||
PARAMETERS |
||||
albumId: ID of album. |
||||
playlistId: ID of playlist. |
||||
podcastChannelId: ID of podcast channel |
||||
coverArtSize: Height and width of cover art. |
||||
caption1: Caption line 1 |
||||
caption2: Caption line 2 |
||||
caption3: Caption line 3 |
||||
captionCount: Number of caption lines to display (default 0) |
||||
showLink: Whether to make the cover art image link to the album page. |
||||
showZoom: Whether to display a link for zooming the cover art. |
||||
showChange: Whether to display a link for changing the cover art. |
||||
appearAfter: Fade in after this many milliseconds, or nil if no fading in should happen. |
||||
hideOverflow: Hide cover art overflow when height is greater than width |
||||
--%> |
||||
<c:choose> |
||||
<c:when test="${empty param.coverArtSize}"> |
||||
<c:set var="size" value="auto"/> |
||||
</c:when> |
||||
<c:otherwise> |
||||
<c:set var="size" value="${param.coverArtSize}px"/> |
||||
</c:otherwise> |
||||
</c:choose> |
||||
|
||||
<c:set var="captionCount" value="${empty param.captionCount ? 0 : param.captionCount}"/> |
||||
|
||||
<str:randomString count="5" type="alphabet" var="divId"/> |
||||
<str:randomString count="5" type="alphabet" var="imgId"/> |
||||
<str:randomString count="5" type="alphabet" var="playId"/> |
||||
|
||||
<div class="coverart dropshadow"> |
||||
<div style="width:${size};max-width:${size};height:${size};max-height:${size};cursor:pointer;<c:if test="${param.hideOverflow}">overflow:hidden</c:if>;" title="${param.caption1}" id="${divId}"> |
||||
|
||||
<c:if test="${not empty param.albumId}"> |
||||
<c:url value="main.view" var="targetUrl"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:url> |
||||
</c:if> |
||||
<c:if test="${not empty param.playlistId}"> |
||||
<c:url value="playlist.view" var="targetUrl"> |
||||
<c:param name="id" value="${param.playlistId}"/> |
||||
</c:url> |
||||
</c:if> |
||||
<c:if test="${not empty param.podcastChannelId}"> |
||||
<c:url value="podcastChannel.view" var="targetUrl"> |
||||
<c:param name="id" value="${param.podcastChannelId}"/> |
||||
</c:url> |
||||
</c:if> |
||||
|
||||
<c:url value="/coverArt.view" var="coverArtUrl"> |
||||
<c:if test="${not empty param.coverArtSize}"> |
||||
<c:param name="size" value="${param.coverArtSize}"/> |
||||
</c:if> |
||||
<c:if test="${not empty param.albumId}"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:if> |
||||
<c:if test="${not empty param.podcastChannelId}"> |
||||
<c:param name="id" value="pod-${param.podcastChannelId}"/> |
||||
</c:if> |
||||
<c:if test="${not empty param.playlistId}"> |
||||
<c:param name="id" value="pl-${param.playlistId}"/> |
||||
</c:if> |
||||
</c:url> |
||||
|
||||
<c:url value="/coverArt.view" var="zoomCoverArtUrl"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:url> |
||||
|
||||
<div style="position: relative; width: 0; height: 0"> |
||||
<img src="<spring:theme code="playOverlayImage"/>" id="${playId}" |
||||
style="position: relative; top: 8px; left: 8px; z-index: 2; display:none" > |
||||
</div> |
||||
<c:choose> |
||||
<c:when test="${param.showLink}"><a href="${targetUrl}" title="${param.caption1}"></c:when> |
||||
<c:when test="${param.showZoom}"><a href="${zoomCoverArtUrl}" rel="zoom" title="${param.caption1}"></c:when> |
||||
</c:choose> |
||||
<img src="${coverArtUrl}" id="${imgId}" alt="${param.caption1}" |
||||
style="display:none"> |
||||
<c:if test="${param.showLink or param.showZoom}"></a></c:if> |
||||
</div> |
||||
|
||||
<c:if test="${captionCount gt 0}"> |
||||
<div class="caption1" style="width:${param.coverArtSize - 16}px"><a href="${targetUrl}" title="${param.caption1}">${param.caption1}</a></div> |
||||
</c:if> |
||||
<c:if test="${captionCount gt 1}"> |
||||
<div class="caption2" style="width:${param.coverArtSize - 16}px">${param.caption2} </div> |
||||
</c:if> |
||||
<c:if test="${captionCount gt 2}"> |
||||
<div class="caption3" style="width:${param.coverArtSize - 16}px">${param.caption3} </div> |
||||
</c:if> |
||||
</div> |
||||
|
||||
<c:if test="${param.showChange or param.showZoom}"> |
||||
<div style="padding-top:6px;text-align:right"> |
||||
<c:if test="${param.showChange}"> |
||||
<c:url value="/changeCoverArt.view" var="changeCoverArtUrl"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:url> |
||||
<a class="detail" href="${changeCoverArtUrl}"><fmt:message key="coverart.change"/></a> |
||||
</c:if> |
||||
|
||||
<c:if test="${param.showZoom and param.showChange}"> |
||||
| |
||||
</c:if> |
||||
|
||||
<c:if test="${param.showZoom}"> |
||||
<a class="detail" rel="zoom" title="${param.caption1}" href="${zoomCoverArtUrl}"><fmt:message key="coverart.zoom"/></a> |
||||
</c:if> |
||||
</div> |
||||
</c:if> |
||||
|
||||
<script type="text/javascript"> |
||||
$(document).ready(function () { |
||||
setTimeout("$('#${imgId}').fadeIn(500)", ${empty param.appearAfter ? 0 : param.appearAfter}); |
||||
}); |
||||
|
||||
$("#${divId}").mouseenter(function () { |
||||
$("#${playId}").show(); |
||||
$("#${imgId}").stop(); |
||||
$("#${imgId}").animate({opacity: 0.7}, 150); |
||||
}); |
||||
$("#${divId}").mouseleave(function () { |
||||
$("#${playId}").hide(); |
||||
$("#${imgId}").stop(); |
||||
$("#${imgId}").animate({opacity: 1.0}, 150); |
||||
}); |
||||
$("#${playId}").click(function () { |
||||
<c:if test="${not empty param.albumId}"> |
||||
top.playQueue.onPlay(${param.albumId}); |
||||
</c:if> |
||||
<c:if test="${not empty param.playlistId}"> |
||||
top.playQueue.onPlayPlaylist(${param.playlistId}); |
||||
</c:if> |
||||
<c:if test="${not empty param.podcastChannelId}"> |
||||
top.playQueue.onPlayPodcastChannel(${param.podcastChannelId}); |
||||
</c:if> |
||||
}); |
||||
|
||||
</script> |
||||
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1" %> |
||||
<%@ include file="include.jsp" %> |
||||
|
||||
<%-- |
||||
PARAMETERS |
||||
albumId: ID of album. |
||||
playlistId: ID of playlist. |
||||
podcastChannelId: ID of podcast channel |
||||
coverArtSize: Height and width of cover art. |
||||
caption1: Caption line 1 |
||||
caption2: Caption line 2 |
||||
caption3: Caption line 3 |
||||
captionCount: Number of caption lines to display (default 0) |
||||
showLink: Whether to make the cover art image link to the album page. |
||||
showZoom: Whether to display a link for zooming the cover art. |
||||
showChange: Whether to display a link for changing the cover art. |
||||
appearAfter: Fade in after this many milliseconds, or nil if no fading in should happen. |
||||
--%> |
||||
<c:choose> |
||||
<c:when test="${empty param.coverArtSize}"> |
||||
<c:set var="size" value="auto"/> |
||||
</c:when> |
||||
<c:otherwise> |
||||
<c:set var="size" value="${param.coverArtSize}px"/> |
||||
</c:otherwise> |
||||
</c:choose> |
||||
|
||||
<c:set var="captionCount" value="${empty param.captionCount ? 0 : param.captionCount}"/> |
||||
|
||||
<str:randomString count="5" type="alphabet" var="divId"/> |
||||
<str:randomString count="5" type="alphabet" var="imgId"/> |
||||
<str:randomString count="5" type="alphabet" var="playId"/> |
||||
|
||||
<div class="coverart dropshadow"> |
||||
<div style="width:${size};max-width:${size};height:${size};max-height:${size};cursor:pointer" title="${param.caption1}" id="${divId}"> |
||||
|
||||
<c:if test="${not empty param.albumId}"> |
||||
<c:url value="main.view" var="targetUrl"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:url> |
||||
</c:if> |
||||
<c:if test="${not empty param.playlistId}"> |
||||
<c:url value="playlist.view" var="targetUrl"> |
||||
<c:param name="id" value="${param.playlistId}"/> |
||||
</c:url> |
||||
</c:if> |
||||
<c:if test="${not empty param.podcastChannelId}"> |
||||
<c:url value="podcastChannel.view" var="targetUrl"> |
||||
<c:param name="id" value="${param.podcastChannelId}"/> |
||||
</c:url> |
||||
</c:if> |
||||
|
||||
<c:url value="/coverArt.view" var="coverArtUrl"> |
||||
<c:if test="${not empty param.coverArtSize}"> |
||||
<c:param name="size" value="${param.coverArtSize}"/> |
||||
</c:if> |
||||
<c:if test="${not empty param.albumId}"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:if> |
||||
<c:if test="${not empty param.podcastChannelId}"> |
||||
<c:param name="id" value="pod-${param.podcastChannelId}"/> |
||||
</c:if> |
||||
<c:if test="${not empty param.playlistId}"> |
||||
<c:param name="id" value="pl-${param.playlistId}"/> |
||||
</c:if> |
||||
</c:url> |
||||
|
||||
<c:url value="/coverArt.view" var="zoomCoverArtUrl"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:url> |
||||
|
||||
<div style="position: relative; width: 0; height: 0"> |
||||
<img src="<spring:theme code="playOverlayImage"/>" id="${playId}" |
||||
style="position: relative; top: 8px; left: 8px; z-index: 2; display:none" > |
||||
</div> |
||||
<c:choose> |
||||
<c:when test="${param.showLink}"><a href="${targetUrl}" title="${param.caption1}"></c:when> |
||||
<c:when test="${param.showZoom}"><a href="${zoomCoverArtUrl}" rel="zoom" title="${param.caption1}"></c:when> |
||||
</c:choose> |
||||
<img src="${coverArtUrl}" id="${imgId}" alt="${param.caption1}" |
||||
style="display:none"> |
||||
<c:if test="${param.showLink or param.showZoom}"></a></c:if> |
||||
</div> |
||||
|
||||
<c:if test="${captionCount gt 0}"> |
||||
<div class="caption1" style="width:${param.coverArtSize - 16}px"><a href="${targetUrl}" title="${param.caption1}">${param.caption1}</a></div> |
||||
</c:if> |
||||
<c:if test="${captionCount gt 1}"> |
||||
<div class="caption2" style="width:${param.coverArtSize - 16}px">${param.caption2} </div> |
||||
</c:if> |
||||
<c:if test="${captionCount gt 2}"> |
||||
<div class="caption3" style="width:${param.coverArtSize - 16}px">${param.caption3} </div> |
||||
</c:if> |
||||
</div> |
||||
|
||||
<c:if test="${param.showChange or param.showZoom}"> |
||||
<div style="padding-top:6px;text-align:right"> |
||||
<c:if test="${param.showChange}"> |
||||
<c:url value="/changeCoverArt.view" var="changeCoverArtUrl"> |
||||
<c:param name="id" value="${param.albumId}"/> |
||||
</c:url> |
||||
<a class="detail" href="${changeCoverArtUrl}"><fmt:message key="coverart.change"/></a> |
||||
</c:if> |
||||
|
||||
<c:if test="${param.showZoom and param.showChange}"> |
||||
| |
||||
</c:if> |
||||
|
||||
<c:if test="${param.showZoom}"> |
||||
<a class="detail" rel="zoom" title="${param.caption1}" href="${zoomCoverArtUrl}"><fmt:message key="coverart.zoom"/></a> |
||||
</c:if> |
||||
</div> |
||||
</c:if> |
||||
|
||||
<script type="text/javascript"> |
||||
$(document).ready(function () { |
||||
setTimeout("$('#${imgId}').fadeIn(500)", ${empty param.appearAfter ? 0 : param.appearAfter}); |
||||
}); |
||||
|
||||
$("#${divId}").mouseenter(function () { |
||||
$("#${playId}").show(); |
||||
$("#${imgId}").stop(); |
||||
$("#${imgId}").animate({opacity: 0.7}, 150); |
||||
}); |
||||
$("#${divId}").mouseleave(function () { |
||||
$("#${playId}").hide(); |
||||
$("#${imgId}").stop(); |
||||
$("#${imgId}").animate({opacity: 1.0}, 150); |
||||
}); |
||||
$("#${playId}").click(function () { |
||||
<c:if test="${not empty param.albumId}"> |
||||
top.playQueue.onPlay(${param.albumId}); |
||||
</c:if> |
||||
<c:if test="${not empty param.playlistId}"> |
||||
top.playQueue.onPlayPlaylist(${param.playlistId}); |
||||
</c:if> |
||||
<c:if test="${not empty param.podcastChannelId}"> |
||||
top.playQueue.onPlayPodcastChannel(${param.podcastChannelId}); |
||||
</c:if> |
||||
}); |
||||
|
||||
</script> |
||||
|
||||
|
@ -1,93 +0,0 @@ |
||||
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1" %> |
||||
<%--@elvariable id="command" type="org.libresonic.player.command.PremiumSettingsCommand"--%> |
||||
<html> |
||||
<head> |
||||
<%@ include file="head.jsp" %> |
||||
<%@ include file="jquery.jsp" %> |
||||
</head> |
||||
<body class="mainframe bgcolor1"> |
||||
|
||||
<c:import url="settingsHeader.jsp"> |
||||
<c:param name="cat" value="premium"/> |
||||
<c:param name="restricted" value="${not command.user.adminRole}"/> |
||||
<c:param name="toast" value="${command.toast}"/> |
||||
</c:import> |
||||
|
||||
<c:if test="${not empty command.path}"> |
||||
<sub:url value="main.view" var="backUrl"> |
||||
<sub:param name="path" value="${command.path}"/> |
||||
</sub:url> |
||||
<div class="back"><a href="${backUrl}"> |
||||
<fmt:message key="common.back"/> |
||||
</a></div> |
||||
<br/> |
||||
</c:if> |
||||
|
||||
<div style="width:50em; max-width:50em"> |
||||
|
||||
<fmt:message key="premium.text"/> |
||||
<fmt:formatDate value="${command.licenseInfo.licenseExpires}" dateStyle="long" var="expirationDate"/> |
||||
|
||||
<c:if test="${command.licenseInfo.licenseValid}"> |
||||
<c:choose> |
||||
<c:when test="${empty command.licenseInfo.licenseExpires}"> |
||||
<p><b><fmt:message key="premium.licensed"/></b></p> |
||||
</c:when> |
||||
<c:otherwise> |
||||
<p><b><fmt:message key="premium.licensedexpires"><fmt:param value="${expirationDate}"/></fmt:message></b></p> |
||||
</c:otherwise> |
||||
</c:choose> |
||||
<c:if test="${not command.forceChange and not command.submissionError}"> |
||||
<p> |
||||
<fmt:message key="premium.licensedto"><fmt:param value="${command.licenseInfo.licenseEmail}"/></fmt:message> |
||||
</p> |
||||
<c:if test="${command.user.adminRole}"> |
||||
<div class="forward"><a href="premiumSettings.view?change"><fmt:message key="premium.forcechange"/></a></div> |
||||
</c:if> |
||||
</c:if> |
||||
</c:if> |
||||
|
||||
<c:if test="${not command.licenseInfo.licenseValid}"> |
||||
<c:if test="${not empty command.licenseInfo.licenseExpires}"> |
||||
<p><b><fmt:message key="premium.licensedexpired"><fmt:param value="${expirationDate}"/></fmt:message></b></p> |
||||
</c:if> |
||||
<p class="forward" style="font-size:1.2em;margin-left: 1em"><b><a href="http://libresonic.org/pages/premium.jsp" target="_blank"> |
||||
<fmt:message key="premium.getpremium"/> |
||||
<c:if test="${command.licenseInfo.trialDaysLeft gt 0}"> |
||||
– <fmt:message key="top.trialdaysleft"><fmt:param value="${command.licenseInfo.trialDaysLeft}"/></fmt:message> |
||||
</c:if> |
||||
</a></b></p> |
||||
|
||||
<p><fmt:message key="premium.register"/></p> |
||||
</c:if> |
||||
|
||||
<c:if test="${not command.licenseInfo.licenseValid or command.forceChange or command.submissionError}"> |
||||
<form:form commandName="command" method="post" action="premiumSettings.view"> |
||||
<form:hidden path="path"/> |
||||
<table> |
||||
<tr> |
||||
<td><fmt:message key="premium.register.email"/></td> |
||||
<td> |
||||
<form:input path="licenseInfo.licenseEmail" size="60"/> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td><fmt:message key="premium.register.license"/></td> |
||||
<td> |
||||
<form:input path="licenseCode" size="60"/> |
||||
</td> |
||||
<td><input type="submit" value="<fmt:message key="common.ok"/>"/></td> |
||||
</tr> |
||||
<tr> |
||||
<td/> |
||||
<td class="warning"><form:errors path="licenseCode"/></td> |
||||
</tr> |
||||
</table> |
||||
</form:form> |
||||
|
||||
<p><fmt:message key="premium.resend"/></p> |
||||
</c:if> |
||||
|
||||
</div> |
||||
</body> |
||||
</html> |
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in new issue