1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 13:16:53 +00:00

(trunk web) #4170 "Ask tracker for more peers" -- implemented by a nice patch from Dmitry

This commit is contained in:
Jordan Lee 2011-05-15 17:46:26 +00:00
parent e0754c8b98
commit a6f90b6a2e
3 changed files with 22 additions and 0 deletions

View file

@ -550,6 +550,8 @@
<li class="separator"></li>
<li id="context_verify">Verify Local Data</li>
<li class="separator"></li>
<li id="context_reannounce">Ask tracker for more peers</li>
<li class="separator"></li>
<li id="context_toggle_inspector">Show Inspector</li>
<li class="separator"></li>
<li id="context_select_all" class="context_select_all">Select All</li>

View file

@ -286,6 +286,9 @@ Transmission.prototype =
contextVerifySelected: function( ) {
this.verifySelectedTorrents( );
},
contextReannounceSelected: function( ) {
this.reannounceSelectedTorrents( );
},
contextToggleInspector: function( ) {
this.toggleInspector( );
},
@ -307,6 +310,7 @@ Transmission.prototype =
context_remove: function(e){ tr.contextRemoveSelected(e); },
context_removedata: function(e){ tr.contextRemoveDataSelected(e); },
context_verify: function(e){ tr.contextVerifySelected(e); },
context_reannounce: function(e){ tr.contextReannounceSelected(e); },
context_toggle_inspector: function(e){ tr.contextToggleInspector(e); },
context_select_all: function(e){ tr.contextSelectAll(e); },
context_deselect_all: function(e){ tr.contextDeselectAll(e); }
@ -1932,6 +1936,10 @@ Transmission.prototype =
this.verifyTorrents( this.getSelectedTorrents( ) );
},
reannounceSelectedTorrents: function() {
this.reannounceTorrents( this.getSelectedTorrents( ) );
},
startSelectedTorrents: function( ) {
this.startTorrents( this.getSelectedTorrents( ) );
},
@ -1955,6 +1963,15 @@ Transmission.prototype =
this.remote.verifyTorrents( torrent_ids, function(){ tr.refreshTorrents(torrent_ids) } );
},
reannounceTorrent: function( torrent ) {
this.reannounceTorrents( [ torrent ] );
},
reannounceTorrents: function( torrents ) {
var torrent_ids = jQuery.map(torrents, function(t) { return t.id(); } );
var tr = this;
this.remote.reannounceTorrents( torrent_ids, function(){ tr.refreshTorrents(torrent_ids) } );
},
stopSelectedTorrents: function( ) {
this.stopTorrents( this.getSelectedTorrents( ) );
},

View file

@ -244,6 +244,9 @@ TransmissionRemote.prototype =
verifyTorrents: function( torrent_ids, callback ) {
this.sendTorrentActionRequests( 'torrent-verify', torrent_ids, callback );
},
reannounceTorrents: function( torrent_ids, callback ) {
this.sendTorrentActionRequests( 'torrent-reannounce', torrent_ids, callback );
},
addTorrentByUrl: function( url, options ) {
var remote = this;
var o = {