Skip to content

Commit

Permalink
'#2234: Minor torrent parser formatting adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed May 31, 2024
1 parent d9d213e commit 572f9d2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.InfoHash"), info.infoHash, true);
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.PieceLength"), info.pieceLength);
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.NumberOfPieces"), info.numPieces);
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.NumberOfFiles"), files.size() - paddingEntries);
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.NumberOfFiles"), Long.valueOf(files.size() - paddingEntries));
if (foundInCase > 0) {
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.FilesFoundInCase"), foundInCase);
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.FilesFoundInCase"), Long.valueOf(foundInCase));
}
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.Announce"), info.announce);
outputInfo(xhtml, Messages.getString("TorrentFileDatParser.Comment"), info.comment);
Expand Down Expand Up @@ -235,8 +235,8 @@ public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
xhtml.startElement("td", "class", String.valueOf(colClass[col]));
if (str.length() == 0) {
str = " ";
} else if (col == 2) {
// File length column
} else if (col == 0 || col == 2) {
// Row number and File length columns
try {
str = LocalizedFormat.format(Long.parseLong(str));
} catch (Exception e) {
Expand Down

0 comments on commit 572f9d2

Please sign in to comment.