fixed torrent file names

This commit is contained in:
hamza zia 2012-10-30 11:03:40 +08:00
parent 8f8155b2e6
commit 7b0d42fee4

View File

@ -1,4 +1,4 @@
/* ex: set tabstop=4 */ /* vim: set tabstop=2:shiftwidth=2:softtabstop=2:noexpandtab */
var graphSize = 15; var graphSize = 15;
var graphData = []; var graphData = [];
var globalGraphData = null; var globalGraphData = null;
@ -375,6 +375,9 @@ function getTemplateCtx(data) {
var name; var name;
var seed = (data.files[0].path || data.files[0].uris[0].uri).split(/[/\\]/); var seed = (data.files[0].path || data.files[0].uris[0].uri).split(/[/\\]/);
name = seed[seed.length - 1]; name = seed[seed.length - 1];
if (data.bittorrent) {
name = data.bittorrent.info.name;
}
var chunks = percentage !== 100 && data.bitfield ? getChunksFromHex(data.bitfield, data.numPieces) : []; var chunks = percentage !== 100 && data.bitfield ? getChunksFromHex(data.bitfield, data.numPieces) : [];
var eta = changeTime((data.totalLength-data.completedLength)/data.downloadSpeed); var eta = changeTime((data.totalLength-data.completedLength)/data.downloadSpeed);