]> granicus.if.org Git - transmission/commitdiff
#1817 Add "verify local data" feature to web client
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 4 Mar 2009 00:19:11 +0000 (00:19 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 4 Mar 2009 00:19:11 +0000 (00:19 +0000)
web/index.html
web/javascript/transmission.js
web/javascript/transmission.remote.js

index cba594ae63aaceddd18bd91ba4387f989c6126e5..02c0da5e4d35cb07553131e0227a003e051c5e7b 100755 (executable)
                        <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 class="separator"></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_removedata">Delete Data And Remove From List...</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>
index 924f24678606ac3626f67c53a4be18495695e6c0..6237190c7340af73584247434fe5f7e97d11bd86 100644 (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( ) );
index b8f3283d75acfe6f9bfc158a28f14bbd30a73483..c8e262cbd7cfb0d8812fdb391757a736eefbf461 100644 (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',