4
using System.Collections.Generic;
10
namespace Transmission {
12
public class TorrentVerifyAction: Act {
14
public TorrentVerifyAction() {
17
public override string Name {
18
get { return AddinManager.CurrentLocalizer.GetString ("Verify"); }
21
public override string Description {
22
get { return AddinManager.CurrentLocalizer.GetString ("Verify torrent"); }
25
public override string Icon {
26
get { return "dialog-question"; }
29
public override IEnumerable<Type> SupportedItemTypes {
30
get { yield return typeof (TorrentItem); }
33
public override IEnumerable<Item> Perform(IEnumerable<Item> items, IEnumerable<Item> modItems) {
34
TransmissionAPI api = TransmissionPlugin.getTransmission();
36
var hashes = items.Cast<TorrentItem>().Select(t => t.HashString);
37
api.VerifyTorrents(hashes);