Esempio n. 1
0
        private static void OnTorrentErrorAlert(Core.torrent_error_alert a)
        {
            var evnt = new Models.ErrorCode(a.error);

            //notify web
            if (webServer != null)
            {
                var context = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext <www.SignalRHub>();
                context.Clients.All.notifyTorrentAdded(evnt);
            }

            TorrentError?.Invoke(null, evnt);
        }
 public AnnounceEntry(Core.AnnounceEntry ae)
 {
     CompleteSent = ae.complete_sent;
     Fails = ae.fails;
     FailLimit = ae.fail_limit;
     LastError = new ErrorCode(ae.last_error);
     Message = ae.message;
     MinAnnounce = ae.min_announce;
     NextAannounce = ae.next_announce;
     ScrapeComplete = ae.scrape_complete;
     ScrapeDownloaded = ae.scrape_downloaded;
     ScrapeIncomplete = ae.scrape_incomplete;
     SendStats = ae.send_stats;
     Source = ae.source;
     StartSent = ae.start_sent;
     Tier = ae.tier;
     Trackerid = ae.trackerid;
     Updating = ae.updating;
     Url = ae.url;
     Verified = ae.verified;
     IsWorking = ae.is_working();
     MinAnnounceIn = ae.min_announce_in();
     NextAnnounceIn = ae.next_announce_in();
 }
        private static void OnTorrentErrorAlert(Core.torrent_error_alert a)
        {
            var evnt = new Models.ErrorCode(a.error);

            //notify web
            if (webServer != null)
            {
                var context = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext<www.SignalRHub>();
                context.Clients.All.notifyTorrentAdded(evnt);
            }

            TorrentError?.Invoke(null, evnt);
        }