};
this.getPath = function () {
var file = torrent.getFile(i);
- path = file.name.replace(/\/\/+/g,'/')
- path = path.split('/').slice(0,-1)
- path.push('t' + fields.torrent.getId() + 'f' + fields.index)
- return path
+ var path = file.name.replace(/\/\/+/g,'/');
+ path = path.split('/').slice(0,-1);
+ path.push('t' + fields.torrent.getId() + 'f' + fields.index);
+ return path;
};
initialize(torrent, i);
n = tor.getFileCount();
data.file_rows = [];
fragment = document.createDocumentFragment();
- heirarchy = {'/':[]}
+ heirarchy = {'/':[]}
for (i=0; i<n; ++i) {
row = data.file_rows[i] = new FileRow(tor, i);
}
}
}
+ console.log(heirarchy);
/*
At this point we have a single object containing the whole
torrent heirarchy. The '/' key is file element ids as assigned above