mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
remove unnecessary field test
This commit is contained in:
parent
ac73391524
commit
6f8be90491
1 changed files with 1 additions and 9 deletions
|
@ -153,20 +153,12 @@ Torrent.prototype =
|
|||
return announces.join('\t');
|
||||
},
|
||||
|
||||
isField: function(name) {
|
||||
return ( name === 'id' )
|
||||
|| ( Torrent.Fields.Stats.indexOf(name) !== -1 )
|
||||
|| ( Torrent.Fields.StatsExtra.indexOf(name) !== -1 )
|
||||
|| ( Torrent.Fields.InfoExtra.indexOf(name) !== -1 )
|
||||
|| ( Torrent.Fields.Metadata.indexOf(name) !== -1 );
|
||||
},
|
||||
|
||||
refreshFields: function(data)
|
||||
{
|
||||
var changed = false;
|
||||
|
||||
for (var key in data) {
|
||||
if (this.isField(key)) switch (key) {
|
||||
switch (key) {
|
||||
case 'files':
|
||||
case 'fileStats': // merge files and fileStats together
|
||||
changed |= this.updateFiles(data[key]);
|
||||
|
|
Loading…
Reference in a new issue