📄 subtitle.jsp
字号:
<%@page contentType="text/html;charset=ISO-8859-15" pageEncoding="ISO-8859-1"%>
<%@page import="org.homeplayer.util.*"%>
<%
VLCControl vlc = VLCControl.shareInstance();
VLCInfo info = (VLCInfo)request.getAttribute("VLCINFO") ;
if( request.getParameter("Valid") != null ) {
System.out.println( request.getQueryString()) ;
vlc.getHtmlVLC("setsubtitle.html?"+request.getQueryString()) ;
String fontSize = request.getParameter( "freetype-fontsize" );
if (fontSize != null) {
if (fontSize.equals("perso")) {
HPConf.set(HPConf.SUBTITLES_SIZE, request.getParameter( "freetype-fontsize-perso" ) ) ;
} else {
HPConf.set(HPConf.SUBTITLES_SIZE, fontSize) ;
}
}
String fontColor = request.getParameter( "freetype-color" );
if (fontColor != null) {
HPConf.set(HPConf.SUBTITLES_COLOR, fontColor);
}
String margin = request.getParameter( "sub-margin" );
if (margin != null) {
HPConf.set(HPConf.SUBTITLES_MARGIN, margin);
}
HPConf.saveSilently();
info = vlc.getInfo();
}
%>
<form action="info.jsp">
<input type=hidden name=MODE value=SUBTITLE>
<table>
<tr>
<td width=100>Pistes</td>
<td>
<%if( info.getSubTitleInfos().size()>0 ) { %>
<table cellpadding=0>
<%int i=0 ;
while( i<info.getSubTitleInfos().size() ) {
%>
<tr>
<% for( int j=i ; j<(i+3) ; j++ ) {
if( j<info.getSubTitleInfos().size() ) {
VLCInfo.SubTitleInfo sbinfo = info.getSubTitleInfos().get(j) ;
String selected = sbinfo.isSelected() ? "checked" : "" ;
String piste= StringUtil.gsub(sbinfo.getName(), "Piste","").trim() ;
piste= StringUtil.gsub(piste, "[","") ;
piste= StringUtil.gsub(piste, "]","") ;
piste= piste.substring(0,Math.min(12,piste.length())) ;
%>
<td><input type="radio" name="spu" value="<%=sbinfo.getId() %>" <%=selected%>><%=piste %></td>
<%} else {%>
<td> </td>
<%}
}
i+=3 ;%>
</tr>
<%} %>
</table>
<%} else { %>
Aucune
<%} %>
</td>
</tr>
<tr>
<td colspan=2><small>(Les param鑤res suivants seront pris en compte au prochain d閙arrage d'un m閐ia)</small></td>
</tr>
<tr>
<td width=100>Couleur</td>
<td>
<table><tr><%
int[] colors= new int[] {16777215,16776960,65535,16711680,32768} ;
String[] colornames= new String[] {"Blanc","Jaune","Cyan","Rouge","Vert"} ;
for( int i=0 ; i<colors.length ; i++ ) {
String selected = HPConf.getInt(HPConf.SUBTITLES_COLOR)==colors[i] ? "checked" : "" ;
%>
<td><input type="radio" name="freetype-color" value="<%=colors[i] %>" <%=selected%>><%=colornames[i] %></td>
<%} %>
</tr></table>
</td>
</tr>
<tr>
<td width=100>Taille</td>
<td><table><tr><%
int[] fontsizes= new int[] {12,16,20,24,30} ;
for( int i=0 ; i<fontsizes.length ; i++ ) {
String selected = HPConf.getInt(HPConf.SUBTITLES_SIZE)==fontsizes[i] ? "checked" : "" ;
%>
<td><input type="radio" name="freetype-fontsize" value="<%=fontsizes[i] %>" <%=selected%>><%=fontsizes[i] %></td>
<%}%>
</tr></table>
</td>
</tr>
<tr>
<td width=100>Position</td>
<td><input type=text name="sub-margin" size=3 maxlength=3 value="<%=HPConf.getInt(HPConf.SUBTITLES_MARGIN ) %>"></td>
</tr>
<tr><td colspan=2 align=center><img height=10></td></tr>
<tr><td colspan=2><input type=submit value="Sauvegarder" name="Valid"></td></tr>
</table>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -