]> granicus.if.org Git - transmission/commitdiff
(trunk web) prevent extra pointless requests
authorKevin Glowacz <kevin@glowacz.info>
Fri, 22 May 2009 23:46:14 +0000 (23:46 +0000)
committerKevin Glowacz <kevin@glowacz.info>
Fri, 22 May 2009 23:46:14 +0000 (23:46 +0000)
web/javascript/transmission.js

index 96ace3ef14519880cd57ee2ee8e0bb064329389b..50eb10578058a6198b2431368820a87b56c87d81 100644 (file)
@@ -1110,7 +1110,8 @@ Transmission.prototype =
                    new_torrent_ids.push(this.id);
                } );
 
-               tr.remote.loadTorrentFiles( refresh_files_for );
+               if(refresh_files_for.length > 0)
+                       tr.remote.loadTorrentFiles( refresh_files_for );
 
                if(new_torrent_ids.length > 0)
                        tr.remote.getInitialDataFor(new_torrent_ids, function(torrents){ tr.addTorrents(torrents) } );