|
From: <fg...@us...> - 2014-11-07 14:29:02
|
Revision: 4608
http://openutils.svn.sourceforge.net/openutils/?rev=4608&view=rev
Author: fgiust
Date: 2014-11-07 14:28:59 +0000 (Fri, 07 Nov 2014)
Log Message:
-----------
catch invalid sizes for thumbnail creation
Modified Paths:
--------------
tags/openutils-mgnlmedia-5.0.1-relative/src/main/resources/META-INF/tags/media/player.tag
Modified: tags/openutils-mgnlmedia-5.0.1-relative/src/main/resources/META-INF/tags/media/player.tag
===================================================================
--- tags/openutils-mgnlmedia-5.0.1-relative/src/main/resources/META-INF/tags/media/player.tag 2014-11-03 11:55:14 UTC (rev 4607)
+++ tags/openutils-mgnlmedia-5.0.1-relative/src/main/resources/META-INF/tags/media/player.tag 2014-11-07 14:28:59 UTC (rev 4608)
@@ -59,22 +59,26 @@
<c:if test="${empty height or height eq '0'}">
<c:set var="height" value="${media.type eq 'audio' ? 20 : 240}" />
</c:if>
- <c:set var="previewwidth" value="${width}" />
- <c:set var="previewheight" value="${height}" />
- <c:if test="${previewheight gt 20 and (controlbar eq 'bottom' or controlbar eq 'top')}">
- <c:set var="previewheight" value="${previewheight - 20}" />
- </c:if>
+
+ <c:set var="previewwidth" value="${width}" />
+ <c:set var="previewheight" value="${height}" />
+
+ <c:catch>
+ <c:if test="${previewheight gt 20 and (controlbar eq 'bottom' or controlbar eq 'top')}">
+ <c:set var="previewheight" value="${previewheight - 20}" />
+ </c:if>
+ </c:catch>
+
<c:if test="${thumbnail and empty preview}">
- <c:choose>
- <c:when test="${previewwidth gt 0 and previewheight gt 0}">
+ <c:set var="preview" value="${pageContext.request.contextPath}${media:thumbnail(mediaNode)}" />
+ <c:catch>
+ <c:if test="${previewwidth gt 0 and previewheight gt 0}">
<c:set var="previewres" value="${previewwidth}x${previewheight}" />
<c:set var="preview" value="${pageContext.request.contextPath}${media:urlres(mediaNode, previewres)}" />
- </c:when>
- <c:otherwise>
- <c:set var="preview" value="${pageContext.request.contextPath}${media:thumbnail(mediaNode)}" />
- </c:otherwise>
- </c:choose>
+ </c:if>
+ </c:catch>
</c:if>
+
<c:if test="${!empty(url)}">
<c:choose>
<c:when test="${player eq 'jwplayer5' or player eq 'jwplayer'}">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|