public override void ExecuteAsync () { SetStatus (TaskStatus.Running); TorrentService s = Banshee.ServiceStack.ServiceManager.Get<TorrentService> (); downloader = s.Download (RemoteUri.ToString (), Path.GetDirectoryName (LocalPath)); torrent = TorrentService.Bus.GetObject <ITorrent> (TorrentService.BusName, downloader.GetTorrent ()); downloader.StateChanged += OnDownloaderStateChanged; // There are no events on the torrent IDownloader to indicate when the stats have updated // Manually ping the SetProgress event, otherwise migo never notices progress changing System.Threading.ThreadPool.QueueUserWorkItem (UpdateProgress); }
public override void ExecuteAsync() { SetStatus(TaskStatus.Running); TorrentService s = Banshee.ServiceStack.ServiceManager.Get <TorrentService> (); downloader = s.Download(RemoteUri.ToString(), Path.GetDirectoryName(LocalPath)); torrent = TorrentService.Bus.GetObject <ITorrent> (TorrentService.BusName, downloader.GetTorrent()); downloader.StateChanged += OnDownloaderStateChanged; // There are no events on the torrent IDownloader to indicate when the stats have updated // Manually ping the SetProgress event, otherwise migo never notices progress changing System.Threading.ThreadPool.QueueUserWorkItem(UpdateProgress); }