(trunk web) remove the files when the torrent is removed

This commit is contained in:
Kevin Glowacz
2009-05-27 23:12:06 +00:00
parent ac78a8625f
commit 782130435a
2 changed files with 6 additions and 0 deletions

View File

@@ -484,6 +484,11 @@ Torrent.prototype =
} }
}, },
deleteFiles: function(){
if (this._fileList)
$(this._fileList).remove();
},
/* /*
* Return true if this torrent is selected * Return true if this torrent is selected
*/ */

View File

@@ -1239,6 +1239,7 @@ Transmission.prototype =
var pos = Torrent.indexOf( tr._torrents, torrent.id( ) ); var pos = Torrent.indexOf( tr._torrents, torrent.id( ) );
torrent.hideFileList(); torrent.hideFileList();
torrent.deleteFiles();
tr._torrents.splice( pos, 1 ); tr._torrents.splice( pos, 1 );
} }
}); });