public static Task <IndexReply> PublishAsync( this IIndexerClient client, string name, string torznabFeed, string apiKey, CancellationToken cancellationToken = default) => client.PublishAsync( new IndexRequest { Name = name, ApiKey = apiKey, TorznabFeed = torznabFeed }, cancellationToken);
public Worker( IIndexerClient indexerClient, IIndexWatcher watcher, IOptionsMonitor <PublisherOptions> optionsMonitor, ILogger <Worker> logger) { _indexerClient = indexerClient; _watcher = watcher; _options = optionsMonitor.CurrentValue; _reloadToken = optionsMonitor.OnChange(ReloadOptions); _logger = logger; }
public static void Main() { Application.InitializePaths(); if (CheckHelpVersion()) { return; } if (DBusConnection.ApplicationInstanceAlreadyRunning) { // DBus Command/Query/File Proxy Client BootClient("Halie"); NotifyStartupComplete(); } else if (DBusConnection.NameHasOwner("CollectionIndexer")) { // Tell the existing indexer to start Banshee when it's done IIndexerClient indexer = DBusServiceManager.FindInstance <IIndexerClient> ("CollectionIndexer", "/IndexerClient"); try { indexer.Hello(); indexer.RebootWhenFinished(Environment.GetCommandLineArgs()); Log.Warning("The Banshee indexer is currently running. Banshee will be started when the indexer finishes."); } catch (Exception e) { Log.Exception("CollectionIndexer found on the Bus, but doesn't say Hello", e); } } else if (ApplicationContext.CommandLine.Contains("indexer")) { // Indexer Client BootClient("Beroe"); } else if (ApplicationContext.CommandLine.Contains("client")) { BootClient(Path.GetFileNameWithoutExtension(ApplicationContext.CommandLine["client"])); } else { if (PlatformDetection.IsMeeGo) { BootClient("MeeGo"); } else { BootClient("Nereid"); } } }