Merge pull request #42 from carlmon/RenderingFixes

Rendering fixes
This commit is contained in:
ziahamza 2013-01-05 00:21:09 -08:00
commit 982c5a5535
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@
<script type="text/mustache" id="download_stopped_template">
<div class="row download_item download_stopped_item" data-gid="{{gid}}">
<div class="span2 download_name">
<b style="font-size: 12px;" class="tmp_name">{{settings_name}}</b>
<b style="font-size: 12px;" class="tmp_name">{{name}}</b>
</div>
<div class="span6">
{{#booleans.is_error}}

View File

@ -365,7 +365,7 @@ function getTemplateCtx(data) {
var name;
var seed = (data.files[0].path || data.files[0].uris[0].uri).split(/[/\\]/);
name = seed[seed.length - 1];
if (data.bittorrent) {
if (data.bittorrent && data.bittorrent.info) {
name = data.bittorrent.info.name;
}
var chunks = percentage !== 100 && data.bitfield ? getChunksFromHex(data.bitfield, data.numPieces) : [];