/// <summary> /// Initializes a new instance of the <see cref="AddNewTorrentViewModel"/> class. /// </summary> /// <param name="dialogService">The dialog service.</param> /// <param name="torrentService">The torrent service.</param> public AddNewTorrentViewModel(IDialogService dialogService, ITorrentService torrentService) { DisplayName = "Add new torrent"; _dialogService = dialogService; _torrentService = torrentService; }
public void DelayedInitialize() { bus = Bus.Session; try { // Get the service and call a method on it to ensure that it is // running and able to answer queries. service = bus.GetObject <ITorrentService> (BusName, ServicePath); service.GetAvailableEngines(); } catch { // Try one more time try { service = bus.GetObject <ITorrentService> (BusName, ServicePath); service.GetAvailableEngines(); } catch { Log.Error("Torrent backend could not be found and could not be auto-started"); service = null; return; } } // Register with Migo so we can handle .torrent downloads if (!RegisteredInMigo) { Migo.DownloadCore.DownloadManager.Register("torrent", typeof(TorrentFileDownloadTask)); } RegisteredInMigo = true; // Get the engine from DBus which we will use to download torrents with // and load the details for any existing downloads engine = bus.GetObject <IEngine> (BusName, service.GetEngine(EngineName)); CheckExistingDownloads(); }
public CreateTorrentWidgetController(ITorrentService torrentService, ITaxonomyService taxonomyService, IModelStateValidatorService modelStateValidatorService) { _torrentService = torrentService; _taxonomyService = taxonomyService; _modelStateValidatorService = modelStateValidatorService; }
private const int UntrackedDelayIntervalMiliseconds = 126_000; // 2.1 minutes. public DownloaderService(IReadOnlyCollection <IFeed> feeds, ILogger <DownloaderService> log, TorrentService torrentService, HistoryRepository historyRepo, ITorrentClient torrentClient) { _feeds = feeds; _log = log; _torrentService = torrentService; _historyRepo = historyRepo; _torrentClient = torrentClient; }
public TorrentController() { this.dynamicModuleManagerProvider = new DynamicModuleManagerProvider(); this.imageManagerProvider = new ImageManagerProvider(); this.torrentManagerProvider = new TorrentManagerProvider(); this.torrentService = new TorrentService(); this.userService = new UserService(); }
public static Task RelocateTorrentsAsync(this ITorrentService svc, IList <RelocateTorrentCommand> relocateTorrentCommands, bool verifyAfterMoving) { return(svc.RelocateTorrentsAsync(new RelocateTorrentsRequest { RelocateTorrentCommands = relocateTorrentCommands, VerifyAfterMoving = verifyAfterMoving })); }
public void Dispose() { if (service != null) { try { service.DestroyEngine(EngineName); } catch {} service = null; } }
public TorrentServiceTests() { var torrentRepository = MockInitializer.GetTorrentRepository(); var subcategoryRepository = MockInitializer.GetSubcategoryRepository(); var fileStorageService = MockInitializer.GetFileStorageService(); var unitOfWork = MockInitializer.GetUnitOfWork(); _torrentService = new TorrentService(torrentRepository, subcategoryRepository, fileStorageService, unitOfWork); }
/// <summary> /// Constructor /// </summary> /// <param name="dialogService">The dialog service.</param> /// <param name="torrentService">The torrent service.</param> /// <param name="messenger">The messenger.</param> /// <param name="serviceManager">The service manager.</param> public MainViewModel(IDialogService dialogService, ITorrentService torrentService, IMessageService messenger, IServiceManager serviceManager) { DisplayName = "Torrentific.Gui"; _dialogService = dialogService; _torrentService = torrentService; _messenger = messenger; _serviceManager = serviceManager; }
public CheckNewResourcesBackgroundService(IRulesContainer rulesContainer, IResApi resApi, IDownloader downloader, ITorrentService torrentService, IConfiguration configuration, ILogger <CheckNewResourcesBackgroundService> logger) { _rulesContainer = rulesContainer; _resApi = resApi; _downloader = downloader; _torrentService = torrentService; _configuration = configuration; _logger = logger; _checkPeriod = int.Parse(configuration["CheckPeriod"]); }
public TorrentController(ITorrentService torrentService, IMapper mapper) { _torrentService = torrentService; _mapper = mapper; }
public HomeController(ITorrentService torrentService) { this.TorrentService = torrentService; }
public TorrentsController(ITorrentService torrentService, IMapper mapper) : base(mapper) { _torrentService = torrentService; }
public void Dispose () { if (service != null) { try { service.DestroyEngine (EngineName); } catch {} service = null; } }
public void DelayedInitialize () { bus = Bus.Session; try { // Get the service and call a method on it to ensure that it is // running and able to answer queries. service = bus.GetObject<ITorrentService> (BusName, ServicePath); service.GetAvailableEngines (); } catch { // Try one more time try { service = bus.GetObject<ITorrentService> (BusName, ServicePath); service.GetAvailableEngines (); } catch { Log.Error ("Torrent backend could not be found and could not be auto-started"); service = null; return; } } // Register with Migo so we can handle .torrent downloads if (!RegisteredInMigo) Migo.DownloadCore.DownloadManager.Register ("torrent", typeof (TorrentFileDownloadTask)); RegisteredInMigo = true; // Get the engine from DBus which we will use to download torrents with // and load the details for any existing downloads engine = bus.GetObject <IEngine> (BusName, service.GetEngine (EngineName)); CheckExistingDownloads (); }
public TorrentsController(ITorrentService torrentService) { this.torrentService = torrentService; }
public TorrentController(ITorrentService torrentService) { this.torrentService = torrentService; }
public MainWindowViewModel(IUnityContainer container, IEpisodeRepository episodeRepository, ITorrentService torrentService, IEventAggregator eventAggregator, IServerRepository serverRepository, ITvShowDatabase tvShowDatabaseService, ITvShowRepository tvShowRepository, IMessageService messageService, IInternetService internetService) { this._container = container; this._episodeRepository = episodeRepository; this._torrentService = torrentService; this._eventAggregator = eventAggregator; this._serverRepository = serverRepository; this._tvShowDatabaseService = tvShowDatabaseService; this._tvShowRepository = tvShowRepository; this._messageService = messageService; this._internetService = internetService; this.SearchCommand = new DelegateCommand <object>(this.Execute_Search); this.StartDownloadCommand = new DelegateCommand <object>(this.Execute_StartDownloadCommand); this.LoadedCommand = new DelegateCommand <Episode>(this.Execute_LoadedCommand); this.ExitCommand = new DelegateCommand <object>(this.Execute_ExitCommand); this.UpdateCommand = new DelegateCommand <object>(this.Execute_UpdateCommand); this.MarkEpisodeAsDownloadedCommand = new DelegateCommand <object>(this.Execute_MarkEpisodeAsDownloadedCommand); this.DeleteEpisodeCommand = new DelegateCommand <object>(this.Execute_DeleteEpisodeCommand); this.GroupByCommand = new DelegateCommand <string>(this.Execute_GroupByCommand); this.EditEpisodeCommand = new DelegateCommand <EpisodeDTO>(this.Execute_EditEpisodeCommand); this.SearchFilesCommand = new DelegateCommand <object>(this.Execute_SearchFilesCommand); this.Episodes = new ObservableCollection <EpisodeDTO>(); this.InitializeEpisodesViewSource(); this.SearchAndDownloadButtonLabel = "Search Torrents"; this.SearchAndDownloadButtonImage = "/images/TorrentIcon128x128.png"; }
public static Task <List <RelocatableTorrentCandidate> > FindRelocatableTorrentCandidatesAsync(this ITorrentService svc, IEnumerable <string> pathsToScan, IEnumerable <int> torrentIds) { return(svc.FindRelocatableTorrentCandidatesAsync(new MapTorrentsToDiskRequest { PathsToScan = pathsToScan, TorrentIds = torrentIds })); }
public TorrentRepository(IDataService dataService, ITorrentService torrentService) { this.DataService = dataService; this.TorrentService = torrentService; }
public TorrentsController(ITorrentService service) { _torrentService = service; }