(trunk web) #2772 "Even after a magnet link gets metainfo, the Web GUI doesn't use that metainfo" -- fixed in trunk for 1.90

This commit is contained in:
Charles Kerr
2010-02-06 16:43:48 +00:00
parent 310e33bece
commit 89c55c5b6a
3 changed files with 81 additions and 25 deletions
+21
View File
@@ -1358,6 +1358,27 @@ Transmission.prototype =
this.setFilter( Prefs._FilterAll );
},
refreshMetaData: function(ids) {
var tr = this;
this.remote.getMetaDataFor(ids, function(active, removed){ tr.updateMetaData(active); });
},
updateMetaData: function( torrents )
{
var tr = this;
var refresh_files_for = [ ];
jQuery.each( torrents, function( ) {
var t = tr._torrents[ this.id ];
if( t ) {
t.refreshMetaData( this );
if( t.isSelected( ) )
refresh_files_for.push( t.id( ) );
}
} );
if( refresh_files_for.length > 0 )
tr.remote.loadTorrentFiles( refresh_files_for );
},
refreshTorrents: function(ids) {
var tr = this;
if (!ids)