mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk web) show pieces info in the inspector
This commit is contained in:
parent
f6c6ebdf70
commit
4cf0d0986a
3 changed files with 10 additions and 1 deletions
|
@ -80,6 +80,8 @@
|
||||||
<div class="inspector_group">
|
<div class="inspector_group">
|
||||||
<div class="inspector_group_label">Information</div>
|
<div class="inspector_group_label">Information</div>
|
||||||
<div class="inspector_row">
|
<div class="inspector_row">
|
||||||
|
<div class="inspector_label">Pieces:</div>
|
||||||
|
<div id="torrent_inspector_pieces"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inspector_row">
|
<div class="inspector_row">
|
||||||
<div class="inspector_label">Hash:</div>
|
<div class="inspector_label">Hash:</div>
|
||||||
|
|
|
@ -28,7 +28,7 @@ Torrent._ErrTrackerError = 2;
|
||||||
Torrent._ErrLocalError = 3;
|
Torrent._ErrLocalError = 3;
|
||||||
|
|
||||||
Torrent._StaticFields = [ 'addedDate', 'comment', 'creator', 'dateCreated',
|
Torrent._StaticFields = [ 'addedDate', 'comment', 'creator', 'dateCreated',
|
||||||
'hashString', 'id', 'isPrivate', 'name', 'totalSize' ]
|
'hashString', 'id', 'isPrivate', 'name', 'totalSize', 'pieceCount', 'pieceSize' ]
|
||||||
Torrent._DynamicFields = [ 'downloadedEver', 'error', 'errorString', 'eta',
|
Torrent._DynamicFields = [ 'downloadedEver', 'error', 'errorString', 'eta',
|
||||||
'haveUnchecked', 'haveValid', 'leftUntilDone', 'peersConnected',
|
'haveUnchecked', 'haveValid', 'leftUntilDone', 'peersConnected',
|
||||||
'peersGettingFromUs', 'peersSendingToUs', 'rateDownload', 'rateUpload',
|
'peersGettingFromUs', 'peersSendingToUs', 'rateDownload', 'rateUpload',
|
||||||
|
@ -46,6 +46,8 @@ Torrent.prototype =
|
||||||
this._hashString = data.hashString;
|
this._hashString = data.hashString;
|
||||||
this._date = data.addedDate;
|
this._date = data.addedDate;
|
||||||
this._size = data.totalSize;
|
this._size = data.totalSize;
|
||||||
|
this._pieceCount = data.pieceCount;
|
||||||
|
this._pieceSize = data.pieceSize;
|
||||||
this._comment = data.comment;
|
this._comment = data.comment;
|
||||||
this._creator = data.creator;
|
this._creator = data.creator;
|
||||||
this._creator_date = data.dateCreated;
|
this._creator_date = data.dateCreated;
|
||||||
|
|
|
@ -98,6 +98,7 @@ Transmission.prototype =
|
||||||
this._inspector._info_tab.size = $(ti+'size')[0];
|
this._inspector._info_tab.size = $(ti+'size')[0];
|
||||||
this._inspector._info_tab.state = $(ti+'state')[0];
|
this._inspector._info_tab.state = $(ti+'state')[0];
|
||||||
this._inspector._info_tab.swarm_speed = $(ti+'swarm_speed')[0];
|
this._inspector._info_tab.swarm_speed = $(ti+'swarm_speed')[0];
|
||||||
|
this._inspector._info_tab.pieces = $(ti+'pieces')[0];
|
||||||
this._inspector._info_tab.uploaded = $(ti+'uploaded')[0];
|
this._inspector._info_tab.uploaded = $(ti+'uploaded')[0];
|
||||||
this._inspector._info_tab.upload_speed = $(ti+'upload_speed')[0];
|
this._inspector._info_tab.upload_speed = $(ti+'upload_speed')[0];
|
||||||
this._inspector._info_tab.upload_to = $(ti+'upload_to')[0];
|
this._inspector._info_tab.upload_to = $(ti+'upload_to')[0];
|
||||||
|
@ -936,6 +937,7 @@ Transmission.prototype =
|
||||||
var total_size = 0;
|
var total_size = 0;
|
||||||
var total_state = null;
|
var total_state = null;
|
||||||
var total_swarm_speed = 0;
|
var total_swarm_speed = 0;
|
||||||
|
var pieces = 'N/A';
|
||||||
var total_upload = 0;
|
var total_upload = 0;
|
||||||
var total_upload_peers = 0;
|
var total_upload_peers = 0;
|
||||||
var total_upload_speed = 0;
|
var total_upload_speed = 0;
|
||||||
|
@ -949,6 +951,7 @@ Transmission.prototype =
|
||||||
{
|
{
|
||||||
setInnerHTML( tab.name, 'No Selection' );
|
setInnerHTML( tab.name, 'No Selection' );
|
||||||
setInnerHTML( tab.size, na );
|
setInnerHTML( tab.size, na );
|
||||||
|
setInnerHTML( tab.pieces, na );
|
||||||
setInnerHTML( tab.hash, na );
|
setInnerHTML( tab.hash, na );
|
||||||
setInnerHTML( tab.state, na );
|
setInnerHTML( tab.state, na );
|
||||||
setInnerHTML( tab.download_speed, na );
|
setInnerHTML( tab.download_speed, na );
|
||||||
|
@ -989,6 +992,7 @@ Transmission.prototype =
|
||||||
download_dir = t._download_dir;
|
download_dir = t._download_dir;
|
||||||
|
|
||||||
hash = t.hash();
|
hash = t.hash();
|
||||||
|
pieces = t._pieceCount + ', ' + Math.formatBytes(t._pieceSize);
|
||||||
date_created = Math.formatTimestamp( t._creator_date );
|
date_created = Math.formatTimestamp( t._creator_date );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1022,6 +1026,7 @@ Transmission.prototype =
|
||||||
|
|
||||||
setInnerHTML( tab.name, name );
|
setInnerHTML( tab.name, name );
|
||||||
setInnerHTML( tab.size, torrents.length ? Math.formatBytes( total_size ) : na );
|
setInnerHTML( tab.size, torrents.length ? Math.formatBytes( total_size ) : na );
|
||||||
|
setInnerHTML( tab.pieces, pieces );
|
||||||
setInnerHTML( tab.hash, hash );
|
setInnerHTML( tab.hash, hash );
|
||||||
setInnerHTML( tab.state, total_state );
|
setInnerHTML( tab.state, total_state );
|
||||||
setInnerHTML( tab.download_speed, torrents.length ? Math.formatBytes( total_download_speed ) + '/s' : na );
|
setInnerHTML( tab.download_speed, torrents.length ? Math.formatBytes( total_download_speed ) + '/s' : na );
|
||||||
|
|
Loading…
Reference in a new issue