#1817 Add "verify local data" feature to web client

This commit is contained in:
Mitchell Livingston 2009-03-04 00:19:11 +00:00
parent b997775a0d
commit 454e004bd9
3 changed files with 21 additions and 2 deletions

View File

@ -336,9 +336,11 @@
<ul>
<li id="context_pause_selected" class="disabled context_pause_selected">Pause Selected</li>
<li id="context_resume_selected" class="disabled context_resume_selected">Resume Selected</li>
<li id="context_remove">Remove From List...</li>
<li class="separator"></li>
<li id="context_removedata">Delete Data And Remove From List...</li>
<li id="context_remove">Remove From List...</li>
<li id="context_removedata">Trash Data & Remove From List...</li>
<li class="separator"></li>
<li id="context_verify">Verify Local Data</li>
<li class="separator"></li>
<li id="context_toggle_inspector">Show Inspector</li>
<li class="separator"></li>

View File

@ -204,6 +204,9 @@ Transmission.prototype =
contextRemoveDataSelected: function( ) {
transmission.removeSelectedTorrentsAndData( );
},
contextVerifySelected: function( ) {
transmission.verifySelectedTorrents( );
},
contextToggleInspector: function( ) {
transmission.toggleInspector( );
},
@ -224,6 +227,7 @@ Transmission.prototype =
context_resume_selected: this.contextStartSelected,
context_remove: this.contextRemoveSelected,
context_removedata: this.contextRemoveDataSelected,
context_verify: this.contextVerifySelected,
context_toggle_inspector: this.contextToggleInspector,
context_select_all: this.contextSelectAll,
context_deselect_all: this.contextDeselectAll
@ -1251,6 +1255,10 @@ Transmission.prototype =
this.remote.removeTorrentsAndData( torrents );
},
verifySelectedTorrents: function() {
this.verifyTorrents( this.getSelectedTorrents( ) );
},
startSelectedTorrents: function( ) {
this.startTorrents( this.getSelectedTorrents( ) );
},
@ -1263,6 +1271,12 @@ Transmission.prototype =
startTorrents: function( torrents ) {
this.remote.startTorrents( torrents );
},
verifyTorrent: function( torrent ) {
this.verifyTorrents( [ torrent ] );
},
verifyTorrents: function( torrents ) {
this.remote.verifyTorrents( torrents );
},
stopSelectedTorrents: function( ) {
this.stopTorrents( this.getSelectedTorrents( ) );

View File

@ -135,6 +135,9 @@ TransmissionRemote.prototype =
remote.loadTorrents();
}, "json" );
},
verifyTorrents: function( torrents ) {
this.sendTorrentCommand( 'torrent-verify', torrents );
},
addTorrentByUrl: function( url, options ) {
this.sendRequest( RPC._Root, $.toJSON({
method: 'torrent-add',