1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

remove unnecessary field test

This commit is contained in:
Jordan Lee 2011-08-26 21:51:14 +00:00
parent ac73391524
commit 6f8be90491

View file

@ -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]);