mirror of https://github.com/zlatinb/muwire
more occurrences of SharedFile::getInfoHash #35
parent
2cc1e384bc
commit
8c110bbae5
|
@ -261,12 +261,13 @@ public class FilesServlet extends HttpServlet {
|
||||||
sb.append("<Name>").append(Util.escapeHTMLinXML(sf.getFile().getName())).append("</Name>");
|
sb.append("<Name>").append(Util.escapeHTMLinXML(sf.getFile().getName())).append("</Name>");
|
||||||
sb.append("<Path>").append(Util.escapeHTMLinXML(sf.getCachedPath())).append("</Path>");
|
sb.append("<Path>").append(Util.escapeHTMLinXML(sf.getCachedPath())).append("</Path>");
|
||||||
sb.append("<Size>").append(DataHelper.formatSize2Decimal(sf.getCachedLength())).append("B").append("</Size>");
|
sb.append("<Size>").append(DataHelper.formatSize2Decimal(sf.getCachedLength())).append("B").append("</Size>");
|
||||||
sb.append("<InfoHash>").append(Base64.encode(sf.getInfoHash().getRoot())).append("</InfoHash>");
|
sb.append("<InfoHash>").append(Base64.encode(sf.getRoot())).append("</InfoHash>");
|
||||||
if (sf.getComment() != null) {
|
if (sf.getComment() != null) {
|
||||||
String comment = DataUtil.readi18nString(Base64.decode(sf.getComment()));
|
String comment = DataUtil.readi18nString(Base64.decode(sf.getComment()));
|
||||||
sb.append("<Comment>").append(Util.escapeHTMLinXML(comment)).append("</Comment>");
|
sb.append("<Comment>").append(Util.escapeHTMLinXML(comment)).append("</Comment>");
|
||||||
}
|
}
|
||||||
sb.append("<Certified>").append(core.getCertificateManager().hasLocalCertificate(sf.getInfoHash())).append("</Certified>");
|
InfoHash ih = new InfoHash(sf.getRoot());
|
||||||
|
sb.append("<Certified>").append(core.getCertificateManager().hasLocalCertificate(ih)).append("</Certified>");
|
||||||
// TODO: other stuff
|
// TODO: other stuff
|
||||||
sb.append("</File>");
|
sb.append("</File>");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue