Exemple #1
0
        private void AddConfigs(ApiSubscription[] subscriptions)
        {
            foreach (var sub in subscriptions)
            {
                sub.Config = new ApiSubscriptionConfig();

                if (optionManager.GetForSubscriptionNoResolve(Options.Subscriptions_AutoDownload, sub.Id, out var autoDownload))
                {
                    sub.Config.AutoDownload = autoDownload;
                }

                if (optionManager.GetForSubscriptionNoResolve(Options.Subscriptions_MaxCount, sub.Id, out var maxCount))
                {
                    sub.Config.DownloadMaxCount = maxCount;
                }

                if (optionManager.GetForSubscriptionNoResolve(Options.Subscriptions_DownloadOrder, sub.Id, out var order))
                {
                    sub.Config.DownloadOrder = order;
                }

                if (optionManager.GetForSubscriptionNoResolve(Options.Subscriptions_AutoDeleteWatched, sub.Id, out var autoDel))
                {
                    sub.Config.AutomaticDeleteWatched = autoDel;
                }

                if (optionManager.GetForSubscriptionNoResolve(Options.Subscriptions_DownloadPath, sub.Id, out var path))
                {
                    sub.Config.DownloadPath = path;
                }
            }
        }
 public bool?GetConfigAutoDownloadNoResolve(int subscriptionId)
 {
     if (optionManager.GetForSubscriptionNoResolve(Options.Subscriptions_AutoDownload, subscriptionId, out var value))
     {
         return(value);
     }
     return(null);
 }