diff --git a/TVRename/Finders/FileFinder.cs b/TVRename/Finders/FileFinder.cs index d2529dce6..61278fa24 100644 --- a/TVRename/Finders/FileFinder.cs +++ b/TVRename/Finders/FileFinder.cs @@ -10,8 +10,6 @@ internal class FileFinder:Finder { public FileFinder(TVDoc i) : base(i) { } - private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger(); - public override bool Active() => TVSettings.Instance.SearchLocally; public override FinderDisplayType DisplayType() => FinderDisplayType.local; diff --git a/TVRename/Finders/RSSFinder.cs b/TVRename/Finders/RSSFinder.cs index f9ee0e024..4d1680b6e 100644 --- a/TVRename/Finders/RSSFinder.cs +++ b/TVRename/Finders/RSSFinder.cs @@ -10,8 +10,6 @@ internal class RSSFinder:Finder { public RSSFinder(TVDoc i) : base(i) { } - private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger(); - public override bool Active() => TVSettings.Instance.SearchRSS; public override FinderDisplayType DisplayType() => FinderDisplayType.rss; @@ -63,39 +61,39 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) } //We now want to rationlise the newItems - just in case we've added duplicates - List duplicateActionRSS = new List(); + List duplicateActionRss = new List(); foreach (Item x in newItems) { - if (!(x is ActionRSS testActionRSSOne)) + if (!(x is ActionRSS testActionRssOne)) continue; foreach (Item y in newItems) { - if (!(y is ActionRSS testActionRSSTwo)) + if (!(y is ActionRSS testActionRssTwo)) continue; if (x.Equals(y)) continue; string[] preferredTerms = TVSettings.Instance.PreferredRSSSearchTerms(); - if (testActionRSSOne.RSS.ShowName.ContainsOneOf(preferredTerms) && - !testActionRSSTwo.RSS.ShowName.ContainsOneOf(preferredTerms)) + if (testActionRssOne.RSS.ShowName.ContainsOneOf(preferredTerms) && + !testActionRssTwo.RSS.ShowName.ContainsOneOf(preferredTerms)) { - duplicateActionRSS.Add(testActionRSSTwo); - Logger.Info($"Removing {testActionRSSTwo.RSS.URL} as it is not as good a match as {testActionRSSOne.RSS.URL }"); + duplicateActionRss.Add(testActionRssTwo); + Logger.Info($"Removing {testActionRssTwo.RSS.URL} as it is not as good a match as {testActionRssOne.RSS.URL }"); } - if (testActionRSSOne.RSS.Title.ContainsOneOf(preferredTerms) && - !testActionRSSTwo.RSS.Title.ContainsOneOf(preferredTerms)) + if (testActionRssOne.RSS.Title.ContainsOneOf(preferredTerms) && + !testActionRssTwo.RSS.Title.ContainsOneOf(preferredTerms)) { - duplicateActionRSS.Add(testActionRSSTwo); + duplicateActionRss.Add(testActionRssTwo); Logger.Info( - $"Removing {testActionRSSTwo.RSS.URL} as it is not as good a match as {testActionRSSOne.RSS.URL}"); + $"Removing {testActionRssTwo.RSS.URL} as it is not as good a match as {testActionRssOne.RSS.URL}"); } } } - foreach (ActionRSS x in duplicateActionRSS) + foreach (ActionRSS x in duplicateActionRss) newItems.Remove(x); foreach (Item i in toRemove) @@ -133,14 +131,14 @@ public class RSSItemList : List private List regxps; // only trustable while in DownloadRSS or its called functions // ReSharper disable once InconsistentNaming - public bool DownloadRSS(string URL, List rexps) + public bool DownloadRSS(string url, List rexps) { regxps = rexps; System.Net.WebClient wc = new System.Net.WebClient(); try { - byte[] r = wc.DownloadData(URL); + byte[] r = wc.DownloadData(url); MemoryStream ms = new MemoryStream(r); @@ -240,7 +238,7 @@ private bool ReadItem(XmlReader r) string showName = ""; - TVDoc.FindSeasEp("", title, out int season, out int episode, out int maxEp, null, regxps); + TVDoc.FindSeasEp("", title, out int season, out int episode, out int _, null, regxps); try {