diff --git a/TVRename/App/ApplicationBase.cs b/TVRename/App/ApplicationBase.cs index 605e37494..84253d3e2 100644 --- a/TVRename/App/ApplicationBase.cs +++ b/TVRename/App/ApplicationBase.cs @@ -32,6 +32,8 @@ protected override void OnCreateSplashScreen() protected override void OnCreateMainForm() { CommandLineArgs clargs = new CommandLineArgs(CommandLineArgs); + PathManager.ShowCollection = ""; + if (clargs.Hide) SplashScreen.SafeInvoke( () => ((TVRenameSplash)SplashScreen).Visible = false, true); @@ -55,12 +57,26 @@ protected override void OnCreateMainForm() SetupCustomSettings(clargs); - FileInfo tvdbFile = PathManager.TVDBFile; - FileInfo settingsFile = PathManager.TVDocSettingsFile; TVDoc doc; do // Loop until files correctly load { + // Try loading settings file + doc = new TVDoc(clargs); + + FileInfo tvdbFile = PathManager.TVDBFile; + FileInfo showsFile = PathManager.TVDocShowsFile; + + if (recover) doc.SetDirty(); + recover = !doc.LoadOk; + + // Continue if correctly loaded + if (!recover) continue; + + // Set recover message + recoverText = string.Empty; + if (!doc.LoadOk && !string.IsNullOrEmpty(doc.LoadErr)) recoverText = doc.LoadErr; + if (!TheTVDB.Instance.LoadOk && !string.IsNullOrEmpty(TheTVDB.Instance.LoadErr)) recoverText += $"{Environment.NewLine}{TheTVDB.Instance.LoadErr}"; if (recover) // Recovery required, prompt user { RecoverXML recoveryForm = new RecoverXML(recoverText); @@ -68,7 +84,7 @@ protected override void OnCreateMainForm() if (recoveryForm.ShowDialog() == DialogResult.OK) { tvdbFile = recoveryForm.DbFile; - settingsFile = recoveryForm.SettingsFile; + showsFile = recoveryForm.SettingsFile; } else { @@ -76,23 +92,6 @@ protected override void OnCreateMainForm() return; } } - - // Try loading TheTVDB cache file - TheTVDB.Instance.Setup(tvdbFile, PathManager.TVDBFile, clargs); - - // Try loading settings file - doc = new TVDoc(settingsFile, clargs); - - if (recover) doc.SetDirty(); - recover = !doc.LoadOk; - - // Continue if correctly loaded - if (!recover) continue; - - // Set recover message - recoverText = string.Empty; - if (!doc.LoadOk && !string.IsNullOrEmpty(doc.LoadErr)) recoverText = doc.LoadErr; - if (!TheTVDB.Instance.LoadOk && !string.IsNullOrEmpty(TheTVDB.Instance.LoadErr)) recoverText += $"{Environment.NewLine}{TheTVDB.Instance.LoadErr}"; } while (recover); ConvertSeriesTimeZones(doc, TheTVDB.Instance); diff --git a/TVRename/Custom Controls/MyListView.cs b/TVRename/Custom Controls/MyListView.cs index ab77c9a52..61fd656b7 100644 --- a/TVRename/Custom Controls/MyListView.cs +++ b/TVRename/Custom Controls/MyListView.cs @@ -53,7 +53,7 @@ protected override void OnItemSelectionChanged(ListViewItemSelectionChangedEvent protected override void OnItemCheck(ItemCheckEventArgs ice) { - if (!menuCheck && !keyCheck && !checkEnable) + if (!menuCheck && !keyCheck && (false == checkEnable)) { ice.NewValue = ice.CurrentValue; return; diff --git a/TVRename/DownloadIdentifers/DownloadXBMCImages.cs b/TVRename/DownloadIdentifers/DownloadXBMCImages.cs index dfe01e2a0..7fd94d5c6 100644 --- a/TVRename/DownloadIdentifers/DownloadXBMCImages.cs +++ b/TVRename/DownloadIdentifers/DownloadXBMCImages.cs @@ -126,7 +126,7 @@ public override ItemList ProcessSeason(ShowItem si, string folder, int snum, boo public override ItemList ProcessEpisode(ProcessedEpisode dbep, FileInfo filo, bool forceRefresh) { - if (TVSettings.Instance.EpTBNs || TVSettings.Instance.KODIImages) + if (TVSettings.Instance.EpTBNs) { ItemList theActionList = new ItemList(); if (dbep.Type == ProcessedEpisode.ProcessedEpisodeType.merged) diff --git a/TVRename/Finders/DownloadFinder.cs b/TVRename/Finders/DownloadFinder.cs new file mode 100644 index 000000000..3b3a84dd5 --- /dev/null +++ b/TVRename/Finders/DownloadFinder.cs @@ -0,0 +1,49 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using System.Collections.Generic; + +namespace TVRename +{ + public abstract class DownloadFinder:Finder + { + protected DownloadFinder(TVDoc doc) : base(doc) + { + } + + protected static IEnumerable FindDuplicates(ItemList newItems) + { + //We now want to rationlise the newItems - just in case we've added duplicates + List duplicateActionRss = new List(); + + foreach (Item x in newItems) + { + if (!(x is ActionTDownload testActionRssOne)) + continue; + foreach (Item y in newItems) + { + if (!(y is ActionTDownload testActionRssTwo)) + continue; + if (x.Equals(y)) continue; + + string[] preferredTerms = TVSettings.Instance.PreferredRSSSearchTerms(); + + if (testActionRssOne.SourceName.ContainsOneOf(preferredTerms) && + !testActionRssTwo.SourceName.ContainsOneOf(preferredTerms)) + { + duplicateActionRss.Add(testActionRssTwo); + Logger.Info( + $"Removing {testActionRssTwo.Produces} as it is not as good a match as {testActionRssOne.Produces}"); + } + } + } + + return duplicateActionRss; + } + } +} diff --git a/TVRename/Finders/FileFinder.cs b/TVRename/Finders/FileFinder.cs index 52cb135b5..d5719ffb0 100644 --- a/TVRename/Finders/FileFinder.cs +++ b/TVRename/Finders/FileFinder.cs @@ -1,3 +1,11 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + using System; using System.Collections.Generic; using System.Windows.Forms; @@ -37,15 +45,13 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) int currentItem = 0; int totalN = ActionList.Count; - foreach (Item action1 in ActionList) + foreach (ItemMissing me in ActionList.MissingItems()) { if (ActionCancel) return; prog.Invoke(startpct + ((totPct-startpct) * (++currentItem) / (totalN + 1))); - if (!(action1 is ItemMissing me)) continue; - ItemList thisRound = new ItemList(); List matchedFiles= new List(); @@ -60,19 +66,36 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) { if (!OtherActionsMatch(matchedFiles[0], me)) { - toRemove.Add(action1); + toRemove.Add(me); newList.AddRange(thisRound); } else { - Logger.Warn($"Ignoring potential match for {me.Episode.Show.ShowName} S{me.Episode.AppropriateSeasonNumber} E{action1.Episode.AppropriateEpNum}: with file {matchedFiles[0]?.TheFile.FullName} as there are multiple actions for that file"); + Logger.Warn($"Ignoring potential match for {me.Episode.Show.ShowName} S{me.Episode.AppropriateSeasonNumber} E{me.Episode.AppropriateEpNum}: with file {matchedFiles[0]?.TheFile.FullName} as there are multiple actions for that file"); + me.AddComment( + $"Ignoring potential match with file {matchedFiles[0]?.TheFile.FullName} as there are multiple actions for that file"); } } - else if (matchedFiles.Count > 1) + else if (matchedFiles.Count > 1) { - foreach (DirCacheEntry matchedFile in matchedFiles) + List bestMatchedFiles = IdentifyBestMatches(matchedFiles); + + if (bestMatchedFiles.Count == 1) { - Logger.Warn($"Ignoring potential match for {me.Episode.Show.ShowName} S{me.Episode.AppropriateSeasonNumber} E{action1.Episode.AppropriateEpNum}: with file {matchedFile?.TheFile.FullName} as there are multiple files for that action"); + //We have one file that is better, lets use it + toRemove.Add(me); + newList.AddRange(thisRound); + } + else + { + foreach (DirCacheEntry matchedFile in matchedFiles) + { + Logger.Warn( + $"Ignoring potential match for {me.Episode.Show.ShowName} S{me.Episode.AppropriateSeasonNumber} E{me.Episode.AppropriateEpNum}: with file {matchedFile?.TheFile.FullName} as there are multiple files for that action"); + + me.AddComment( + $"Ignoring potential match with file {matchedFile?.TheFile.FullName} as there are multiple files for that action"); + } } } } @@ -127,12 +150,34 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) ActionList.Add(i); } + private static List IdentifyBestMatches(List matchedFiles) + { + //See whether there are any of the matched files that stand out + List bestMatchedFiles = new List(); + foreach (DirCacheEntry matchedFile in matchedFiles) + { + //test first file against all the others + bool betterThanAllTheRest = true; + foreach (DirCacheEntry compareAgainst in matchedFiles) + { + if (matchedFile.TheFile.FullName == compareAgainst.TheFile.FullName) continue; + if (FileHelper.BetterQualityFile(matchedFile.TheFile, compareAgainst.TheFile) != + FileHelper.VideoComparison.FirstFileBetter) + { + betterThanAllTheRest = false; + } + } + if (betterThanAllTheRest) bestMatchedFiles.Add(matchedFile); + } + + return bestMatchedFiles; + } + private bool OtherActionsMatch(DirCacheEntry matchedFile, Item me) //This is used to check whether the selected file may match any other files we are looking for { - foreach (Item testAction in ActionList) + foreach (ItemMissing testMissingAction in ActionList.MissingItems()) { - if (!(testAction is ItemMissing testMissingAction)) continue; if (testMissingAction.SameAs(me)) continue; if (ReviewFile(testMissingAction, new ItemList(), matchedFile)) @@ -234,18 +279,7 @@ private static bool AlreadyHaveAction(ItemList actionlist, Item action) private static bool ActionListContains(ItemList actionlist, ActionCopyMoveRename newitem) { - foreach (Item ai2 in actionlist) - { - if (!(ai2 is ActionCopyMoveRename)) - continue; - - if (((ActionCopyMoveRename)(ai2)).SameSource(newitem)) - { - return true; - } - } - - return false; + return actionlist.CopyMoveItems().Any(cmAction => cmAction.SameSource(newitem)); } private bool ReviewFile(ItemMissing me, ItemList addTo, DirCacheEntry dce) diff --git a/TVRename/Finders/Finder.cs b/TVRename/Finders/Finder.cs index 328400ff8..79bf66b4a 100644 --- a/TVRename/Finders/Finder.cs +++ b/TVRename/Finders/Finder.cs @@ -2,14 +2,6 @@ namespace TVRename { public abstract class Finder { - public enum DownloadApp - { - // ReSharper disable once InconsistentNaming - SABnzbd, - uTorrent, - qBitTorrent - } - protected bool ActionCancel; protected readonly TVDoc Doc; protected static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger(); @@ -19,7 +11,7 @@ public enum DownloadApp protected Finder(TVDoc doc) => Doc = doc; // ReSharper disable once InconsistentNaming - public enum FinderDisplayType { local, downloading, rss} + public enum FinderDisplayType { local, downloading, search} public abstract void Check(SetProgressDelegate prog, int startpct, int totPct); diff --git a/TVRename/Finders/JSONWebpageFinder.cs b/TVRename/Finders/JSONWebpageFinder.cs new file mode 100644 index 000000000..d85966310 --- /dev/null +++ b/TVRename/Finders/JSONWebpageFinder.cs @@ -0,0 +1,96 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using System; +using System.Net; +using Newtonsoft.Json.Linq; + +namespace TVRename +{ + // ReSharper disable once InconsistentNaming + internal class JSONFinder: DownloadFinder + { + public JSONFinder(TVDoc i) : base(i) { } + + public override bool Active() => TVSettings.Instance.SearchJSON; + + public override FinderDisplayType DisplayType() => FinderDisplayType.search; + + public override void Check(SetProgressDelegate prog, int startpct, int totPct) + { + int c = ActionList.Count + 2; + int n = 1; + prog.Invoke(startpct); + + ItemList newItems = new ItemList(); + ItemList toRemove = new ItemList(); + + foreach (ItemMissing action in ActionList.MissingItems()) + { + if (ActionCancel) + return; + + prog.Invoke(startpct + ((totPct - startpct) * (++n) / (c))); + + ProcessedEpisode pe = action.Episode; + string simpleShowName = Helpers.SimplifyName(action.Episode.Show.ShowName); + string simpleSeriesName = Helpers.SimplifyName(action.Episode.TheSeries.Name); + + string imdbId= action.Episode.TheSeries.GetImdbNumber(); + + + if (string.IsNullOrWhiteSpace(imdbId)) continue; + + try + { + WebClient client = new WebClient(); + client.Headers.Add("user-agent", + "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"); + string response = client.DownloadString($"{TVSettings.Instance.SearchJSONURL}{imdbId}"); + + JObject jsonResponse = JObject.Parse(response); + + foreach (JToken item in jsonResponse[TVSettings.Instance.SearchJSONRootNode]) + { + string itemName = (string)item[TVSettings.Instance.SearchJSONFilenameToken]; + string itemUrl = (string)item[TVSettings.Instance.SearchJSONURLToken]; + + if (!FileHelper.SimplifyAndCheckFilename(itemName, simpleShowName, true, false) && + !FileHelper.SimplifyAndCheckFilename(itemName, simpleSeriesName, true, false)) continue; + + if (!TVDoc.FindSeasEp(itemName, out int seas, out int ep, out int _, action.Episode.Show)) + continue; + + if (seas != pe.AppropriateSeasonNumber) continue; + if (ep != pe.AppropriateEpNum) continue; + + Logger.Info($"Adding {itemUrl} as it appears to be match for {pe.Show.ShowName} S{pe.AppropriateSeasonNumber}E{pe.AppropriateEpNum}"); + newItems.Add(new ActionTDownload(itemName, itemUrl, action.TheFileNoExt, pe)); + toRemove.Add(action); + } + + } + catch (NullReferenceException _) + { + //No entries for this show + } + } + + foreach (ActionTDownload x in FindDuplicates(newItems)) + newItems.Remove(x); + + foreach (Item i in toRemove) + ActionList.Remove(i); + + foreach (Item action in newItems) + ActionList.Add(action); + + prog.Invoke(totPct); + } + } +} diff --git a/TVRename/Finders/RSSFinder.cs b/TVRename/Finders/RSSFinder.cs index 388626f8c..4f7badf48 100644 --- a/TVRename/Finders/RSSFinder.cs +++ b/TVRename/Finders/RSSFinder.cs @@ -6,13 +6,13 @@ namespace TVRename { // ReSharper disable once InconsistentNaming - internal class RSSFinder:Finder + internal class RSSFinder: DownloadFinder { public RSSFinder(TVDoc i) : base(i) { } public override bool Active() => TVSettings.Instance.SearchRSS; - public override FinderDisplayType DisplayType() => FinderDisplayType.rss; + public override FinderDisplayType DisplayType() => FinderDisplayType.search; public override void Check(SetProgressDelegate prog, int startpct, int totPct) { @@ -27,16 +27,13 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) ItemList newItems = new ItemList(); ItemList toRemove = new ItemList(); - foreach (Item testItem in ActionList) + foreach (ItemMissing action in ActionList.MissingItems()) { if (ActionCancel) return; prog.Invoke(startpct + ((totPct - startpct) * (++n) / (c))); - if (!(testItem is ItemMissing action)) - continue; - ProcessedEpisode pe = action.Episode; string simpleShowName = Helpers.SimplifyName(pe.Show.ShowName); string simpleSeriesName = Helpers.SimplifyName(pe.TheSeries.Name); @@ -54,15 +51,13 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) if (rss.Season != pe.AppropriateSeasonNumber) continue; if (rss.Episode != pe.AppropriateEpNum) continue; - Logger.Info($"Adding {rss.URL} as it appears to be match for {testItem.Episode.Show.ShowName} S{testItem.Episode.AppropriateSeasonNumber}E{testItem.Episode.AppropriateEpNum}"); - newItems.Add(new ActionRSS(rss, action.TheFileNoExt, pe)); - toRemove.Add(testItem); + Logger.Info($"Adding {rss.URL} as it appears to be match for {action.Episode.Show.ShowName} S{action.Episode.AppropriateSeasonNumber}E{action.Episode.AppropriateEpNum}"); + newItems.Add(new ActionTDownload(rss, action.TheFileNoExt, pe)); + toRemove.Add(action); } } - List duplicateActionRss = FindDuplicates(newItems); - - foreach (ActionRSS x in duplicateActionRss) + foreach (ActionTDownload x in FindDuplicates(newItems)) newItems.Remove(x); foreach (Item i in toRemove) @@ -74,42 +69,6 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) prog.Invoke(totPct); } - private static List FindDuplicates(ItemList newItems) - { - //We now want to rationlise the newItems - just in case we've added duplicates - List duplicateActionRss = new List(); - - foreach (Item x in newItems) - { - if (!(x is ActionRSS testActionRssOne)) - continue; - foreach (Item y in newItems) - { - 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)) - { - 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)) - { - duplicateActionRss.Add(testActionRssTwo); - Logger.Info( - $"Removing {testActionRssTwo.RSS.URL} as it is not as good a match as {testActionRssOne.RSS.URL}"); - } - } - } - - return duplicateActionRss; - } } // ReSharper disable once InconsistentNaming public class RSSItem diff --git a/TVRename/Finders/SABnzbdFinder.cs b/TVRename/Finders/SABnzbdFinder.cs index ab01c74a5..30b28da2f 100644 --- a/TVRename/Finders/SABnzbdFinder.cs +++ b/TVRename/Finders/SABnzbdFinder.cs @@ -1,3 +1,11 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + using System; using System.Net; using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; @@ -5,14 +13,12 @@ namespace TVRename { // ReSharper disable once InconsistentNaming - class SABnzbdFinder :Finder + class SABnzbdFinder : DownloadingFinder { public SABnzbdFinder(TVDoc i) : base(i) { } public override bool Active() => TVSettings.Instance.CheckSABnzbd; - public override FinderDisplayType DisplayType() => FinderDisplayType.downloading; - public override void Check(SetProgressDelegate prog, int startpct, int totPct) { if (string.IsNullOrEmpty(TVSettings.Instance.SABAPIKey) || string.IsNullOrEmpty(TVSettings.Instance.SABHostPort)) @@ -72,18 +78,13 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) int c = ActionList.Count + 2; int n = 1; - foreach (Item action1 in ActionList) + foreach (ItemMissing action in ActionList.MissingItems()) { if (ActionCancel) return; prog.Invoke(startpct + ((totPct - startpct) * (++n) / (c))); - if (!(action1 is ItemMissing)) - continue; - - ItemMissing action = (ItemMissing)(action1); - string showname = Helpers.SimplifyName(action.Episode.Show.ShowName); foreach (SAB.QueueSlotsSlot te in sq.slots) @@ -93,7 +94,7 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) if (!FileHelper.SimplifyAndCheckFilename(file.FullName, showname, true, false)) continue; if (!TVDoc.FindSeasEp(file, out int seasF, out int epF, out int _, action.Episode.Show) || (seasF != action.Episode.AppropriateSeasonNumber) || (epF != action.Episode.AppropriateEpNum)) continue; - toRemove.Add(action1); + toRemove.Add(action); newList.Add(new ItemDownloading(te, action.Episode, action.TheFileNoExt, DownloadApp.SABnzbd)); break; } diff --git a/TVRename/Finders/TorrentFinder.cs b/TVRename/Finders/TorrentFinder.cs index 2493ce44f..2b6e90a96 100644 --- a/TVRename/Finders/TorrentFinder.cs +++ b/TVRename/Finders/TorrentFinder.cs @@ -1,30 +1,43 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + using System.Collections.Generic; using System.Linq; using Alphaleonis.Win32.Filesystem; namespace TVRename { - internal abstract class TorrentFinder : Finder + public abstract class DownloadingFinder : Finder { + public enum DownloadApp + { + // ReSharper disable once InconsistentNaming + SABnzbd, + uTorrent, + qBitTorrent + } + public override FinderDisplayType DisplayType() => FinderDisplayType.downloading; - protected void SearchForAppropriateDownloads(SetProgressDelegate prog, int startpct, int totPct, List downloading, DownloadApp tApp) + protected void SearchForAppropriateDownloads(SetProgressDelegate prog, int startpct, int totPct, List downloading, DownloadingFinder.DownloadApp tApp) { ItemList newList = new ItemList(); ItemList toRemove = new ItemList(); int c = ActionList.Count + 2; int n = 1; prog.Invoke(startpct); - foreach (Item action1 in ActionList) + foreach (ItemMissing action in ActionList.MissingItems()) { if (ActionCancel) return; prog.Invoke(startpct + ((totPct - startpct) * (++n) / (c))); - if (!(action1 is ItemMissing action)) - continue; - foreach (TorrentEntry te in downloading) { FileInfo file = new FileInfo(te.DownloadingTo); @@ -38,7 +51,7 @@ protected void SearchForAppropriateDownloads(SetProgressDelegate prog, int start if (TVDoc.FindSeasEp(file, out int seasF, out int epF, out int _, action.Episode.Show) && (seasF == action.Episode.AppropriateSeasonNumber) && (epF == action.Episode.AppropriateEpNum)) { - toRemove.Add(action1); + toRemove.Add(action); newList.Add(new ItemDownloading(te, action.Episode, action.TheFileNoExt, tApp)); break; } @@ -54,7 +67,7 @@ protected void SearchForAppropriateDownloads(SetProgressDelegate prog, int start prog.Invoke(totPct); } - protected TorrentFinder(TVDoc doc) : base(doc) + protected DownloadingFinder(TVDoc doc) : base(doc) { } } diff --git a/TVRename/Finders/qBitTorrentFinder.cs b/TVRename/Finders/qBitTorrentFinder.cs index c7baff8bb..a05746789 100644 --- a/TVRename/Finders/qBitTorrentFinder.cs +++ b/TVRename/Finders/qBitTorrentFinder.cs @@ -7,7 +7,7 @@ namespace TVRename { // ReSharper disable once InconsistentNaming - internal class qBitTorrentFinder : TorrentFinder + internal class qBitTorrentFinder : DownloadingFinder { public qBitTorrentFinder(TVDoc i) : base(i) { } public override bool Active() => TVSettings.Instance.CheckqBitTorrent; @@ -15,7 +15,7 @@ public qBitTorrentFinder(TVDoc i) : base(i) { } public override void Check(SetProgressDelegate prog, int startpct, int totPct) { List downloading = GetqBitTorrentDownloads(); - SearchForAppropriateDownloads(prog, startpct, totPct, downloading, DownloadApp.qBitTorrent); + SearchForAppropriateDownloads(prog, startpct, totPct, downloading, DownloadingFinder.DownloadApp.qBitTorrent); } private static List GetqBitTorrentDownloads() diff --git a/TVRename/Finders/uTorrentFinder.cs b/TVRename/Finders/uTorrentFinder.cs index 115fdb68e..a06850916 100644 --- a/TVRename/Finders/uTorrentFinder.cs +++ b/TVRename/Finders/uTorrentFinder.cs @@ -4,7 +4,7 @@ namespace TVRename { // ReSharper disable once InconsistentNaming - internal class uTorrentFinder:TorrentFinder + internal class uTorrentFinder: DownloadingFinder { public uTorrentFinder(TVDoc i) : base(i) { } public override bool Active() => TVSettings.Instance.CheckuTorrent; @@ -22,7 +22,7 @@ public override void Check(SetProgressDelegate prog, int startpct, int totPct) List downloading = btr.AllFilesBeingDownloaded(); - SearchForAppropriateDownloads(prog, startpct, totPct, downloading, DownloadApp.uTorrent); + SearchForAppropriateDownloads(prog, startpct, totPct, downloading, DownloadingFinder.DownloadApp.uTorrent); } internal static void StartTorrentDownload(string torrentFileName, string directoryName = "") diff --git a/TVRename/Forms/Collection/AddEditCollection.Designer.cs b/TVRename/Forms/Collection/AddEditCollection.Designer.cs new file mode 100644 index 000000000..4c2f1c0a2 --- /dev/null +++ b/TVRename/Forms/Collection/AddEditCollection.Designer.cs @@ -0,0 +1,266 @@ +namespace TVRename +{ + partial class AddEditCollection + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddEditCollection)); + this.TvColl = new System.Windows.Forms.TreeView(); + this.TxtCollPath = new System.Windows.Forms.TextBox(); + this.TxtCollName = new System.Windows.Forms.TextBox(); + this.TxtCollDesc = new System.Windows.Forms.TextBox(); + this.LblFolder = new System.Windows.Forms.Label(); + this.LblCollName = new System.Windows.Forms.Label(); + this.LblCollDesc = new System.Windows.Forms.Label(); + this.PnlCollAddUpdate = new System.Windows.Forms.Panel(); + this.BtCancel = new System.Windows.Forms.Button(); + this.BtSave = new System.Windows.Forms.Button(); + this.BtOk = new System.Windows.Forms.Button(); + this.BtUp = new System.Windows.Forms.Button(); + this.ImgList = new System.Windows.Forms.ImageList(this.components); + this.BtEdit = new System.Windows.Forms.Button(); + this.BtDel = new System.Windows.Forms.Button(); + this.BtDown = new System.Windows.Forms.Button(); + this.BtAdd = new System.Windows.Forms.Button(); + this.PnlCollAddUpdate.SuspendLayout(); + this.SuspendLayout(); + // + // TvColl + // + this.TvColl.Location = new System.Drawing.Point(12, 12); + this.TvColl.Name = "TvColl"; + this.TvColl.ShowNodeToolTips = true; + this.TvColl.Size = new System.Drawing.Size(152, 142); + this.TvColl.TabIndex = 0; + this.TvColl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TvColl_AfterSelect); + // + // TxtCollPath + // + this.TxtCollPath.Location = new System.Drawing.Point(76, 6); + this.TxtCollPath.Name = "TxtCollPath"; + this.TxtCollPath.Size = new System.Drawing.Size(100, 20); + this.TxtCollPath.TabIndex = 7; + // + // TxtCollName + // + this.TxtCollName.Location = new System.Drawing.Point(76, 32); + this.TxtCollName.Name = "TxtCollName"; + this.TxtCollName.Size = new System.Drawing.Size(100, 20); + this.TxtCollName.TabIndex = 9; + // + // TxtCollDesc + // + this.TxtCollDesc.Location = new System.Drawing.Point(76, 58); + this.TxtCollDesc.Multiline = true; + this.TxtCollDesc.Name = "TxtCollDesc"; + this.TxtCollDesc.Size = new System.Drawing.Size(158, 55); + this.TxtCollDesc.TabIndex = 11; + // + // LblFolder + // + this.LblFolder.Location = new System.Drawing.Point(5, 6); + this.LblFolder.Name = "LblFolder"; + this.LblFolder.Size = new System.Drawing.Size(65, 20); + this.LblFolder.TabIndex = 6; + this.LblFolder.Text = "Folder"; + this.LblFolder.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // LblCollName + // + this.LblCollName.Location = new System.Drawing.Point(5, 32); + this.LblCollName.Name = "LblCollName"; + this.LblCollName.Size = new System.Drawing.Size(65, 20); + this.LblCollName.TabIndex = 8; + this.LblCollName.Text = "Name"; + this.LblCollName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // LblCollDesc + // + this.LblCollDesc.Location = new System.Drawing.Point(5, 58); + this.LblCollDesc.Name = "LblCollDesc"; + this.LblCollDesc.Size = new System.Drawing.Size(65, 20); + this.LblCollDesc.TabIndex = 10; + this.LblCollDesc.Text = "Description"; + this.LblCollDesc.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // PnlCollAddUpdate + // + this.PnlCollAddUpdate.Controls.Add(this.BtCancel); + this.PnlCollAddUpdate.Controls.Add(this.BtSave); + this.PnlCollAddUpdate.Controls.Add(this.TxtCollDesc); + this.PnlCollAddUpdate.Controls.Add(this.LblCollDesc); + this.PnlCollAddUpdate.Controls.Add(this.TxtCollPath); + this.PnlCollAddUpdate.Controls.Add(this.LblCollName); + this.PnlCollAddUpdate.Controls.Add(this.TxtCollName); + this.PnlCollAddUpdate.Controls.Add(this.LblFolder); + this.PnlCollAddUpdate.Location = new System.Drawing.Point(200, 12); + this.PnlCollAddUpdate.Name = "PnlCollAddUpdate"; + this.PnlCollAddUpdate.Size = new System.Drawing.Size(241, 145); + this.PnlCollAddUpdate.TabIndex = 5; + // + // BtCancel + // + this.BtCancel.Location = new System.Drawing.Point(76, 119); + this.BtCancel.Name = "BtCancel"; + this.BtCancel.Size = new System.Drawing.Size(75, 23); + this.BtCancel.TabIndex = 12; + this.BtCancel.Text = "Cancel"; + this.BtCancel.UseVisualStyleBackColor = true; + this.BtCancel.Click += new System.EventHandler(this.BtCancel_Click); + // + // BtSave + // + this.BtSave.Location = new System.Drawing.Point(159, 119); + this.BtSave.Name = "BtSave"; + this.BtSave.Size = new System.Drawing.Size(75, 23); + this.BtSave.TabIndex = 13; + this.BtSave.Text = "Save"; + this.BtSave.UseVisualStyleBackColor = true; + this.BtSave.Click += new System.EventHandler(this.BtSave_Click); + // + // BtOk + // + this.BtOk.Location = new System.Drawing.Point(366, 163); + this.BtOk.Name = "BtOk"; + this.BtOk.Size = new System.Drawing.Size(75, 23); + this.BtOk.TabIndex = 14; + this.BtOk.Text = "Ok"; + this.BtOk.UseVisualStyleBackColor = true; + this.BtOk.Click += new System.EventHandler(this.BtOk_Click); + // + // BtUp + // + this.BtUp.ImageIndex = 0; + this.BtUp.ImageList = this.ImgList; + this.BtUp.Location = new System.Drawing.Point(170, 11); + this.BtUp.Name = "BtUp"; + this.BtUp.Size = new System.Drawing.Size(24, 24); + this.BtUp.TabIndex = 1; + this.BtUp.UseVisualStyleBackColor = true; + this.BtUp.Click += new System.EventHandler(this.BtUp_Click); + // + // ImgList + // + this.ImgList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImgList.ImageStream"))); + this.ImgList.TransparentColor = System.Drawing.Color.Transparent; + this.ImgList.Images.SetKeyName(0, "UpArrow.png"); + this.ImgList.Images.SetKeyName(1, "DownArrow.png"); + this.ImgList.Images.SetKeyName(2, "AddIcon.png"); + this.ImgList.Images.SetKeyName(3, "RemoveIcon.png"); + this.ImgList.Images.SetKeyName(4, "EditIcon.png"); + // + // BtEdit + // + this.BtEdit.ImageIndex = 4; + this.BtEdit.ImageList = this.ImgList; + this.BtEdit.Location = new System.Drawing.Point(170, 101); + this.BtEdit.Name = "BtEdit"; + this.BtEdit.Size = new System.Drawing.Size(24, 24); + this.BtEdit.TabIndex = 4; + this.BtEdit.UseVisualStyleBackColor = true; + this.BtEdit.Click += new System.EventHandler(this.BtEdit_Click); + // + // BtDel + // + this.BtDel.ImageIndex = 3; + this.BtDel.ImageList = this.ImgList; + this.BtDel.Location = new System.Drawing.Point(170, 131); + this.BtDel.Name = "BtDel"; + this.BtDel.Size = new System.Drawing.Size(24, 24); + this.BtDel.TabIndex = 5; + this.BtDel.UseVisualStyleBackColor = true; + this.BtDel.Click += new System.EventHandler(this.BtDel_Click); + // + // BtDown + // + this.BtDown.ImageIndex = 1; + this.BtDown.ImageList = this.ImgList; + this.BtDown.Location = new System.Drawing.Point(170, 41); + this.BtDown.Name = "BtDown"; + this.BtDown.Size = new System.Drawing.Size(24, 24); + this.BtDown.TabIndex = 2; + this.BtDown.UseVisualStyleBackColor = true; + this.BtDown.Click += new System.EventHandler(this.BtDown_Click); + // + // BtAdd + // + this.BtAdd.ImageIndex = 2; + this.BtAdd.ImageList = this.ImgList; + this.BtAdd.Location = new System.Drawing.Point(170, 71); + this.BtAdd.Name = "BtAdd"; + this.BtAdd.Size = new System.Drawing.Size(24, 24); + this.BtAdd.TabIndex = 3; + this.BtAdd.UseVisualStyleBackColor = true; + this.BtAdd.Click += new System.EventHandler(this.BtAdd_Click); + // + // AddEditCollection + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(452, 198); + this.Controls.Add(this.BtAdd); + this.Controls.Add(this.BtDown); + this.Controls.Add(this.BtDel); + this.Controls.Add(this.BtEdit); + this.Controls.Add(this.BtUp); + this.Controls.Add(this.BtOk); + this.Controls.Add(this.PnlCollAddUpdate); + this.Controls.Add(this.TvColl); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AddEditCollection"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Add / Edit collections"; + this.PnlCollAddUpdate.ResumeLayout(false); + this.PnlCollAddUpdate.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TreeView TvColl; + private System.Windows.Forms.TextBox TxtCollPath; + private System.Windows.Forms.TextBox TxtCollName; + private System.Windows.Forms.TextBox TxtCollDesc; + private System.Windows.Forms.Label LblFolder; + private System.Windows.Forms.Label LblCollName; + private System.Windows.Forms.Label LblCollDesc; + private System.Windows.Forms.Panel PnlCollAddUpdate; + private System.Windows.Forms.Button BtSave; + private System.Windows.Forms.Button BtOk; + private System.Windows.Forms.Button BtCancel; + private System.Windows.Forms.Button BtUp; + private System.Windows.Forms.ImageList ImgList; + private System.Windows.Forms.Button BtEdit; + private System.Windows.Forms.Button BtDel; + private System.Windows.Forms.Button BtDown; + private System.Windows.Forms.Button BtAdd; + } +} diff --git a/TVRename/Forms/Collection/AddEditCollection.cs b/TVRename/Forms/Collection/AddEditCollection.cs new file mode 100644 index 000000000..fe2c2d4cf --- /dev/null +++ b/TVRename/Forms/Collection/AddEditCollection.cs @@ -0,0 +1,228 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace TVRename +{ + public partial class AddEditCollection : Form + { + private static AddEditCollection aecf; + private readonly TVDoc mDoc; + private int iColl = -1; + private bool bActualMode; + private bool bActualButtons; + private bool bAddMode; + + public AddEditCollection(TVDoc doc) + { + InitializeComponent(); + mDoc = doc; + aecf = this; + bActualMode = SetTextBoxes(false, true); + bActualButtons = SetButtons(false, true); + + FillCollTreeView(); + } + + private static bool SetTextBoxes(bool bMode, bool bFull = false) + { + if (bFull) + { + aecf.TxtCollPath.Enabled = bMode; + } + aecf.TxtCollName.Enabled = bMode; + aecf.TxtCollDesc.Enabled = bMode; + + return bMode; + } + + private static bool SetButtons(bool bMode, bool bFull = false) + { + aecf.BtEdit.Enabled = bMode; + aecf.BtDel.Enabled = bMode; + aecf.BtUp.Enabled = bMode; + aecf.BtDown.Enabled = bMode; + if (bFull) + { + aecf.BtSave.Enabled = bMode; + aecf.BtCancel.Enabled = bMode; + } + return bMode; + } + + private static void ClearTextBoxes () + { + aecf.TxtCollName.Text = ""; + aecf.TxtCollPath.Text = ""; + aecf.TxtCollDesc.Text = ""; + } + + private static void FillTextBoxes (ShowCollection Collection) + { + aecf.TxtCollName.Text = Collection.Name; + aecf.TxtCollPath.Text = Collection.Path; + aecf.TxtCollDesc.Text = Collection.Description; + } + + private static ShowCollection FillCollectionFromTextBoxes () + { + ShowCollection Collection = new ShowCollection(aecf.TxtCollPath.Text); + Collection.Name = aecf.TxtCollName.Text; + Collection.Description = aecf.TxtCollDesc.Text; + + return Collection; + } + + private static void FillCollTreeView() + { + aecf.TvColl.Nodes.Clear(); + if (aecf.mDoc.ShowCollections.Count > 0) + { + TreeNode RootNode; + RootNode = aecf.TvColl.Nodes.Add("Root"); + int iCurr = 0; + foreach (ShowCollection ShowColl in aecf.mDoc.ShowCollections) + { + TreeNode CurNode; + CurNode = RootNode.Nodes.Add(ShowColl.Name); + CurNode.ToolTipText = ShowColl.Description; + CurNode.Tag = iCurr; + iCurr++; + } + aecf.TvColl.ExpandAll(); + } + } + + #region Control functions + private void TvColl_AfterSelect(object sender, TreeViewEventArgs e) + { + TreeView Tv = (TreeView)sender; + TreeNode Node = TvColl.SelectedNode; + string Sep = Tv.PathSeparator; + string[] Nodelevels = Node.FullPath.Split(Sep[0]); + + if (Nodelevels.Length == 2) + { + iColl = (int)Node.Tag; + FillTextBoxes(mDoc.ShowCollections[iColl]); + bActualButtons = SetButtons(true); + } + } + + private void BtDel_Click(object sender, EventArgs e) + { + if (iColl != -1) + { + mDoc.ShowCollections.RemoveAt(iColl); + } + + mDoc.WriteXMLFile(FileToHandle.Collections); + ClearTextBoxes(); + bActualButtons = SetButtons(false, true); + iColl = -1; + FillCollTreeView(); + } + + private void BtEdit_Click(object sender, EventArgs e) + { + if (iColl > 0) + { + bActualButtons = SetButtons(true, true); + bActualButtons = SetButtons(false); + bActualMode = SetTextBoxes(true); + BtAdd.Enabled = false; + bAddMode = false; + TvColl.Enabled = false; + } + } + + private void BtSave_Click(object sender, EventArgs e) + { + ShowCollection Sc = FillCollectionFromTextBoxes(); + if (bAddMode) + { + mDoc.ShowCollections.Add(Sc); + } + else + { + mDoc.ShowCollections[iColl] = Sc; + } + + mDoc.WriteXMLFile(FileToHandle.Collections); + + ClearTextBoxes(); + FillCollTreeView(); + + TvColl.Enabled = true; + bActualMode = SetTextBoxes(false, true); + bActualButtons = SetButtons(false, true); + iColl = -1; + BtAdd.Enabled = true; + } + + private void BtAdd_Click(object sender, EventArgs e) + { + ClearTextBoxes(); + bActualButtons = SetButtons(true, true); + bActualButtons = SetButtons(false); + bActualMode = SetTextBoxes(true, true); + BtAdd.Enabled = false; + iColl = -1; + bAddMode = true; + TvColl.Enabled = false; + } + + private void BtOk_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + Close(); + } + + private void BtCancel_Click(object sender, EventArgs e) + { + ClearTextBoxes(); + bActualMode = SetTextBoxes(false, true); + bActualButtons = SetButtons(false, true); + BtAdd.Enabled = true; + bAddMode = false; + iColl = -1; + FillCollTreeView(); + TvColl.Enabled = true; + } + + private void BtUp_Click(object sender, EventArgs e) + { + ShowCollection Sc; + // No swap over the Default collection + if (iColl > 1) + { + Sc = mDoc.ShowCollections[iColl]; + mDoc.ShowCollections[iColl] = mDoc.ShowCollections[iColl - 1]; + mDoc.ShowCollections[iColl - 1] = Sc; + } + iColl = -1; + FillCollTreeView(); + } + + private void BtDown_Click(object sender, EventArgs e) + { + ShowCollection Sc; + // No Swap after last collection + if (iColl < mDoc.ShowCollections.Count - 1) + { + Sc = mDoc.ShowCollections[iColl]; + mDoc.ShowCollections[iColl] = mDoc.ShowCollections[iColl + 1]; + mDoc.ShowCollections[iColl + 1] = Sc; + } + iColl = -1; + FillCollTreeView(); + } + #endregion + } +} diff --git a/TVRename/Forms/Collection/AddEditCollection.resx b/TVRename/Forms/Collection/AddEditCollection.resx new file mode 100644 index 000000000..0e6b3f77b --- /dev/null +++ b/TVRename/Forms/Collection/AddEditCollection.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA+ + DQAAAk1TRnQBSQFMAgEBBQEAAQgBAAEIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA + AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 + AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA + AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm + AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM + AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA + ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz + AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ + AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM + AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA + AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA + AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ + AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ + AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA + AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm + ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ + Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz + AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA + AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM + AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM + ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM + Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA + AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM + AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ + AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz + AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm + AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw + AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAATcBWQFYAXkBGgH/ + OgABmgJZATEBUgEaOgAB9AJ6AVgBMQF5OwABwwFZAXoBMQFzAbQB9DkAAf8BGgF6AZkBvAGzAbsB9DsA + AhkBCQK0AfQ6AAH0AhkBCQG0AXIB9DoAAfQCGQFWAS4BlwH0OgAB9AGYAXgBVgEuAXgB9DoAAfQCeAFW + AS4BlwH0OgAB9AJ4AVYBLgGYAfQ6AAH0AZgBeAFWAU8BCDsAAfQCmQFWAU8B8TsAAfQBGwFXAVYBeD0A + ARsBeAGZdQAB9AOtAawBpgEJCgAB/wEJAa0BCQH/CgAB8wKmAYoBtQHyBgAB/wHwAUUBkwH0BAAB/wGT + AekBGgH/BgAB9AGzAdsCswGtAQkJAAH/AQkBtAGzAa0BCQH/CQAB8wKmAawBugHzBgAB8ANGAZMB9AIA + Af8BkwFFAm8B8gH/BQAB9AGzAdsCswGtAQkJAAEJAdsBCQGzAq0BCQkAAfMCpgGKAbQB8wUAAfIDRgJv + AZMB9AEAAZMB6QFGAW8BlAGTARsFAAH0AbMB2wKzAa0BCQgAAQkBtAEJAdwCswGtAaYBCQgAAfMDigGz + AfMFAAFGAW8BlAFvAUYBbwFGAW8BkwEfA0YCFgFGBQAB9AGzAdsCswGtAQkGAAH/AQkB1APcArMCrQGm + AbsB/wYAAfMBigGsAYoBswHyBQAB8wGTAb0BlAFvA0YBHwRGAUwBRgEHBQAB9AGzAdsCswGtAQkFAAH/ + AQkB1APVAdsCswGtAawBpgGGAQcB/wUJAbUBigGLAYoBrQG1AfAB8QPyAQAB8wEaAb0BlAFvCEYBBwH/ + BQAB9AGzAdsCswGtAQkFAAH/A/QB8QGzAdUCswGtAfAC8wH0Af8BpgWKAq0BiwKtArMBugIJAQAB/wHz + ApQB4wZGASUBGgH/BgAB9AGzAdsCswGtAfMJAAH0AbQB2wKzAa0B9AQAAawCswqtArMBtAMAAfQBRgHj + ARcERgElARoIAAH0AbMB2wKzAa0B8wkAAfQBtAHbArMBrQHxBAABswHcAboBtASzBq0BswGsAgAB/wGT + AUYBFwZGAb0B/wMAAf8B3QEJAfEBCQHVAdwCswGtAbUCCQHwAf8FAAH0AbQB2wKzAa0BCQQAAbsB3AG6 + ArMCtAKzAa0BigKtAawCigEAAf8BkwFGAhcGRgHjARsB9AIAAf8BGQHUAdUB3AIJArMCrQGmAYsBvAH/ + BQAB9AG0AdsCswGtAQkEAAX0AfICugGzAa0BtQXzAQABkwJGAW8BFwNGAW8CRgHjAZQBGwH/AwABGQGt + AdUC3AKzAa0BrAGmAbwHAAH0AbQB2wKzAa0BCQkAAfQB3AG6ArMBCQUAAZQBJQHjARYBbwJGASUBIAEX + ARYCRgIWAb0EAAEZAbMB2wHcArMBrQGLAbwIAAH0AbQB2wKzAa0BCQkAAfQC3AKzAQkFAAGUARYBvQGU + AW8CRgGTARoBRwHjARYBRgFvARcBRwUAAfEBtAHbAbMCrQHwCQAB9AG0AdsCswGtAQkJAAH0AQkB3AKz + AQkFAAH0Ab0ClAJGAZMB/wEAARoC4wFvAkYBGgUAAf8B3QGzAq0B8AH/CQAB9AG0AdwCswGtAQkJAAH0 + AQkB3AG0AbMBCQYAAfQBlAFHASABkwH/AgAB/wEaAUcCRgEaAf8HAAEJAa0B8AsAAfQDrQGsAccBCQkA + AfQB2wGyAqwBCQcAAfQB4wGUBgABGgFGAfMCAAFCAU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYA + AQEWAAP/AQABAwH/BgABAwH/BgABAwH/BgABgAH/BgABgAF/BgAB8AE/BgAB8AEfBgAB+AEPBgAB/AEH + BgAB/gEDBgAB/wEBBgAB/wGBBgAB/wHABgAB/wHgBgAB/wH4BgAC/wYAAfgBDwH8AR8B+AEfAYMBwQH4 + AQ8B+AEPAfgBHwGBAYAB+AEPAfgBDwH4AR8BAAGAAfgBDwHwAQcB+AEfAgAB+AEPAcABAQH4AR8CAAH4 + AQ8BgAMAAYABAAH4AQ8BgAMAAYABAQH4AQ8B+AEPAgAB4AEHAfgBDwH4AQ8CAAHAAQMBgAEAAfgBDwIA + AYABAQGAAQAB+AEPAgABgAEAAeABAwH4AQ8B+AEfAgAB8AEHAfgBDwH4AR8CAAH4AQ8B+AEPAfgBHwEA + AYAB+AEPAfgBDwH4AR8BgQGAAf4BPwH4AQ8B+AEfAccB4ws= + + + + 60 + + + + + AAABAAIAICAQAAAABADoAgAAJgAAABAQEAAAAAQAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAAAC + AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/ + AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////////wAAAAD///////////////8AAAAA + ////mf////+Z////AAAAAP///5n/////mf///wAAAAD///+Z/////5n///8AAAAA////mf////+Z//// + AAAAAP///5n///+Z/5n//wAAAAD///+Z////mf+Z//8AAAAA////mf///5n/mf//AAAAAP///5n///+Z + /5n//wAAAAD/mZmZmZn/mf+Z//8AAAAA/5mZmZmZ/5n/mf//AAAAAP///////////////wAAAAD///// + //////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////// + ///AAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA + AAPAAAADwAAAA8AAAAP/8z////Mf///Pz///z8///8/z///P8///P/z//z/8//////////////////// + //8oAAAAEAAAACAAAAABAAQAAAAAAIAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAA + AACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAA + AAAA////////AAD/+f//n/8AAP/5//+f/wAA//n/+fn/AAD/+f/5+f8AAPmZmfn5/wAA////////AAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAIAB + AACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAP1/AAD7fwAA+78AAPffAAD//wAA//8AAA== + + + \ No newline at end of file diff --git a/TVRename/Forms/Preferences/CustomNameDesigner.cs b/TVRename/Forms/Preferences/CustomNameDesigner.cs index 6260b88a5..497a052aa 100644 --- a/TVRename/Forms/Preferences/CustomNameDesigner.cs +++ b/TVRename/Forms/Preferences/CustomNameDesigner.cs @@ -23,19 +23,21 @@ namespace TVRename /// public partial class CustomNameDesigner : Form { - private readonly CustomEpisodeName cn; - private readonly List eps; + private readonly CustomEpisodeName CN; + private readonly List Eps; + private TVDoc mDoc; - public CustomNameDesigner(List pel, CustomEpisodeName cn) + public CustomNameDesigner(List pel, CustomEpisodeName cn, TVDoc doc) { - eps = pel; - this.cn = cn; + Eps = pel; + CN = cn; + mDoc = doc; InitializeComponent(); - if (eps == null) + if (Eps == null) lvTest.Enabled = false; - txtTemplate.Text = this.cn.StyleString; + txtTemplate.Text = CN.StyleString; FillExamples(); FillCombos(); @@ -45,9 +47,9 @@ private void FillCombos() { cbTags.Items.Clear(); cbPresets.Items.Clear(); - ProcessedEpisode pe; + ProcessedEpisode pe = null; if (lvTest.SelectedItems.Count == 0) - pe = ((eps != null) && (eps.Count > 0)) ? eps[0] : null; + pe = ((Eps != null) && (Eps.Count > 0)) ? Eps[0] : null; else pe = (ProcessedEpisode) (lvTest.SelectedItems[0].Tag); @@ -67,14 +69,14 @@ private void FillCombos() private void FillExamples() { - if (eps == null) + if (Eps == null) return; lvTest.Items.Clear(); - foreach (ProcessedEpisode pe in eps) + foreach (ProcessedEpisode pe in Eps) { ListViewItem lvi = new ListViewItem(); - string fn = TVSettings.Instance.FilenameFriendly(cn.NameFor(pe)); + string fn = TVSettings.Instance.FilenameFriendly(CN.NameFor(pe)); lvi.Text = fn; bool ok = TVDoc.FindSeasEp(new FileInfo(fn + ".avi"), out int seas, out int ep, out int maxEp, pe.Show); @@ -106,7 +108,7 @@ private void cbPresets_SelectedIndexChanged(object sender, System.EventArgs e) private void txtTemplate_TextChanged(object sender, System.EventArgs e) { - cn.StyleString = txtTemplate.Text; + CN.StyleString = txtTemplate.Text; FillExamples(); } diff --git a/TVRename/Forms/Preferences/Preferences.Designer.cs b/TVRename/Forms/Preferences/Preferences.Designer.cs index 9606199fc..e9bd0e931 100644 --- a/TVRename/Forms/Preferences/Preferences.Designer.cs +++ b/TVRename/Forms/Preferences/Preferences.Designer.cs @@ -42,130 +42,112 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Preferences)); this.OKButton = new System.Windows.Forms.Button(); this.bnCancel = new System.Windows.Forms.Button(); - this.ReplacementsGrid = new SourceGrid.Grid(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.bnBrowseWTWICAL = new System.Windows.Forms.Button(); - this.txtWTWICAL = new System.Windows.Forms.TextBox(); - this.cbWTWICAL = new System.Windows.Forms.CheckBox(); - this.label4 = new System.Windows.Forms.Label(); - this.txtExportRSSDaysPast = new System.Windows.Forms.TextBox(); - this.bnBrowseWTWXML = new System.Windows.Forms.Button(); - this.txtWTWXML = new System.Windows.Forms.TextBox(); - this.cbWTWXML = new System.Windows.Forms.CheckBox(); - this.bnBrowseWTWRSS = new System.Windows.Forms.Button(); - this.txtWTWRSS = new System.Windows.Forms.TextBox(); - this.cbWTWRSS = new System.Windows.Forms.CheckBox(); - this.label17 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.txtExportRSSMaxDays = new System.Windows.Forms.TextBox(); - this.txtExportRSSMaxShows = new System.Windows.Forms.TextBox(); this.saveFile = new System.Windows.Forms.SaveFileDialog(); - this.txtSpecialsFolderName = new System.Windows.Forms.TextBox(); - this.txtVideoExtensions = new System.Windows.Forms.TextBox(); - this.cbStartupTab = new System.Windows.Forms.ComboBox(); - this.cbShowEpisodePictures = new System.Windows.Forms.CheckBox(); - this.cbLeadingZero = new System.Windows.Forms.CheckBox(); - this.cbKeepTogether = new System.Windows.Forms.CheckBox(); - this.chkShowInTaskbar = new System.Windows.Forms.CheckBox(); - this.cbNotificationIcon = new System.Windows.Forms.CheckBox(); - this.txtWTWDays = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tbGeneral = new System.Windows.Forms.TabPage(); + this.folderBrowser = new System.Windows.Forms.FolderBrowserDialog(); + this.openFile = new System.Windows.Forms.OpenFileDialog(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.tbMovieTerms = new System.Windows.Forms.TextBox(); + this.tbIgnoreSuffixes = new System.Windows.Forms.TextBox(); + this.cbIgnoreNoVideoFolders = new System.Windows.Forms.CheckBox(); + this.cbIgnoreRecycleBin = new System.Windows.Forms.CheckBox(); + this.chkForceBulkAddToUseSettingsOnly = new System.Windows.Forms.CheckBox(); + this.cbMonitorFolder = new System.Windows.Forms.CheckBox(); + this.chkScanOnStartup = new System.Windows.Forms.CheckBox(); + this.chkScheduledScan = new System.Windows.Forms.CheckBox(); + this.txtEmptyIgnoreExtensions = new System.Windows.Forms.TextBox(); + this.txtEmptyIgnoreWords = new System.Windows.Forms.TextBox(); + this.colorDialog = new System.Windows.Forms.ColorDialog(); + this.cmDefaults = new System.Windows.Forms.ContextMenuStrip(this.components); + this.KODIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pyTivoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mede8erToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tpDisplay = new System.Windows.Forms.TabPage(); + this.txtSeasonFolderName = new System.Windows.Forms.TextBox(); + this.label35 = new System.Windows.Forms.Label(); this.chkHideWtWSpoilers = new System.Windows.Forms.CheckBox(); this.chkHideMyShowsSpoilers = new System.Windows.Forms.CheckBox(); - this.label37 = new System.Windows.Forms.Label(); - this.label38 = new System.Windows.Forms.Label(); - this.tbPercentDirty = new System.Windows.Forms.TextBox(); - this.cbMode = new System.Windows.Forms.ComboBox(); - this.label34 = new System.Windows.Forms.Label(); this.rbWTWScan = new System.Windows.Forms.RadioButton(); this.rbWTWSearch = new System.Windows.Forms.RadioButton(); - this.label10 = new System.Windows.Forms.Label(); - this.cbLookForAirdate = new System.Windows.Forms.CheckBox(); - this.cbLanguages = new System.Windows.Forms.ComboBox(); - this.label21 = new System.Windows.Forms.Label(); + this.cbStartupTab = new System.Windows.Forms.ComboBox(); this.cbAutoSelInMyShows = new System.Windows.Forms.CheckBox(); + this.cbShowEpisodePictures = new System.Windows.Forms.CheckBox(); this.label11 = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.txtParallelDownloads = new System.Windows.Forms.TextBox(); - this.tbFilesAndFolders = new System.Windows.Forms.TabPage(); - this.txtSeasonFormat = new System.Windows.Forms.TextBox(); - this.label47 = new System.Windows.Forms.Label(); - this.bnTags = new System.Windows.Forms.Button(); - this.txtKeepTogether = new System.Windows.Forms.TextBox(); - this.label39 = new System.Windows.Forms.Label(); - this.cbKeepTogetherMode = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); + this.chkShowInTaskbar = new System.Windows.Forms.CheckBox(); + this.cbNotificationIcon = new System.Windows.Forms.CheckBox(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.gbJSON = new System.Windows.Forms.GroupBox(); + this.label51 = new System.Windows.Forms.Label(); + this.tbJSONFilenameToken = new System.Windows.Forms.TextBox(); + this.label50 = new System.Windows.Forms.Label(); + this.tbJSONURLToken = new System.Windows.Forms.TextBox(); + this.label49 = new System.Windows.Forms.Label(); + this.tbJSONRootNode = new System.Windows.Forms.TextBox(); + this.label48 = new System.Windows.Forms.Label(); + this.tbJSONURL = new System.Windows.Forms.TextBox(); + this.gbRSS = new System.Windows.Forms.GroupBox(); + this.label45 = new System.Windows.Forms.Label(); + this.tbPreferredRSSTerms = new System.Windows.Forms.TextBox(); + this.RSSGrid = new SourceGrid.Grid(); + this.label25 = new System.Windows.Forms.Label(); + this.bnRSSRemove = new System.Windows.Forms.Button(); + this.bnRSSGo = new System.Windows.Forms.Button(); + this.bnRSSAdd = new System.Windows.Forms.Button(); + this.tpSubtitles = new System.Windows.Forms.TabPage(); + this.cbTxtToSub = new System.Windows.Forms.CheckBox(); + this.label46 = new System.Windows.Forms.Label(); + this.txtSubtitleExtensions = new System.Windows.Forms.TextBox(); + this.chkRetainLanguageSpecificSubtitles = new System.Windows.Forms.CheckBox(); + this.tpBulkAdd = new System.Windows.Forms.TabPage(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); this.tbSeasonSearchTerms = new System.Windows.Forms.TextBox(); this.label36 = new System.Windows.Forms.Label(); - this.txtSeasonFolderName = new System.Windows.Forms.TextBox(); - this.label35 = new System.Windows.Forms.Label(); - this.bnReplaceRemove = new System.Windows.Forms.Button(); - this.bnReplaceAdd = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.txtMaxSampleSize = new System.Windows.Forms.TextBox(); - this.label22 = new System.Windows.Forms.Label(); - this.txtOtherExtensions = new System.Windows.Forms.TextBox(); - this.cbForceLower = new System.Windows.Forms.CheckBox(); - this.cbIgnoreSamples = new System.Windows.Forms.CheckBox(); - this.tbAutoExport = new System.Windows.Forms.TabPage(); - this.groupBox7 = new System.Windows.Forms.GroupBox(); - this.bnBrowseShowsHTML = new System.Windows.Forms.Button(); - this.cbShowsHTML = new System.Windows.Forms.CheckBox(); - this.txtShowsHTMLTo = new System.Windows.Forms.TextBox(); - this.bnBrowseShowsTXT = new System.Windows.Forms.Button(); - this.cbShowsTXT = new System.Windows.Forms.CheckBox(); - this.txtShowsTXTTo = new System.Windows.Forms.TextBox(); - this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.bnBrowseFOXML = new System.Windows.Forms.Button(); - this.cbFOXML = new System.Windows.Forms.CheckBox(); - this.txtFOXML = new System.Windows.Forms.TextBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.bnBrowseRenamingXML = new System.Windows.Forms.Button(); - this.cbRenamingXML = new System.Windows.Forms.CheckBox(); - this.txtRenamingXML = new System.Windows.Forms.TextBox(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bnBrowseMissingCSV = new System.Windows.Forms.Button(); - this.bnBrowseMissingXML = new System.Windows.Forms.Button(); - this.txtMissingCSV = new System.Windows.Forms.TextBox(); - this.cbMissingXML = new System.Windows.Forms.CheckBox(); - this.cbMissingCSV = new System.Windows.Forms.CheckBox(); - this.txtMissingXML = new System.Windows.Forms.TextBox(); - this.tpScanOptions = new System.Windows.Forms.TabPage(); - this.cbCheckqBitTorrent = new System.Windows.Forms.CheckBox(); - this.chkAutoMergeLibraryEpisodes = new System.Windows.Forms.CheckBox(); - this.chkAutoMergeDownloadEpisodes = new System.Windows.Forms.CheckBox(); - this.chkPreventMove = new System.Windows.Forms.CheckBox(); - this.label40 = new System.Windows.Forms.Label(); - this.cbxUpdateAirDate = new System.Windows.Forms.CheckBox(); - this.label33 = new System.Windows.Forms.Label(); - this.cbAutoCreateFolders = new System.Windows.Forms.CheckBox(); - this.label28 = new System.Windows.Forms.Label(); - this.cbSearchRSS = new System.Windows.Forms.CheckBox(); - this.cbRenameCheck = new System.Windows.Forms.CheckBox(); - this.cbMissing = new System.Windows.Forms.CheckBox(); - this.cbLeaveOriginals = new System.Windows.Forms.CheckBox(); - this.cbCheckSABnzbd = new System.Windows.Forms.CheckBox(); - this.cbCheckuTorrent = new System.Windows.Forms.CheckBox(); - this.cbSearchLocally = new System.Windows.Forms.CheckBox(); - this.tbFolderDeleting = new System.Windows.Forms.TabPage(); - this.cbCleanUpDownloadDir = new System.Windows.Forms.CheckBox(); - this.label32 = new System.Windows.Forms.Label(); - this.label30 = new System.Windows.Forms.Label(); - this.txtEmptyMaxSize = new System.Windows.Forms.TextBox(); - this.txtEmptyIgnoreWords = new System.Windows.Forms.TextBox(); - this.txtEmptyIgnoreExtensions = new System.Windows.Forms.TextBox(); - this.label31 = new System.Windows.Forms.Label(); - this.cbRecycleNotDelete = new System.Windows.Forms.CheckBox(); - this.cbEmptyMaxSize = new System.Windows.Forms.CheckBox(); - this.cbEmptyIgnoreWords = new System.Windows.Forms.CheckBox(); - this.cbEmptyIgnoreExtensions = new System.Windows.Forms.CheckBox(); - this.cbDeleteEmpty = new System.Windows.Forms.CheckBox(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); + this.chkAutoSearchForDownloadedFiles = new System.Windows.Forms.CheckBox(); + this.label43 = new System.Windows.Forms.Label(); + this.label44 = new System.Windows.Forms.Label(); + this.tpTreeColoring = new System.Windows.Forms.TabPage(); + this.label7 = new System.Windows.Forms.Label(); + this.cboShowStatus = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtShowStatusColor = new System.Windows.Forms.TextBox(); + this.btnSelectColor = new System.Windows.Forms.Button(); + this.bnRemoveDefinedColor = new System.Windows.Forms.Button(); + this.btnAddShowStatusColoring = new System.Windows.Forms.Button(); + this.lvwDefinedColors = new System.Windows.Forms.ListView(); + this.colShowStatus = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.colColor = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.tbuTorrentNZB = new System.Windows.Forms.TabPage(); + this.qBitTorrent = new System.Windows.Forms.GroupBox(); + this.tbqBitTorrentHost = new System.Windows.Forms.TextBox(); + this.tbqBitTorrentPort = new System.Windows.Forms.TextBox(); + this.label41 = new System.Windows.Forms.Label(); + this.label42 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtSABHostPort = new System.Windows.Forms.TextBox(); + this.txtSABAPIKey = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.bnUTBrowseResumeDat = new System.Windows.Forms.Button(); + this.txtUTResumeDatPath = new System.Windows.Forms.TextBox(); + this.bnRSSBrowseuTorrent = new System.Windows.Forms.Button(); + this.label27 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.txtRSSuTorrentPath = new System.Windows.Forms.TextBox(); + this.tbSearchFolders = new System.Windows.Forms.TabPage(); + this.label1 = new System.Windows.Forms.Label(); + this.domainUpDown1 = new System.Windows.Forms.DomainUpDown(); + this.lblScanAction = new System.Windows.Forms.Label(); + this.rdoQuickScan = new System.Windows.Forms.RadioButton(); + this.rdoRecentScan = new System.Windows.Forms.RadioButton(); + this.rdoFullScan = new System.Windows.Forms.RadioButton(); + this.bnOpenSearchFolder = new System.Windows.Forms.Button(); + this.bnRemoveSearchFolder = new System.Windows.Forms.Button(); + this.bnAddSearchFolder = new System.Windows.Forms.Button(); + this.lbSearchFolders = new System.Windows.Forms.ListBox(); + this.label23 = new System.Windows.Forms.Label(); this.tbMediaCenter = new System.Windows.Forms.TabPage(); this.cbWDLiveEpisodeFiles = new System.Windows.Forms.CheckBox(); this.cbNFOEpisodes = new System.Windows.Forms.CheckBox(); @@ -190,112 +172,155 @@ private void InitializeComponent() this.cbNFOShows = new System.Windows.Forms.CheckBox(); this.cbFantArtJpg = new System.Windows.Forms.CheckBox(); this.cbFolderJpg = new System.Windows.Forms.CheckBox(); - this.tbSearchFolders = new System.Windows.Forms.TabPage(); - this.label1 = new System.Windows.Forms.Label(); - this.domainUpDown1 = new System.Windows.Forms.DomainUpDown(); - this.chkScheduledScan = new System.Windows.Forms.CheckBox(); - this.chkScanOnStartup = new System.Windows.Forms.CheckBox(); - this.lblScanAction = new System.Windows.Forms.Label(); - this.rdoQuickScan = new System.Windows.Forms.RadioButton(); - this.rdoRecentScan = new System.Windows.Forms.RadioButton(); - this.rdoFullScan = new System.Windows.Forms.RadioButton(); - this.cbMonitorFolder = new System.Windows.Forms.CheckBox(); - this.bnOpenSearchFolder = new System.Windows.Forms.Button(); - this.bnRemoveSearchFolder = new System.Windows.Forms.Button(); - this.bnAddSearchFolder = new System.Windows.Forms.Button(); - this.lbSearchFolders = new System.Windows.Forms.ListBox(); - this.label23 = new System.Windows.Forms.Label(); - this.tbuTorrentNZB = new System.Windows.Forms.TabPage(); - this.qBitTorrent = new System.Windows.Forms.GroupBox(); - this.tbqBitTorrentHost = new System.Windows.Forms.TextBox(); - this.tbqBitTorrentPort = new System.Windows.Forms.TextBox(); - this.label41 = new System.Windows.Forms.Label(); - this.label42 = new System.Windows.Forms.Label(); - this.label45 = new System.Windows.Forms.Label(); - this.tbPreferredRSSTerms = new System.Windows.Forms.TextBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.txtSABHostPort = new System.Windows.Forms.TextBox(); - this.txtSABAPIKey = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.groupBox6 = new System.Windows.Forms.GroupBox(); - this.bnUTBrowseResumeDat = new System.Windows.Forms.Button(); - this.txtUTResumeDatPath = new System.Windows.Forms.TextBox(); - this.bnRSSBrowseuTorrent = new System.Windows.Forms.Button(); - this.label27 = new System.Windows.Forms.Label(); - this.label26 = new System.Windows.Forms.Label(); - this.txtRSSuTorrentPath = new System.Windows.Forms.TextBox(); - this.RSSGrid = new SourceGrid.Grid(); - this.bnRSSRemove = new System.Windows.Forms.Button(); - this.bnRSSAdd = new System.Windows.Forms.Button(); - this.bnRSSGo = new System.Windows.Forms.Button(); - this.label25 = new System.Windows.Forms.Label(); - this.tpTreeColoring = new System.Windows.Forms.TabPage(); - this.label7 = new System.Windows.Forms.Label(); - this.cboShowStatus = new System.Windows.Forms.ComboBox(); - this.label5 = new System.Windows.Forms.Label(); - this.txtShowStatusColor = new System.Windows.Forms.TextBox(); - this.btnSelectColor = new System.Windows.Forms.Button(); - this.bnRemoveDefinedColor = new System.Windows.Forms.Button(); - this.btnAddShowStatusColoring = new System.Windows.Forms.Button(); - this.lvwDefinedColors = new System.Windows.Forms.ListView(); - this.colShowStatus = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.colColor = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.tpBulkAdd = new System.Windows.Forms.TabPage(); - this.groupBox9 = new System.Windows.Forms.GroupBox(); - this.chkForceBulkAddToUseSettingsOnly = new System.Windows.Forms.CheckBox(); - this.cbIgnoreRecycleBin = new System.Windows.Forms.CheckBox(); - this.cbIgnoreNoVideoFolders = new System.Windows.Forms.CheckBox(); - this.groupBox8 = new System.Windows.Forms.GroupBox(); - this.chkAutoSearchForDownloadedFiles = new System.Windows.Forms.CheckBox(); - this.label43 = new System.Windows.Forms.Label(); - this.label44 = new System.Windows.Forms.Label(); - this.tbIgnoreSuffixes = new System.Windows.Forms.TextBox(); - this.tbMovieTerms = new System.Windows.Forms.TextBox(); - this.tpSubtitles = new System.Windows.Forms.TabPage(); - this.cbTxtToSub = new System.Windows.Forms.CheckBox(); - this.label46 = new System.Windows.Forms.Label(); - this.txtSubtitleExtensions = new System.Windows.Forms.TextBox(); - this.chkRetainLanguageSpecificSubtitles = new System.Windows.Forms.CheckBox(); - this.folderBrowser = new System.Windows.Forms.FolderBrowserDialog(); - this.openFile = new System.Windows.Forms.OpenFileDialog(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.colorDialog = new System.Windows.Forms.ColorDialog(); - this.cmDefaults = new System.Windows.Forms.ContextMenuStrip(this.components); - this.KODIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pyTivoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mede8erToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.groupBox2.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tbGeneral.SuspendLayout(); - this.tbFilesAndFolders.SuspendLayout(); + this.tbFolderDeleting = new System.Windows.Forms.TabPage(); + this.cbCleanUpDownloadDir = new System.Windows.Forms.CheckBox(); + this.label32 = new System.Windows.Forms.Label(); + this.label30 = new System.Windows.Forms.Label(); + this.txtEmptyMaxSize = new System.Windows.Forms.TextBox(); + this.label31 = new System.Windows.Forms.Label(); + this.cbRecycleNotDelete = new System.Windows.Forms.CheckBox(); + this.cbEmptyMaxSize = new System.Windows.Forms.CheckBox(); + this.cbEmptyIgnoreWords = new System.Windows.Forms.CheckBox(); + this.cbEmptyIgnoreExtensions = new System.Windows.Forms.CheckBox(); + this.cbDeleteEmpty = new System.Windows.Forms.CheckBox(); + this.tpScanOptions = new System.Windows.Forms.TabPage(); + this.cbHigherQuality = new System.Windows.Forms.CheckBox(); + this.cbSearchJSON = new System.Windows.Forms.CheckBox(); + this.cbCheckqBitTorrent = new System.Windows.Forms.CheckBox(); + this.chkAutoMergeLibraryEpisodes = new System.Windows.Forms.CheckBox(); + this.chkAutoMergeDownloadEpisodes = new System.Windows.Forms.CheckBox(); + this.chkPreventMove = new System.Windows.Forms.CheckBox(); + this.label40 = new System.Windows.Forms.Label(); + this.cbxUpdateAirDate = new System.Windows.Forms.CheckBox(); + this.label33 = new System.Windows.Forms.Label(); + this.cbAutoCreateFolders = new System.Windows.Forms.CheckBox(); + this.label28 = new System.Windows.Forms.Label(); + this.cbSearchRSS = new System.Windows.Forms.CheckBox(); + this.cbRenameCheck = new System.Windows.Forms.CheckBox(); + this.cbMissing = new System.Windows.Forms.CheckBox(); + this.cbLeaveOriginals = new System.Windows.Forms.CheckBox(); + this.cbCheckSABnzbd = new System.Windows.Forms.CheckBox(); + this.cbCheckuTorrent = new System.Windows.Forms.CheckBox(); + this.cbSearchLocally = new System.Windows.Forms.CheckBox(); + this.tbAutoExport = new System.Windows.Forms.TabPage(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.bnBrowseShowsHTML = new System.Windows.Forms.Button(); + this.cbShowsHTML = new System.Windows.Forms.CheckBox(); + this.txtShowsHTMLTo = new System.Windows.Forms.TextBox(); + this.bnBrowseShowsTXT = new System.Windows.Forms.Button(); + this.cbShowsTXT = new System.Windows.Forms.CheckBox(); + this.txtShowsTXTTo = new System.Windows.Forms.TextBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.bnBrowseFOXML = new System.Windows.Forms.Button(); + this.cbFOXML = new System.Windows.Forms.CheckBox(); + this.txtFOXML = new System.Windows.Forms.TextBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.bnBrowseRenamingXML = new System.Windows.Forms.Button(); + this.cbRenamingXML = new System.Windows.Forms.CheckBox(); + this.txtRenamingXML = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.bnBrowseMissingCSV = new System.Windows.Forms.Button(); + this.bnBrowseMissingXML = new System.Windows.Forms.Button(); + this.txtMissingCSV = new System.Windows.Forms.TextBox(); + this.cbMissingXML = new System.Windows.Forms.CheckBox(); + this.cbMissingCSV = new System.Windows.Forms.CheckBox(); + this.txtMissingXML = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.bnBrowseWTWICAL = new System.Windows.Forms.Button(); + this.txtWTWICAL = new System.Windows.Forms.TextBox(); + this.cbWTWICAL = new System.Windows.Forms.CheckBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtExportRSSDaysPast = new System.Windows.Forms.TextBox(); + this.bnBrowseWTWXML = new System.Windows.Forms.Button(); + this.txtWTWXML = new System.Windows.Forms.TextBox(); + this.cbWTWXML = new System.Windows.Forms.CheckBox(); + this.bnBrowseWTWRSS = new System.Windows.Forms.Button(); + this.txtWTWRSS = new System.Windows.Forms.TextBox(); + this.cbWTWRSS = new System.Windows.Forms.CheckBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.txtExportRSSMaxDays = new System.Windows.Forms.TextBox(); + this.txtExportRSSMaxShows = new System.Windows.Forms.TextBox(); + this.tbFilesAndFolders = new System.Windows.Forms.TabPage(); + this.label53 = new System.Windows.Forms.Label(); + this.label54 = new System.Windows.Forms.Label(); + this.tbPercentBetter = new System.Windows.Forms.TextBox(); + this.tbPriorityOverrideTerms = new System.Windows.Forms.TextBox(); + this.label52 = new System.Windows.Forms.Label(); + this.txtSeasonFormat = new System.Windows.Forms.TextBox(); + this.txtKeepTogether = new System.Windows.Forms.TextBox(); + this.txtMaxSampleSize = new System.Windows.Forms.TextBox(); + this.txtSpecialsFolderName = new System.Windows.Forms.TextBox(); + this.txtOtherExtensions = new System.Windows.Forms.TextBox(); + this.txtVideoExtensions = new System.Windows.Forms.TextBox(); + this.label47 = new System.Windows.Forms.Label(); + this.bnTags = new System.Windows.Forms.Button(); + this.label39 = new System.Windows.Forms.Label(); + this.cbKeepTogetherMode = new System.Windows.Forms.ComboBox(); + this.bnReplaceRemove = new System.Windows.Forms.Button(); + this.bnReplaceAdd = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.ReplacementsGrid = new SourceGrid.Grid(); + this.label19 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.cbKeepTogether = new System.Windows.Forms.CheckBox(); + this.cbForceLower = new System.Windows.Forms.CheckBox(); + this.cbIgnoreSamples = new System.Windows.Forms.CheckBox(); + this.cbLeadingZero = new System.Windows.Forms.CheckBox(); + this.tbGeneral = new System.Windows.Forms.TabPage(); + this.label37 = new System.Windows.Forms.Label(); + this.label38 = new System.Windows.Forms.Label(); + this.tbPercentDirty = new System.Windows.Forms.TextBox(); + this.txtParallelDownloads = new System.Windows.Forms.TextBox(); + this.txtWTWDays = new System.Windows.Forms.TextBox(); + this.cbMode = new System.Windows.Forms.ComboBox(); + this.label34 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.cbLookForAirdate = new System.Windows.Forms.CheckBox(); + this.cbLanguages = new System.Windows.Forms.ComboBox(); + this.label21 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.tpSearch = new System.Windows.Forms.TabControl(); + this.cbShowCollections = new System.Windows.Forms.CheckBox(); + this.cbDeleteShowFromDisk = new System.Windows.Forms.CheckBox(); + this.cmDefaults.SuspendLayout(); + this.tpDisplay.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.gbJSON.SuspendLayout(); + this.gbRSS.SuspendLayout(); + this.tpSubtitles.SuspendLayout(); + this.tpBulkAdd.SuspendLayout(); + this.groupBox9.SuspendLayout(); + this.groupBox8.SuspendLayout(); + this.tpTreeColoring.SuspendLayout(); + this.tbuTorrentNZB.SuspendLayout(); + this.qBitTorrent.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.tbSearchFolders.SuspendLayout(); + this.tbMediaCenter.SuspendLayout(); + this.panel1.SuspendLayout(); + this.tbFolderDeleting.SuspendLayout(); + this.tpScanOptions.SuspendLayout(); this.tbAutoExport.SuspendLayout(); this.groupBox7.SuspendLayout(); this.groupBox5.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox3.SuspendLayout(); - this.tpScanOptions.SuspendLayout(); - this.tbFolderDeleting.SuspendLayout(); - this.tbMediaCenter.SuspendLayout(); - this.panel1.SuspendLayout(); - this.tbSearchFolders.SuspendLayout(); - this.tbuTorrentNZB.SuspendLayout(); - this.qBitTorrent.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.groupBox6.SuspendLayout(); - this.tpTreeColoring.SuspendLayout(); - this.tpBulkAdd.SuspendLayout(); - this.groupBox9.SuspendLayout(); - this.groupBox8.SuspendLayout(); - this.tpSubtitles.SuspendLayout(); - this.cmDefaults.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.tbFilesAndFolders.SuspendLayout(); + this.tbGeneral.SuspendLayout(); + this.tpSearch.SuspendLayout(); this.SuspendLayout(); // // OKButton // this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.OKButton.Location = new System.Drawing.Point(369, 551); + this.OKButton.Location = new System.Drawing.Point(389, 488); this.OKButton.Name = "OKButton"; this.OKButton.Size = new System.Drawing.Size(75, 23); this.OKButton.TabIndex = 0; @@ -307,7 +332,7 @@ private void InitializeComponent() // this.bnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.bnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.bnCancel.Location = new System.Drawing.Point(450, 551); + this.bnCancel.Location = new System.Drawing.Point(470, 488); this.bnCancel.Name = "bnCancel"; this.bnCancel.Size = new System.Drawing.Size(75, 23); this.bnCancel.TabIndex = 1; @@ -315,223 +340,253 @@ private void InitializeComponent() this.bnCancel.UseVisualStyleBackColor = true; this.bnCancel.Click += new System.EventHandler(this.CancelButton_Click); // - // ReplacementsGrid + // saveFile // - this.ReplacementsGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ReplacementsGrid.BackColor = System.Drawing.SystemColors.Window; - this.ReplacementsGrid.EnableSort = true; - this.ReplacementsGrid.Location = new System.Drawing.Point(6, 19); - this.ReplacementsGrid.Name = "ReplacementsGrid"; - this.ReplacementsGrid.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; - this.ReplacementsGrid.SelectionMode = SourceGrid.GridSelectionMode.Cell; - this.ReplacementsGrid.Size = new System.Drawing.Size(497, 62); - this.ReplacementsGrid.TabIndex = 1; - this.ReplacementsGrid.TabStop = true; - this.ReplacementsGrid.ToolTipText = ""; + this.saveFile.Filter = "RSS files (*.rss)|*.rss|XML files (*.xml)|*.xml|CSV files (*.csv)|*.csv|TXT files" + + " (*.txt)|*.txt|HTML files (*.html)|*.html|iCal files (*.ics)|*.ics|All files (*." + + "*)|*.*"; // - // groupBox2 + // folderBrowser // - this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox2.Controls.Add(this.bnBrowseWTWICAL); - this.groupBox2.Controls.Add(this.txtWTWICAL); - this.groupBox2.Controls.Add(this.cbWTWICAL); - this.groupBox2.Controls.Add(this.label4); - this.groupBox2.Controls.Add(this.txtExportRSSDaysPast); - this.groupBox2.Controls.Add(this.bnBrowseWTWXML); - this.groupBox2.Controls.Add(this.txtWTWXML); - this.groupBox2.Controls.Add(this.cbWTWXML); - this.groupBox2.Controls.Add(this.bnBrowseWTWRSS); - this.groupBox2.Controls.Add(this.txtWTWRSS); - this.groupBox2.Controls.Add(this.cbWTWRSS); - this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.label16); - this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.txtExportRSSMaxDays); - this.groupBox2.Controls.Add(this.txtExportRSSMaxShows); - this.groupBox2.Location = new System.Drawing.Point(6, 6); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(497, 135); - this.groupBox2.TabIndex = 0; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "When to Watch"; + this.folderBrowser.ShowNewFolderButton = false; // - // bnBrowseWTWICAL + // openFile // - this.bnBrowseWTWICAL.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseWTWICAL.Location = new System.Drawing.Point(414, 76); - this.bnBrowseWTWICAL.Name = "bnBrowseWTWICAL"; - this.bnBrowseWTWICAL.Size = new System.Drawing.Size(75, 23); - this.bnBrowseWTWICAL.TabIndex = 24; - this.bnBrowseWTWICAL.Text = "Browse..."; - this.bnBrowseWTWICAL.UseVisualStyleBackColor = true; - this.bnBrowseWTWICAL.Click += new System.EventHandler(this.bnBrowseWTWICAL_Click); + this.openFile.Filter = "Torrent files (*.torrent)|*.torrent|All files (*.*)|*.*"; // - // txtWTWICAL + // tbMovieTerms // - this.txtWTWICAL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.tbMovieTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtWTWICAL.Location = new System.Drawing.Point(65, 78); - this.txtWTWICAL.Name = "txtWTWICAL"; - this.txtWTWICAL.Size = new System.Drawing.Size(342, 20); - this.txtWTWICAL.TabIndex = 23; - // - // cbWTWICAL - // - this.cbWTWICAL.AutoSize = true; - this.cbWTWICAL.Location = new System.Drawing.Point(8, 80); - this.cbWTWICAL.Name = "cbWTWICAL"; - this.cbWTWICAL.Size = new System.Drawing.Size(43, 17); - this.cbWTWICAL.TabIndex = 22; - this.cbWTWICAL.Text = "iCal"; - this.cbWTWICAL.UseVisualStyleBackColor = true; - this.cbWTWICAL.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.tbMovieTerms.Location = new System.Drawing.Point(99, 40); + this.tbMovieTerms.Name = "tbMovieTerms"; + this.tbMovieTerms.Size = new System.Drawing.Size(415, 20); + this.tbMovieTerms.TabIndex = 13; + this.toolTip1.SetToolTip(this.tbMovieTerms, "If a filename contains any of these terms then it is assumed\r\nthat it is a Film a" + + "nd not a TV Show. Hence \'Auto Add\' is not\r\ninvoked for this file."); // - // label4 + // tbIgnoreSuffixes // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(330, 109); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(59, 13); - this.label4.TabIndex = 21; - this.label4.Text = "in the past."; + this.tbIgnoreSuffixes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbIgnoreSuffixes.Location = new System.Drawing.Point(99, 66); + this.tbIgnoreSuffixes.Name = "tbIgnoreSuffixes"; + this.tbIgnoreSuffixes.Size = new System.Drawing.Size(415, 20); + this.tbIgnoreSuffixes.TabIndex = 15; + this.toolTip1.SetToolTip(this.tbIgnoreSuffixes, "These terms and any text after them will be ignored when\r\nsearching on TVDB for t" + + "he show title based on the filename."); // - // txtExportRSSDaysPast + // cbIgnoreNoVideoFolders // - this.txtExportRSSDaysPast.Location = new System.Drawing.Point(294, 106); - this.txtExportRSSDaysPast.Name = "txtExportRSSDaysPast"; - this.txtExportRSSDaysPast.Size = new System.Drawing.Size(28, 20); - this.txtExportRSSDaysPast.TabIndex = 20; + this.cbIgnoreNoVideoFolders.AutoSize = true; + this.cbIgnoreNoVideoFolders.Location = new System.Drawing.Point(6, 19); + this.cbIgnoreNoVideoFolders.Name = "cbIgnoreNoVideoFolders"; + this.cbIgnoreNoVideoFolders.Size = new System.Drawing.Size(225, 17); + this.cbIgnoreNoVideoFolders.TabIndex = 13; + this.cbIgnoreNoVideoFolders.Text = "&Only Include Folders containing Video files"; + this.toolTip1.SetToolTip(this.cbIgnoreNoVideoFolders, "If set then only folders that contain video files are considered for the \'Bulk Ad" + + "d\' feature"); + this.cbIgnoreNoVideoFolders.UseVisualStyleBackColor = true; // - // bnBrowseWTWXML + // cbIgnoreRecycleBin // - this.bnBrowseWTWXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseWTWXML.Location = new System.Drawing.Point(521, 47); - this.bnBrowseWTWXML.Name = "bnBrowseWTWXML"; - this.bnBrowseWTWXML.Size = new System.Drawing.Size(75, 23); - this.bnBrowseWTWXML.TabIndex = 19; - this.bnBrowseWTWXML.Text = "Browse..."; - this.bnBrowseWTWXML.UseVisualStyleBackColor = true; - this.bnBrowseWTWXML.Click += new System.EventHandler(this.bnBrowseWTWXML_Click); + this.cbIgnoreRecycleBin.AutoSize = true; + this.cbIgnoreRecycleBin.Location = new System.Drawing.Point(6, 42); + this.cbIgnoreRecycleBin.Name = "cbIgnoreRecycleBin"; + this.cbIgnoreRecycleBin.Size = new System.Drawing.Size(116, 17); + this.cbIgnoreRecycleBin.TabIndex = 14; + this.cbIgnoreRecycleBin.Text = "Ignore &Recycle Bin"; + this.toolTip1.SetToolTip(this.cbIgnoreRecycleBin, "If set then Bulk Add ignores all files in the Recycle Bin"); + this.cbIgnoreRecycleBin.UseVisualStyleBackColor = true; // - // txtWTWXML + // chkForceBulkAddToUseSettingsOnly // - this.txtWTWXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtWTWXML.Location = new System.Drawing.Point(65, 49); - this.txtWTWXML.Name = "txtWTWXML"; - this.txtWTWXML.Size = new System.Drawing.Size(423, 20); - this.txtWTWXML.TabIndex = 18; + this.chkForceBulkAddToUseSettingsOnly.AutoSize = true; + this.chkForceBulkAddToUseSettingsOnly.Location = new System.Drawing.Point(6, 65); + this.chkForceBulkAddToUseSettingsOnly.Name = "chkForceBulkAddToUseSettingsOnly"; + this.chkForceBulkAddToUseSettingsOnly.Size = new System.Drawing.Size(248, 17); + this.chkForceBulkAddToUseSettingsOnly.TabIndex = 15; + this.chkForceBulkAddToUseSettingsOnly.Text = "Force to Use Season Words from Settings Only"; + this.toolTip1.SetToolTip(this.chkForceBulkAddToUseSettingsOnly, "If set then Bulk Add just uses the season words from settings. If not set (recomm" + + "ended) then Bulk Add finds addition season words from each show\'s configuration." + + ""); + this.chkForceBulkAddToUseSettingsOnly.UseVisualStyleBackColor = true; // - // cbWTWXML + // cbMonitorFolder // - this.cbWTWXML.AutoSize = true; - this.cbWTWXML.Location = new System.Drawing.Point(8, 51); - this.cbWTWXML.Name = "cbWTWXML"; - this.cbWTWXML.Size = new System.Drawing.Size(48, 17); - this.cbWTWXML.TabIndex = 17; - this.cbWTWXML.Text = "XML"; - this.cbWTWXML.UseVisualStyleBackColor = true; - this.cbWTWXML.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.cbMonitorFolder.AutoSize = true; + this.cbMonitorFolder.Location = new System.Drawing.Point(3, 111); + this.cbMonitorFolder.Name = "cbMonitorFolder"; + this.cbMonitorFolder.Size = new System.Drawing.Size(154, 17); + this.cbMonitorFolder.TabIndex = 5; + this.cbMonitorFolder.Text = "&Monitor folders for changes"; + this.toolTip1.SetToolTip(this.cbMonitorFolder, "If the contents of any of these folder change, then automatically do a \"Scan\" and" + + " \"Do\"."); + this.cbMonitorFolder.UseVisualStyleBackColor = true; // - // bnBrowseWTWRSS + // chkScanOnStartup // - this.bnBrowseWTWRSS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseWTWRSS.Location = new System.Drawing.Point(520, 18); - this.bnBrowseWTWRSS.Name = "bnBrowseWTWRSS"; - this.bnBrowseWTWRSS.Size = new System.Drawing.Size(75, 23); - this.bnBrowseWTWRSS.TabIndex = 2; - this.bnBrowseWTWRSS.Text = "Browse..."; - this.bnBrowseWTWRSS.UseVisualStyleBackColor = true; - this.bnBrowseWTWRSS.Click += new System.EventHandler(this.bnBrowseWTWRSS_Click); + this.chkScanOnStartup.AutoSize = true; + this.chkScanOnStartup.Location = new System.Drawing.Point(3, 65); + this.chkScanOnStartup.Name = "chkScanOnStartup"; + this.chkScanOnStartup.Size = new System.Drawing.Size(103, 17); + this.chkScanOnStartup.TabIndex = 23; + this.chkScanOnStartup.Text = "&Scan on Startup"; + this.toolTip1.SetToolTip(this.chkScanOnStartup, "If checked the system will automatically scan and complete actions on startup"); + this.chkScanOnStartup.UseVisualStyleBackColor = true; // - // txtWTWRSS + // chkScheduledScan // - this.txtWTWRSS.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtWTWRSS.Location = new System.Drawing.Point(64, 20); - this.txtWTWRSS.Name = "txtWTWRSS"; - this.txtWTWRSS.Size = new System.Drawing.Size(424, 20); - this.txtWTWRSS.TabIndex = 1; + this.chkScheduledScan.AutoSize = true; + this.chkScheduledScan.Location = new System.Drawing.Point(3, 88); + this.chkScheduledScan.Name = "chkScheduledScan"; + this.chkScheduledScan.Size = new System.Drawing.Size(135, 17); + this.chkScheduledScan.TabIndex = 24; + this.chkScheduledScan.Text = "Sc&heduled scan every "; + this.toolTip1.SetToolTip(this.chkScheduledScan, "If checked the system will automatically scan and complete actions on startup"); + this.chkScheduledScan.UseVisualStyleBackColor = true; // - // cbWTWRSS + // txtEmptyIgnoreExtensions // - this.cbWTWRSS.AutoSize = true; - this.cbWTWRSS.Location = new System.Drawing.Point(8, 22); - this.cbWTWRSS.Name = "cbWTWRSS"; - this.cbWTWRSS.Size = new System.Drawing.Size(48, 17); - this.cbWTWRSS.TabIndex = 0; - this.cbWTWRSS.Text = "RSS"; - this.cbWTWRSS.UseVisualStyleBackColor = true; - this.cbWTWRSS.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.txtEmptyIgnoreExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtEmptyIgnoreExtensions.Location = new System.Drawing.Point(95, 139); + this.txtEmptyIgnoreExtensions.Name = "txtEmptyIgnoreExtensions"; + this.txtEmptyIgnoreExtensions.Size = new System.Drawing.Size(428, 20); + this.txtEmptyIgnoreExtensions.TabIndex = 5; + this.toolTip1.SetToolTip(this.txtEmptyIgnoreExtensions, "For example \".par2;.nzb;.nfo\""); // - // label17 + // txtEmptyIgnoreWords // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(212, 109); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(79, 13); - this.label17.TabIndex = 7; - this.label17.Text = "days worth and"; + this.txtEmptyIgnoreWords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtEmptyIgnoreWords.Location = new System.Drawing.Point(95, 89); + this.txtEmptyIgnoreWords.Name = "txtEmptyIgnoreWords"; + this.txtEmptyIgnoreWords.Size = new System.Drawing.Size(428, 20); + this.txtEmptyIgnoreWords.TabIndex = 3; + this.toolTip1.SetToolTip(this.txtEmptyIgnoreWords, "For example \"sample\""); // - // label16 + // cmDefaults // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(120, 109); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(52, 13); - this.label16.TabIndex = 5; - this.label16.Text = "shows, or"; + this.cmDefaults.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.KODIToolStripMenuItem, + this.pyTivoToolStripMenuItem, + this.mede8erToolStripMenuItem, + this.noneToolStripMenuItem}); + this.cmDefaults.Name = "cmDefaults"; + this.cmDefaults.Size = new System.Drawing.Size(121, 92); + this.cmDefaults.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.cmDefaults_ItemClicked); // - // label15 + // KODIToolStripMenuItem // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(9, 109); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(71, 13); - this.label15.TabIndex = 3; - this.label15.Text = "No more than"; + this.KODIToolStripMenuItem.Name = "KODIToolStripMenuItem"; + this.KODIToolStripMenuItem.Size = new System.Drawing.Size(120, 22); + this.KODIToolStripMenuItem.Tag = "1"; + this.KODIToolStripMenuItem.Text = "&KODI"; // - // txtExportRSSMaxDays + // pyTivoToolStripMenuItem // - this.txtExportRSSMaxDays.Location = new System.Drawing.Point(178, 106); - this.txtExportRSSMaxDays.Name = "txtExportRSSMaxDays"; - this.txtExportRSSMaxDays.Size = new System.Drawing.Size(28, 20); - this.txtExportRSSMaxDays.TabIndex = 6; - this.txtExportRSSMaxDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + this.pyTivoToolStripMenuItem.Name = "pyTivoToolStripMenuItem"; + this.pyTivoToolStripMenuItem.Size = new System.Drawing.Size(120, 22); + this.pyTivoToolStripMenuItem.Tag = "2"; + this.pyTivoToolStripMenuItem.Text = "&pyTivo"; // - // txtExportRSSMaxShows + // mede8erToolStripMenuItem // - this.txtExportRSSMaxShows.Location = new System.Drawing.Point(86, 106); - this.txtExportRSSMaxShows.Name = "txtExportRSSMaxShows"; - this.txtExportRSSMaxShows.Size = new System.Drawing.Size(28, 20); - this.txtExportRSSMaxShows.TabIndex = 4; - this.txtExportRSSMaxShows.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + this.mede8erToolStripMenuItem.Name = "mede8erToolStripMenuItem"; + this.mede8erToolStripMenuItem.Size = new System.Drawing.Size(120, 22); + this.mede8erToolStripMenuItem.Tag = "3"; + this.mede8erToolStripMenuItem.Text = "&Mede8er"; // - // saveFile + // noneToolStripMenuItem // - this.saveFile.Filter = "RSS files (*.rss)|*.rss|XML files (*.xml)|*.xml|CSV files (*.csv)|*.csv|TXT files" + - " (*.txt)|*.txt|HTML files (*.html)|*.html|iCal files (*.ics)|*.ics|All files (*." + - "*)|*.*"; + this.noneToolStripMenuItem.Name = "noneToolStripMenuItem"; + this.noneToolStripMenuItem.Size = new System.Drawing.Size(120, 22); + this.noneToolStripMenuItem.Tag = "4"; + this.noneToolStripMenuItem.Text = "&None"; // - // txtSpecialsFolderName + // tpDisplay + // + this.tpDisplay.Controls.Add(this.txtSeasonFolderName); + this.tpDisplay.Controls.Add(this.label35); + this.tpDisplay.Controls.Add(this.chkHideWtWSpoilers); + this.tpDisplay.Controls.Add(this.chkHideMyShowsSpoilers); + this.tpDisplay.Controls.Add(this.rbWTWScan); + this.tpDisplay.Controls.Add(this.rbWTWSearch); + this.tpDisplay.Controls.Add(this.cbStartupTab); + this.tpDisplay.Controls.Add(this.cbAutoSelInMyShows); + this.tpDisplay.Controls.Add(this.cbShowEpisodePictures); + this.tpDisplay.Controls.Add(this.label11); + this.tpDisplay.Controls.Add(this.label6); + this.tpDisplay.Controls.Add(this.chkShowInTaskbar); + this.tpDisplay.Controls.Add(this.cbNotificationIcon); + this.tpDisplay.Location = new System.Drawing.Point(4, 40); + this.tpDisplay.Name = "tpDisplay"; + this.tpDisplay.Padding = new System.Windows.Forms.Padding(3); + this.tpDisplay.Size = new System.Drawing.Size(529, 426); + this.tpDisplay.TabIndex = 13; + this.tpDisplay.Text = "Display"; + this.tpDisplay.UseVisualStyleBackColor = true; // - this.txtSpecialsFolderName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // txtSeasonFolderName + // + this.txtSeasonFolderName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSpecialsFolderName.Location = new System.Drawing.Point(113, 281); - this.txtSpecialsFolderName.Name = "txtSpecialsFolderName"; - this.txtSpecialsFolderName.Size = new System.Drawing.Size(492, 20); - this.txtSpecialsFolderName.TabIndex = 12; + this.txtSeasonFolderName.Location = new System.Drawing.Point(113, 212); + this.txtSeasonFolderName.Name = "txtSeasonFolderName"; + this.txtSeasonFolderName.Size = new System.Drawing.Size(410, 20); + this.txtSeasonFolderName.TabIndex = 37; // - // txtVideoExtensions + // label35 // - this.txtVideoExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtVideoExtensions.Location = new System.Drawing.Point(99, 128); - this.txtVideoExtensions.Name = "txtVideoExtensions"; - this.txtVideoExtensions.Size = new System.Drawing.Size(506, 20); - this.txtVideoExtensions.TabIndex = 5; + this.label35.AutoSize = true; + this.label35.Location = new System.Drawing.Point(6, 215); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(80, 13); + this.label35.TabIndex = 36; + this.label35.Text = "&Seasons name:"; + // + // chkHideWtWSpoilers + // + this.chkHideWtWSpoilers.AutoSize = true; + this.chkHideWtWSpoilers.Location = new System.Drawing.Point(9, 166); + this.chkHideWtWSpoilers.Name = "chkHideWtWSpoilers"; + this.chkHideWtWSpoilers.Size = new System.Drawing.Size(182, 17); + this.chkHideWtWSpoilers.TabIndex = 35; + this.chkHideWtWSpoilers.Text = "Hide Spoilers in When To Watch"; + this.chkHideWtWSpoilers.UseVisualStyleBackColor = true; + // + // chkHideMyShowsSpoilers + // + this.chkHideMyShowsSpoilers.AutoSize = true; + this.chkHideMyShowsSpoilers.Location = new System.Drawing.Point(9, 143); + this.chkHideMyShowsSpoilers.Name = "chkHideMyShowsSpoilers"; + this.chkHideMyShowsSpoilers.Size = new System.Drawing.Size(151, 17); + this.chkHideMyShowsSpoilers.TabIndex = 34; + this.chkHideMyShowsSpoilers.Text = "Hide Spoilers in My Shows"; + this.chkHideMyShowsSpoilers.UseVisualStyleBackColor = true; + // + // rbWTWScan + // + this.rbWTWScan.AutoSize = true; + this.rbWTWScan.Location = new System.Drawing.Point(27, 48); + this.rbWTWScan.Name = "rbWTWScan"; + this.rbWTWScan.Size = new System.Drawing.Size(50, 17); + this.rbWTWScan.TabIndex = 27; + this.rbWTWScan.TabStop = true; + this.rbWTWScan.Text = "S&can"; + this.rbWTWScan.UseVisualStyleBackColor = true; + // + // rbWTWSearch + // + this.rbWTWSearch.AutoSize = true; + this.rbWTWSearch.Location = new System.Drawing.Point(27, 29); + this.rbWTWSearch.Name = "rbWTWSearch"; + this.rbWTWSearch.Size = new System.Drawing.Size(59, 17); + this.rbWTWSearch.TabIndex = 26; + this.rbWTWSearch.TabStop = true; + this.rbWTWSearch.Text = "S&earch"; + this.rbWTWSearch.UseVisualStyleBackColor = true; // // cbStartupTab // @@ -541,1008 +596,1123 @@ private void InitializeComponent() "My Shows", "Scan", "When to Watch"}); - this.cbStartupTab.Location = new System.Drawing.Point(74, 88); + this.cbStartupTab.Location = new System.Drawing.Point(74, 70); this.cbStartupTab.Name = "cbStartupTab"; this.cbStartupTab.Size = new System.Drawing.Size(135, 21); - this.cbStartupTab.TabIndex = 7; + this.cbStartupTab.TabIndex = 29; + // + // cbAutoSelInMyShows + // + this.cbAutoSelInMyShows.AutoSize = true; + this.cbAutoSelInMyShows.Location = new System.Drawing.Point(9, 189); + this.cbAutoSelInMyShows.Name = "cbAutoSelInMyShows"; + this.cbAutoSelInMyShows.Size = new System.Drawing.Size(268, 17); + this.cbAutoSelInMyShows.TabIndex = 33; + this.cbAutoSelInMyShows.Text = "&Automatically select show and season in My Shows"; + this.cbAutoSelInMyShows.UseVisualStyleBackColor = true; // // cbShowEpisodePictures // this.cbShowEpisodePictures.AutoSize = true; - this.cbShowEpisodePictures.Location = new System.Drawing.Point(9, 138); + this.cbShowEpisodePictures.Location = new System.Drawing.Point(9, 120); this.cbShowEpisodePictures.Name = "cbShowEpisodePictures"; this.cbShowEpisodePictures.Size = new System.Drawing.Size(218, 17); - this.cbShowEpisodePictures.TabIndex = 10; + this.cbShowEpisodePictures.TabIndex = 32; this.cbShowEpisodePictures.Text = "S&how episode pictures in episode guides"; this.cbShowEpisodePictures.UseVisualStyleBackColor = true; // - // cbLeadingZero + // label11 // - this.cbLeadingZero.AutoSize = true; - this.cbLeadingZero.Location = new System.Drawing.Point(6, 257); - this.cbLeadingZero.Name = "cbLeadingZero"; - this.cbLeadingZero.Size = new System.Drawing.Size(170, 17); - this.cbLeadingZero.TabIndex = 10; - this.cbLeadingZero.Text = "&Leading 0 on Season numbers"; - this.cbLeadingZero.UseVisualStyleBackColor = true; + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(6, 14); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(185, 13); + this.label11.TabIndex = 25; + this.label11.Text = "Double-click in When to Watch does:"; // - // cbKeepTogether + // label6 // - this.cbKeepTogether.AutoSize = true; - this.cbKeepTogether.Location = new System.Drawing.Point(6, 180); - this.cbKeepTogether.Name = "cbKeepTogether"; - this.cbKeepTogether.Size = new System.Drawing.Size(251, 17); - this.cbKeepTogether.TabIndex = 8; - this.cbKeepTogether.Text = "&Copy/Move files with same base name as video"; - this.cbKeepTogether.UseVisualStyleBackColor = true; - this.cbKeepTogether.CheckedChanged += new System.EventHandler(this.cbKeepTogether_CheckedChanged); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 73); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(62, 13); + this.label6.TabIndex = 28; + this.label6.Text = "&Startup tab:"; // // chkShowInTaskbar // this.chkShowInTaskbar.AutoSize = true; - this.chkShowInTaskbar.Location = new System.Drawing.Point(169, 115); + this.chkShowInTaskbar.Location = new System.Drawing.Point(169, 97); this.chkShowInTaskbar.Name = "chkShowInTaskbar"; this.chkShowInTaskbar.Size = new System.Drawing.Size(102, 17); - this.chkShowInTaskbar.TabIndex = 9; + this.chkShowInTaskbar.TabIndex = 31; this.chkShowInTaskbar.Text = "Show in &taskbar"; this.chkShowInTaskbar.UseVisualStyleBackColor = true; - this.chkShowInTaskbar.CheckedChanged += new System.EventHandler(this.chkShowInTaskbar_CheckedChanged); // // cbNotificationIcon // this.cbNotificationIcon.AutoSize = true; - this.cbNotificationIcon.Location = new System.Drawing.Point(9, 115); + this.cbNotificationIcon.Location = new System.Drawing.Point(9, 97); this.cbNotificationIcon.Name = "cbNotificationIcon"; this.cbNotificationIcon.Size = new System.Drawing.Size(154, 17); - this.cbNotificationIcon.TabIndex = 8; + this.cbNotificationIcon.TabIndex = 30; this.cbNotificationIcon.Text = "Show ¬ification area icon"; this.cbNotificationIcon.UseVisualStyleBackColor = true; - this.cbNotificationIcon.CheckedChanged += new System.EventHandler(this.cbNotificationIcon_CheckedChanged); // - // txtWTWDays + // tabPage1 // - this.txtWTWDays.Location = new System.Drawing.Point(13, 9); - this.txtWTWDays.Name = "txtWTWDays"; - this.txtWTWDays.Size = new System.Drawing.Size(28, 20); - this.txtWTWDays.TabIndex = 1; - this.txtWTWDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + this.tabPage1.Controls.Add(this.gbJSON); + this.tabPage1.Controls.Add(this.gbRSS); + this.tabPage1.Location = new System.Drawing.Point(4, 40); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(529, 426); + this.tabPage1.TabIndex = 12; + this.tabPage1.Text = "RSS/JSON Search"; + this.tabPage1.UseVisualStyleBackColor = true; // - // label2 + // gbJSON // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(47, 12); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(111, 13); - this.label2.TabIndex = 2; - this.label2.Text = "days counts as recent"; + this.gbJSON.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.gbJSON.Controls.Add(this.label51); + this.gbJSON.Controls.Add(this.tbJSONFilenameToken); + this.gbJSON.Controls.Add(this.label50); + this.gbJSON.Controls.Add(this.tbJSONURLToken); + this.gbJSON.Controls.Add(this.label49); + this.gbJSON.Controls.Add(this.tbJSONRootNode); + this.gbJSON.Controls.Add(this.label48); + this.gbJSON.Controls.Add(this.tbJSONURL); + this.gbJSON.Location = new System.Drawing.Point(3, 205); + this.gbJSON.Name = "gbJSON"; + this.gbJSON.Size = new System.Drawing.Size(520, 127); + this.gbJSON.TabIndex = 33; + this.gbJSON.TabStop = false; + this.gbJSON.Text = "JSON Search"; + // + // label51 + // + this.label51.AutoSize = true; + this.label51.Location = new System.Drawing.Point(7, 68); + this.label51.Name = "label51"; + this.label51.Size = new System.Drawing.Size(86, 13); + this.label51.TabIndex = 37; + this.label51.Text = "Filename Token:"; + // + // tbJSONFilenameToken + // + this.tbJSONFilenameToken.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbJSONFilenameToken.Location = new System.Drawing.Point(98, 65); + this.tbJSONFilenameToken.Name = "tbJSONFilenameToken"; + this.tbJSONFilenameToken.Size = new System.Drawing.Size(417, 20); + this.tbJSONFilenameToken.TabIndex = 36; // - // label13 + // label50 // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(6, 284); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(108, 13); - this.label13.TabIndex = 11; - this.label13.Text = "&Specials folder name:"; + this.label50.AutoSize = true; + this.label50.Location = new System.Drawing.Point(8, 94); + this.label50.Name = "label50"; + this.label50.Size = new System.Drawing.Size(66, 13); + this.label50.TabIndex = 35; + this.label50.Text = "URL Token:"; // - // label14 + // tbJSONURLToken // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(3, 131); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(90, 13); - this.label14.TabIndex = 4; - this.label14.Text = "&Video extensions:"; + this.tbJSONURLToken.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbJSONURLToken.Location = new System.Drawing.Point(99, 91); + this.tbJSONURLToken.Name = "tbJSONURLToken"; + this.tbJSONURLToken.Size = new System.Drawing.Size(417, 20); + this.tbJSONURLToken.TabIndex = 34; // - // label6 + // label49 // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(6, 91); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(62, 13); - this.label6.TabIndex = 6; - this.label6.Text = "&Startup tab:"; + this.label49.AutoSize = true; + this.label49.Location = new System.Drawing.Point(7, 42); + this.label49.Name = "label49"; + this.label49.Size = new System.Drawing.Size(62, 13); + this.label49.TabIndex = 33; + this.label49.Text = "Root Node:"; // - // tabControl1 + // tbJSONRootNode // - this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.tbJSONRootNode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tabControl1.Controls.Add(this.tbGeneral); - this.tabControl1.Controls.Add(this.tbFilesAndFolders); - this.tabControl1.Controls.Add(this.tbAutoExport); - this.tabControl1.Controls.Add(this.tpScanOptions); - this.tabControl1.Controls.Add(this.tbFolderDeleting); - this.tabControl1.Controls.Add(this.tbMediaCenter); - this.tabControl1.Controls.Add(this.tbSearchFolders); - this.tabControl1.Controls.Add(this.tbuTorrentNZB); - this.tabControl1.Controls.Add(this.tpTreeColoring); - this.tabControl1.Controls.Add(this.tpBulkAdd); - this.tabControl1.Controls.Add(this.tpSubtitles); - this.tabControl1.Location = new System.Drawing.Point(12, 12); - this.tabControl1.Multiline = true; - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(517, 533); - this.tabControl1.TabIndex = 0; - // - // tbGeneral - // - this.tbGeneral.Controls.Add(this.chkHideWtWSpoilers); - this.tbGeneral.Controls.Add(this.chkHideMyShowsSpoilers); - this.tbGeneral.Controls.Add(this.label37); - this.tbGeneral.Controls.Add(this.label38); - this.tbGeneral.Controls.Add(this.tbPercentDirty); - this.tbGeneral.Controls.Add(this.cbMode); - this.tbGeneral.Controls.Add(this.label34); - this.tbGeneral.Controls.Add(this.rbWTWScan); - this.tbGeneral.Controls.Add(this.rbWTWSearch); - this.tbGeneral.Controls.Add(this.label10); - this.tbGeneral.Controls.Add(this.cbLookForAirdate); - this.tbGeneral.Controls.Add(this.cbLanguages); - this.tbGeneral.Controls.Add(this.cbStartupTab); - this.tbGeneral.Controls.Add(this.label21); - this.tbGeneral.Controls.Add(this.cbAutoSelInMyShows); - this.tbGeneral.Controls.Add(this.cbShowEpisodePictures); - this.tbGeneral.Controls.Add(this.label11); - this.tbGeneral.Controls.Add(this.label6); - this.tbGeneral.Controls.Add(this.chkShowInTaskbar); - this.tbGeneral.Controls.Add(this.label20); - this.tbGeneral.Controls.Add(this.label2); - this.tbGeneral.Controls.Add(this.cbNotificationIcon); - this.tbGeneral.Controls.Add(this.txtParallelDownloads); - this.tbGeneral.Controls.Add(this.txtWTWDays); - this.tbGeneral.Location = new System.Drawing.Point(4, 40); - this.tbGeneral.Name = "tbGeneral"; - this.tbGeneral.Padding = new System.Windows.Forms.Padding(3); - this.tbGeneral.Size = new System.Drawing.Size(509, 489); - this.tbGeneral.TabIndex = 0; - this.tbGeneral.Text = "General"; - this.tbGeneral.UseVisualStyleBackColor = true; + this.tbJSONRootNode.Location = new System.Drawing.Point(98, 39); + this.tbJSONRootNode.Name = "tbJSONRootNode"; + this.tbJSONRootNode.Size = new System.Drawing.Size(417, 20); + this.tbJSONRootNode.TabIndex = 32; // - // chkHideWtWSpoilers + // label48 // - this.chkHideWtWSpoilers.AutoSize = true; - this.chkHideWtWSpoilers.Location = new System.Drawing.Point(9, 184); - this.chkHideWtWSpoilers.Name = "chkHideWtWSpoilers"; - this.chkHideWtWSpoilers.Size = new System.Drawing.Size(182, 17); - this.chkHideWtWSpoilers.TabIndex = 24; - this.chkHideWtWSpoilers.Text = "Hide Spoilers in When To Watch"; - this.chkHideWtWSpoilers.UseVisualStyleBackColor = true; + this.label48.AutoSize = true; + this.label48.Location = new System.Drawing.Point(6, 16); + this.label48.Name = "label48"; + this.label48.Size = new System.Drawing.Size(32, 13); + this.label48.TabIndex = 31; + this.label48.Text = "URL:"; // - // chkHideMyShowsSpoilers + // tbJSONURL // - this.chkHideMyShowsSpoilers.AutoSize = true; - this.chkHideMyShowsSpoilers.Location = new System.Drawing.Point(9, 161); - this.chkHideMyShowsSpoilers.Name = "chkHideMyShowsSpoilers"; - this.chkHideMyShowsSpoilers.Size = new System.Drawing.Size(151, 17); - this.chkHideMyShowsSpoilers.TabIndex = 23; - this.chkHideMyShowsSpoilers.Text = "Hide Spoilers in My Shows"; - this.chkHideMyShowsSpoilers.UseVisualStyleBackColor = true; + this.tbJSONURL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbJSONURL.Location = new System.Drawing.Point(97, 13); + this.tbJSONURL.Name = "tbJSONURL"; + this.tbJSONURL.Size = new System.Drawing.Size(417, 20); + this.tbJSONURL.TabIndex = 30; // - // label37 + // gbRSS // - this.label37.AutoSize = true; - this.label37.Location = new System.Drawing.Point(6, 229); - this.label37.Name = "label37"; - this.label37.Size = new System.Drawing.Size(114, 13); - this.label37.TabIndex = 20; - this.label37.Text = "Refresh entire series if"; + this.gbRSS.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.gbRSS.Controls.Add(this.label45); + this.gbRSS.Controls.Add(this.tbPreferredRSSTerms); + this.gbRSS.Controls.Add(this.RSSGrid); + this.gbRSS.Controls.Add(this.label25); + this.gbRSS.Controls.Add(this.bnRSSRemove); + this.gbRSS.Controls.Add(this.bnRSSGo); + this.gbRSS.Controls.Add(this.bnRSSAdd); + this.gbRSS.Location = new System.Drawing.Point(4, 6); + this.gbRSS.Name = "gbRSS"; + this.gbRSS.Size = new System.Drawing.Size(520, 193); + this.gbRSS.TabIndex = 32; + this.gbRSS.TabStop = false; + this.gbRSS.Text = "RSS Search"; // - // label38 + // label45 // - this.label38.AutoSize = true; - this.label38.Location = new System.Drawing.Point(158, 229); - this.label38.Name = "label38"; - this.label38.Size = new System.Drawing.Size(132, 13); - this.label38.TabIndex = 22; - this.label38.Text = "% of episodes are updated"; + this.label45.AutoSize = true; + this.label45.Location = new System.Drawing.Point(6, 16); + this.label45.Name = "label45"; + this.label45.Size = new System.Drawing.Size(85, 13); + this.label45.TabIndex = 31; + this.label45.Text = "Preferred Terms:"; // - // tbPercentDirty + // tbPreferredRSSTerms // - this.tbPercentDirty.Location = new System.Drawing.Point(123, 226); - this.tbPercentDirty.Name = "tbPercentDirty"; - this.tbPercentDirty.Size = new System.Drawing.Size(28, 20); - this.tbPercentDirty.TabIndex = 21; + this.tbPreferredRSSTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbPreferredRSSTerms.Location = new System.Drawing.Point(97, 13); + this.tbPreferredRSSTerms.Name = "tbPreferredRSSTerms"; + this.tbPreferredRSSTerms.Size = new System.Drawing.Size(417, 20); + this.tbPreferredRSSTerms.TabIndex = 30; // - // cbMode + // RSSGrid // - this.cbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbMode.FormattingEnabled = true; - this.cbMode.Items.AddRange(new object[] { - "Beta", - "Production"}); - this.cbMode.Location = new System.Drawing.Point(112, 320); - this.cbMode.Name = "cbMode"; - this.cbMode.Size = new System.Drawing.Size(146, 21); - this.cbMode.Sorted = true; - this.cbMode.TabIndex = 19; + this.RSSGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.RSSGrid.BackColor = System.Drawing.SystemColors.Window; + this.RSSGrid.EnableSort = true; + this.RSSGrid.Location = new System.Drawing.Point(6, 59); + this.RSSGrid.Name = "RSSGrid"; + this.RSSGrid.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; + this.RSSGrid.SelectionMode = SourceGrid.GridSelectionMode.Cell; + this.RSSGrid.Size = new System.Drawing.Size(508, 91); + this.RSSGrid.TabIndex = 26; + this.RSSGrid.TabStop = true; + this.RSSGrid.ToolTipText = ""; // - // label34 + // label25 // - this.label34.AutoSize = true; - this.label34.Location = new System.Drawing.Point(6, 323); - this.label34.Name = "label34"; - this.label34.Size = new System.Drawing.Size(37, 13); - this.label34.TabIndex = 18; - this.label34.Text = "&Mode:"; + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(6, 36); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(99, 13); + this.label25.TabIndex = 25; + this.label25.Text = "Torrent RSS URLs:"; // - // rbWTWScan + // bnRSSRemove // - this.rbWTWScan.AutoSize = true; - this.rbWTWScan.Location = new System.Drawing.Point(27, 66); - this.rbWTWScan.Name = "rbWTWScan"; - this.rbWTWScan.Size = new System.Drawing.Size(50, 17); - this.rbWTWScan.TabIndex = 5; - this.rbWTWScan.TabStop = true; - this.rbWTWScan.Text = "S&can"; - this.rbWTWScan.UseVisualStyleBackColor = true; + this.bnRSSRemove.Location = new System.Drawing.Point(87, 159); + this.bnRSSRemove.Name = "bnRSSRemove"; + this.bnRSSRemove.Size = new System.Drawing.Size(75, 23); + this.bnRSSRemove.TabIndex = 28; + this.bnRSSRemove.Text = "&Remove"; + this.bnRSSRemove.UseVisualStyleBackColor = true; // - // rbWTWSearch + // bnRSSGo // - this.rbWTWSearch.AutoSize = true; - this.rbWTWSearch.Location = new System.Drawing.Point(27, 47); - this.rbWTWSearch.Name = "rbWTWSearch"; - this.rbWTWSearch.Size = new System.Drawing.Size(59, 17); - this.rbWTWSearch.TabIndex = 4; - this.rbWTWSearch.TabStop = true; - this.rbWTWSearch.Text = "S&earch"; - this.rbWTWSearch.UseVisualStyleBackColor = true; + this.bnRSSGo.Location = new System.Drawing.Point(168, 159); + this.bnRSSGo.Name = "bnRSSGo"; + this.bnRSSGo.Size = new System.Drawing.Size(75, 23); + this.bnRSSGo.TabIndex = 29; + this.bnRSSGo.Text = "&Open"; + this.bnRSSGo.UseVisualStyleBackColor = true; // - // label10 + // bnRSSAdd // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(6, 299); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(100, 13); - this.label10.TabIndex = 16; - this.label10.Text = "&Preferred language:"; + this.bnRSSAdd.Location = new System.Drawing.Point(6, 159); + this.bnRSSAdd.Name = "bnRSSAdd"; + this.bnRSSAdd.Size = new System.Drawing.Size(75, 23); + this.bnRSSAdd.TabIndex = 27; + this.bnRSSAdd.Text = "&Add"; + this.bnRSSAdd.UseVisualStyleBackColor = true; // - // cbLookForAirdate + // tpSubtitles // - this.cbLookForAirdate.AutoSize = true; - this.cbLookForAirdate.Location = new System.Drawing.Point(9, 275); - this.cbLookForAirdate.Name = "cbLookForAirdate"; - this.cbLookForAirdate.Size = new System.Drawing.Size(158, 17); - this.cbLookForAirdate.TabIndex = 15; - this.cbLookForAirdate.Text = "&Look for airdate in filenames"; - this.cbLookForAirdate.UseVisualStyleBackColor = true; + this.tpSubtitles.Controls.Add(this.cbTxtToSub); + this.tpSubtitles.Controls.Add(this.label46); + this.tpSubtitles.Controls.Add(this.txtSubtitleExtensions); + this.tpSubtitles.Controls.Add(this.chkRetainLanguageSpecificSubtitles); + this.tpSubtitles.Location = new System.Drawing.Point(4, 40); + this.tpSubtitles.Name = "tpSubtitles"; + this.tpSubtitles.Padding = new System.Windows.Forms.Padding(3); + this.tpSubtitles.Size = new System.Drawing.Size(529, 426); + this.tpSubtitles.TabIndex = 11; + this.tpSubtitles.Text = "Subtitles"; + this.tpSubtitles.UseVisualStyleBackColor = true; // - // cbLanguages + // cbTxtToSub // - this.cbLanguages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbLanguages.FormattingEnabled = true; - this.cbLanguages.Items.AddRange(new object[] { - "My Shows", - "Scan", - "When to Watch"}); - this.cbLanguages.Location = new System.Drawing.Point(112, 296); - this.cbLanguages.Name = "cbLanguages"; - this.cbLanguages.Size = new System.Drawing.Size(146, 21); - this.cbLanguages.Sorted = true; - this.cbLanguages.TabIndex = 17; + this.cbTxtToSub.AutoSize = true; + this.cbTxtToSub.Location = new System.Drawing.Point(6, 38); + this.cbTxtToSub.Name = "cbTxtToSub"; + this.cbTxtToSub.Size = new System.Drawing.Size(118, 17); + this.cbTxtToSub.TabIndex = 28; + this.cbTxtToSub.Text = "&Rename .txt to .sub"; + this.cbTxtToSub.UseVisualStyleBackColor = true; // - // label21 + // label46 // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(6, 205); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(82, 13); - this.label21.TabIndex = 11; - this.label21.Text = "&Download up to"; + this.label46.AutoSize = true; + this.label46.Location = new System.Drawing.Point(3, 66); + this.label46.Name = "label46"; + this.label46.Size = new System.Drawing.Size(98, 13); + this.label46.TabIndex = 26; + this.label46.Text = "&Subtitle extensions:"; // - // cbAutoSelInMyShows + // txtSubtitleExtensions // - this.cbAutoSelInMyShows.AutoSize = true; - this.cbAutoSelInMyShows.Location = new System.Drawing.Point(9, 252); - this.cbAutoSelInMyShows.Name = "cbAutoSelInMyShows"; - this.cbAutoSelInMyShows.Size = new System.Drawing.Size(268, 17); - this.cbAutoSelInMyShows.TabIndex = 14; - this.cbAutoSelInMyShows.Text = "&Automatically select show and season in My Shows"; - this.cbAutoSelInMyShows.UseVisualStyleBackColor = true; + this.txtSubtitleExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSubtitleExtensions.Location = new System.Drawing.Point(107, 63); + this.txtSubtitleExtensions.Name = "txtSubtitleExtensions"; + this.txtSubtitleExtensions.Size = new System.Drawing.Size(416, 20); + this.txtSubtitleExtensions.TabIndex = 27; // - // label11 + // chkRetainLanguageSpecificSubtitles // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(6, 32); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(185, 13); - this.label11.TabIndex = 3; - this.label11.Text = "Double-click in When to Watch does:"; + this.chkRetainLanguageSpecificSubtitles.AutoSize = true; + this.chkRetainLanguageSpecificSubtitles.Location = new System.Drawing.Point(6, 15); + this.chkRetainLanguageSpecificSubtitles.Name = "chkRetainLanguageSpecificSubtitles"; + this.chkRetainLanguageSpecificSubtitles.Size = new System.Drawing.Size(192, 17); + this.chkRetainLanguageSpecificSubtitles.TabIndex = 25; + this.chkRetainLanguageSpecificSubtitles.Text = "Retain &Language Specific Subtitles"; + this.chkRetainLanguageSpecificSubtitles.UseVisualStyleBackColor = true; // - // label20 + // tpBulkAdd // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(126, 205); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(170, 13); - this.label20.TabIndex = 13; - this.label20.Text = "shows simultaneously from thetvdb"; - // - // txtParallelDownloads - // - this.txtParallelDownloads.Location = new System.Drawing.Point(92, 202); - this.txtParallelDownloads.Name = "txtParallelDownloads"; - this.txtParallelDownloads.Size = new System.Drawing.Size(28, 20); - this.txtParallelDownloads.TabIndex = 12; - this.txtParallelDownloads.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); - // - // tbFilesAndFolders - // - this.tbFilesAndFolders.Controls.Add(this.txtSeasonFormat); - this.tbFilesAndFolders.Controls.Add(this.label47); - this.tbFilesAndFolders.Controls.Add(this.bnTags); - this.tbFilesAndFolders.Controls.Add(this.txtKeepTogether); - this.tbFilesAndFolders.Controls.Add(this.label39); - this.tbFilesAndFolders.Controls.Add(this.cbKeepTogetherMode); - this.tbFilesAndFolders.Controls.Add(this.tbSeasonSearchTerms); - this.tbFilesAndFolders.Controls.Add(this.label36); - this.tbFilesAndFolders.Controls.Add(this.txtSeasonFolderName); - this.tbFilesAndFolders.Controls.Add(this.label35); - this.tbFilesAndFolders.Controls.Add(this.bnReplaceRemove); - this.tbFilesAndFolders.Controls.Add(this.bnReplaceAdd); - this.tbFilesAndFolders.Controls.Add(this.label3); - this.tbFilesAndFolders.Controls.Add(this.ReplacementsGrid); - this.tbFilesAndFolders.Controls.Add(this.label19); - this.tbFilesAndFolders.Controls.Add(this.txtMaxSampleSize); - this.tbFilesAndFolders.Controls.Add(this.label22); - this.tbFilesAndFolders.Controls.Add(this.label14); - this.tbFilesAndFolders.Controls.Add(this.txtSpecialsFolderName); - this.tbFilesAndFolders.Controls.Add(this.label13); - this.tbFilesAndFolders.Controls.Add(this.txtOtherExtensions); - this.tbFilesAndFolders.Controls.Add(this.txtVideoExtensions); - this.tbFilesAndFolders.Controls.Add(this.cbKeepTogether); - this.tbFilesAndFolders.Controls.Add(this.cbForceLower); - this.tbFilesAndFolders.Controls.Add(this.cbIgnoreSamples); - this.tbFilesAndFolders.Controls.Add(this.cbLeadingZero); - this.tbFilesAndFolders.Location = new System.Drawing.Point(4, 40); - this.tbFilesAndFolders.Name = "tbFilesAndFolders"; - this.tbFilesAndFolders.Padding = new System.Windows.Forms.Padding(3); - this.tbFilesAndFolders.Size = new System.Drawing.Size(509, 489); - this.tbFilesAndFolders.TabIndex = 1; - this.tbFilesAndFolders.Text = "Files and Folders"; - this.tbFilesAndFolders.UseVisualStyleBackColor = true; - // - // txtSeasonFormat - // - this.txtSeasonFormat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSeasonFormat.Location = new System.Drawing.Point(113, 330); - this.txtSeasonFormat.Name = "txtSeasonFormat"; - this.txtSeasonFormat.Size = new System.Drawing.Size(390, 20); - this.txtSeasonFormat.TabIndex = 26; - // - // label47 - // - this.label47.AutoSize = true; - this.label47.Location = new System.Drawing.Point(6, 333); - this.label47.Name = "label47"; - this.label47.Size = new System.Drawing.Size(112, 13); - this.label47.TabIndex = 25; - this.label47.Text = "&Seasons folder format:"; - // - // bnTags - // - this.bnTags.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnTags.Location = new System.Drawing.Point(548, 328); - this.bnTags.Name = "bnTags"; - this.bnTags.Size = new System.Drawing.Size(75, 23); - this.bnTags.TabIndex = 24; - this.bnTags.Text = "Tags..."; - this.bnTags.UseVisualStyleBackColor = true; - this.bnTags.Click += new System.EventHandler(this.bnTags_Click); + this.tpBulkAdd.Controls.Add(this.groupBox9); + this.tpBulkAdd.Controls.Add(this.groupBox8); + this.tpBulkAdd.Location = new System.Drawing.Point(4, 40); + this.tpBulkAdd.Name = "tpBulkAdd"; + this.tpBulkAdd.Padding = new System.Windows.Forms.Padding(3); + this.tpBulkAdd.Size = new System.Drawing.Size(529, 426); + this.tpBulkAdd.TabIndex = 10; + this.tpBulkAdd.Text = "Bulk/Auto Add"; + this.tpBulkAdd.UseVisualStyleBackColor = true; // - // txtKeepTogether + // groupBox9 // - this.txtKeepTogether.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBox9.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtKeepTogether.Location = new System.Drawing.Point(204, 206); - this.txtKeepTogether.Name = "txtKeepTogether"; - this.txtKeepTogether.Size = new System.Drawing.Size(299, 20); - this.txtKeepTogether.TabIndex = 23; - // - // label39 - // - this.label39.AutoSize = true; - this.label39.Location = new System.Drawing.Point(25, 210); - this.label39.Name = "label39"; - this.label39.Size = new System.Drawing.Size(21, 13); - this.label39.TabIndex = 22; - this.label39.Text = "Do"; - // - // cbKeepTogetherMode - // - this.cbKeepTogetherMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbKeepTogetherMode.FormattingEnabled = true; - this.cbKeepTogetherMode.Items.AddRange(new object[] { - "All", - "All but these", - "Just"}); - this.cbKeepTogetherMode.Location = new System.Drawing.Point(52, 207); - this.cbKeepTogetherMode.Name = "cbKeepTogetherMode"; - this.cbKeepTogetherMode.Size = new System.Drawing.Size(146, 21); - this.cbKeepTogetherMode.Sorted = true; - this.cbKeepTogetherMode.TabIndex = 21; - this.cbKeepTogetherMode.SelectedIndexChanged += new System.EventHandler(this.cbKeepTogetherMode_SelectedIndexChanged); + this.groupBox9.Controls.Add(this.tbSeasonSearchTerms); + this.groupBox9.Controls.Add(this.label36); + this.groupBox9.Controls.Add(this.chkForceBulkAddToUseSettingsOnly); + this.groupBox9.Controls.Add(this.cbIgnoreRecycleBin); + this.groupBox9.Controls.Add(this.cbIgnoreNoVideoFolders); + this.groupBox9.Location = new System.Drawing.Point(6, 10); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(517, 111); + this.groupBox9.TabIndex = 16; + this.groupBox9.TabStop = false; + this.groupBox9.Text = "Bulk Add"; // // tbSeasonSearchTerms // this.tbSeasonSearchTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tbSeasonSearchTerms.Location = new System.Drawing.Point(113, 353); + this.tbSeasonSearchTerms.Location = new System.Drawing.Point(113, 85); this.tbSeasonSearchTerms.Name = "tbSeasonSearchTerms"; - this.tbSeasonSearchTerms.Size = new System.Drawing.Size(390, 20); - this.tbSeasonSearchTerms.TabIndex = 20; + this.tbSeasonSearchTerms.Size = new System.Drawing.Size(401, 20); + this.tbSeasonSearchTerms.TabIndex = 22; // // label36 // this.label36.AutoSize = true; - this.label36.Location = new System.Drawing.Point(6, 356); + this.label36.Location = new System.Drawing.Point(6, 88); this.label36.Name = "label36"; this.label36.Size = new System.Drawing.Size(109, 13); - this.label36.TabIndex = 19; + this.label36.TabIndex = 21; this.label36.Text = "Season search terms:"; // - // txtSeasonFolderName + // groupBox8 // - this.txtSeasonFolderName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBox8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSeasonFolderName.Location = new System.Drawing.Point(113, 307); - this.txtSeasonFolderName.Name = "txtSeasonFolderName"; - this.txtSeasonFolderName.Size = new System.Drawing.Size(390, 20); - this.txtSeasonFolderName.TabIndex = 18; - // - // label35 - // - this.label35.AutoSize = true; - this.label35.Location = new System.Drawing.Point(6, 310); - this.label35.Name = "label35"; - this.label35.Size = new System.Drawing.Size(80, 13); - this.label35.TabIndex = 17; - this.label35.Text = "&Seasons name:"; + this.groupBox8.Controls.Add(this.chkAutoSearchForDownloadedFiles); + this.groupBox8.Controls.Add(this.label43); + this.groupBox8.Controls.Add(this.label44); + this.groupBox8.Controls.Add(this.tbIgnoreSuffixes); + this.groupBox8.Controls.Add(this.tbMovieTerms); + this.groupBox8.Location = new System.Drawing.Point(6, 127); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(517, 107); + this.groupBox8.TabIndex = 13; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "Auto Add"; // - // bnReplaceRemove + // chkAutoSearchForDownloadedFiles // - this.bnReplaceRemove.Location = new System.Drawing.Point(90, 91); - this.bnReplaceRemove.Name = "bnReplaceRemove"; - this.bnReplaceRemove.Size = new System.Drawing.Size(75, 23); - this.bnReplaceRemove.TabIndex = 3; - this.bnReplaceRemove.Text = "&Remove"; - this.bnReplaceRemove.UseVisualStyleBackColor = true; - this.bnReplaceRemove.Click += new System.EventHandler(this.bnReplaceRemove_Click); + this.chkAutoSearchForDownloadedFiles.AutoSize = true; + this.chkAutoSearchForDownloadedFiles.Location = new System.Drawing.Point(6, 19); + this.chkAutoSearchForDownloadedFiles.Name = "chkAutoSearchForDownloadedFiles"; + this.chkAutoSearchForDownloadedFiles.Size = new System.Drawing.Size(186, 17); + this.chkAutoSearchForDownloadedFiles.TabIndex = 16; + this.chkAutoSearchForDownloadedFiles.Text = "Notify when new shows are found"; + this.chkAutoSearchForDownloadedFiles.UseVisualStyleBackColor = true; // - // bnReplaceAdd + // label43 // - this.bnReplaceAdd.Location = new System.Drawing.Point(9, 91); - this.bnReplaceAdd.Name = "bnReplaceAdd"; - this.bnReplaceAdd.Size = new System.Drawing.Size(75, 23); - this.bnReplaceAdd.TabIndex = 2; - this.bnReplaceAdd.Text = "&Add"; - this.bnReplaceAdd.UseVisualStyleBackColor = true; - this.bnReplaceAdd.Click += new System.EventHandler(this.bnReplaceAdd_Click); + this.label43.AutoSize = true; + this.label43.Location = new System.Drawing.Point(3, 69); + this.label43.Name = "label43"; + this.label43.Size = new System.Drawing.Size(78, 13); + this.label43.TabIndex = 14; + this.label43.Text = "&Ignore suffixes:"; // - // label3 + // label44 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 3); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(120, 13); - this.label3.TabIndex = 0; - this.label3.Text = "Filename Replacements"; + this.label44.AutoSize = true; + this.label44.Location = new System.Drawing.Point(3, 43); + this.label44.Name = "label44"; + this.label44.Size = new System.Drawing.Size(71, 13); + this.label44.TabIndex = 12; + this.label44.Text = "&Movie Terms:"; // - // label19 + // tpTreeColoring // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(228, 379); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(55, 13); - this.label19.TabIndex = 15; - this.label19.Text = "MB in size"; + this.tpTreeColoring.Controls.Add(this.label7); + this.tpTreeColoring.Controls.Add(this.cboShowStatus); + this.tpTreeColoring.Controls.Add(this.label5); + this.tpTreeColoring.Controls.Add(this.txtShowStatusColor); + this.tpTreeColoring.Controls.Add(this.btnSelectColor); + this.tpTreeColoring.Controls.Add(this.bnRemoveDefinedColor); + this.tpTreeColoring.Controls.Add(this.btnAddShowStatusColoring); + this.tpTreeColoring.Controls.Add(this.lvwDefinedColors); + this.tpTreeColoring.Location = new System.Drawing.Point(4, 40); + this.tpTreeColoring.Name = "tpTreeColoring"; + this.tpTreeColoring.Padding = new System.Windows.Forms.Padding(3); + this.tpTreeColoring.Size = new System.Drawing.Size(529, 426); + this.tpTreeColoring.TabIndex = 7; + this.tpTreeColoring.Text = "Tree Colouring"; + this.tpTreeColoring.UseVisualStyleBackColor = true; // - // txtMaxSampleSize + // label7 // - this.txtMaxSampleSize.Location = new System.Drawing.Point(172, 376); - this.txtMaxSampleSize.Name = "txtMaxSampleSize"; - this.txtMaxSampleSize.Size = new System.Drawing.Size(53, 20); - this.txtMaxSampleSize.TabIndex = 14; - this.txtMaxSampleSize.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(3, 328); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(40, 13); + this.label7.TabIndex = 8; + this.label7.Text = "&Status:"; // - // label22 + // cboShowStatus // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(3, 157); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(89, 13); - this.label22.TabIndex = 6; - this.label22.Text = "&Other extensions:"; + this.cboShowStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cboShowStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboShowStatus.FormattingEnabled = true; + this.cboShowStatus.Location = new System.Drawing.Point(51, 325); + this.cboShowStatus.Name = "cboShowStatus"; + this.cboShowStatus.Size = new System.Drawing.Size(472, 21); + this.cboShowStatus.TabIndex = 7; // - // txtOtherExtensions + // label5 // - this.txtOtherExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtOtherExtensions.Location = new System.Drawing.Point(99, 154); - this.txtOtherExtensions.Name = "txtOtherExtensions"; - this.txtOtherExtensions.Size = new System.Drawing.Size(404, 20); - this.txtOtherExtensions.TabIndex = 7; + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(3, 360); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(58, 13); + this.label5.TabIndex = 6; + this.label5.Text = "&Text Color:"; // - // cbForceLower + // txtShowStatusColor // - this.cbForceLower.AutoSize = true; - this.cbForceLower.Location = new System.Drawing.Point(6, 401); - this.cbForceLower.Name = "cbForceLower"; - this.cbForceLower.Size = new System.Drawing.Size(167, 17); - this.cbForceLower.TabIndex = 16; - this.cbForceLower.Text = "&Make all filenames lower case"; - this.cbForceLower.UseVisualStyleBackColor = true; + this.txtShowStatusColor.Location = new System.Drawing.Point(67, 357); + this.txtShowStatusColor.Name = "txtShowStatusColor"; + this.txtShowStatusColor.Size = new System.Drawing.Size(100, 20); + this.txtShowStatusColor.TabIndex = 5; + this.txtShowStatusColor.TextChanged += new System.EventHandler(this.txtShowStatusColor_TextChanged); // - // cbIgnoreSamples + // btnSelectColor // - this.cbIgnoreSamples.AutoSize = true; - this.cbIgnoreSamples.Location = new System.Drawing.Point(6, 378); - this.cbIgnoreSamples.Name = "cbIgnoreSamples"; - this.cbIgnoreSamples.Size = new System.Drawing.Size(166, 17); - this.cbIgnoreSamples.TabIndex = 13; - this.cbIgnoreSamples.Text = "&Ignore \"sample\" videos, up to"; - this.cbIgnoreSamples.UseVisualStyleBackColor = true; + this.btnSelectColor.Location = new System.Drawing.Point(173, 355); + this.btnSelectColor.Name = "btnSelectColor"; + this.btnSelectColor.Size = new System.Drawing.Size(75, 23); + this.btnSelectColor.TabIndex = 4; + this.btnSelectColor.Text = "Select &Color"; + this.btnSelectColor.UseVisualStyleBackColor = true; + this.btnSelectColor.Click += new System.EventHandler(this.btnSelectColor_Click); // - // tbAutoExport + // bnRemoveDefinedColor // - this.tbAutoExport.Controls.Add(this.groupBox7); - this.tbAutoExport.Controls.Add(this.groupBox5); - this.tbAutoExport.Controls.Add(this.groupBox4); - this.tbAutoExport.Controls.Add(this.groupBox3); - this.tbAutoExport.Controls.Add(this.groupBox2); - this.tbAutoExport.Location = new System.Drawing.Point(4, 40); - this.tbAutoExport.Name = "tbAutoExport"; - this.tbAutoExport.Padding = new System.Windows.Forms.Padding(3); - this.tbAutoExport.Size = new System.Drawing.Size(509, 489); - this.tbAutoExport.TabIndex = 2; - this.tbAutoExport.Text = "Automatic Export"; - this.tbAutoExport.UseVisualStyleBackColor = true; + this.bnRemoveDefinedColor.Enabled = false; + this.bnRemoveDefinedColor.Location = new System.Drawing.Point(6, 296); + this.bnRemoveDefinedColor.Name = "bnRemoveDefinedColor"; + this.bnRemoveDefinedColor.Size = new System.Drawing.Size(75, 23); + this.bnRemoveDefinedColor.TabIndex = 3; + this.bnRemoveDefinedColor.Text = "&Remove"; + this.bnRemoveDefinedColor.UseVisualStyleBackColor = true; + this.bnRemoveDefinedColor.Click += new System.EventHandler(this.bnRemoveDefinedColor_Click); // - // groupBox7 + // btnAddShowStatusColoring // - this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox7.Controls.Add(this.bnBrowseShowsHTML); - this.groupBox7.Controls.Add(this.cbShowsHTML); - this.groupBox7.Controls.Add(this.txtShowsHTMLTo); - this.groupBox7.Controls.Add(this.bnBrowseShowsTXT); - this.groupBox7.Controls.Add(this.cbShowsTXT); - this.groupBox7.Controls.Add(this.txtShowsTXTTo); - this.groupBox7.Location = new System.Drawing.Point(7, 227); - this.groupBox7.Name = "groupBox7"; - this.groupBox7.Size = new System.Drawing.Size(496, 72); - this.groupBox7.TabIndex = 4; - this.groupBox7.TabStop = false; - this.groupBox7.Text = "All Shows"; + this.btnAddShowStatusColoring.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnAddShowStatusColoring.Location = new System.Drawing.Point(448, 352); + this.btnAddShowStatusColoring.Name = "btnAddShowStatusColoring"; + this.btnAddShowStatusColoring.Size = new System.Drawing.Size(75, 23); + this.btnAddShowStatusColoring.TabIndex = 3; + this.btnAddShowStatusColoring.Text = "&Add"; + this.btnAddShowStatusColoring.UseVisualStyleBackColor = true; + this.btnAddShowStatusColoring.Click += new System.EventHandler(this.btnAddShowStatusColoring_Click); // - // bnBrowseShowsHTML + // lvwDefinedColors // - this.bnBrowseShowsHTML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseShowsHTML.Location = new System.Drawing.Point(413, 45); - this.bnBrowseShowsHTML.Name = "bnBrowseShowsHTML"; - this.bnBrowseShowsHTML.Size = new System.Drawing.Size(75, 23); - this.bnBrowseShowsHTML.TabIndex = 8; - this.bnBrowseShowsHTML.Text = "Browse..."; - this.bnBrowseShowsHTML.UseVisualStyleBackColor = true; - this.bnBrowseShowsHTML.Click += new System.EventHandler(this.bnBrowseShowsHTML_Click); + this.lvwDefinedColors.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lvwDefinedColors.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.colShowStatus, + this.colColor}); + this.lvwDefinedColors.GridLines = true; + this.lvwDefinedColors.Location = new System.Drawing.Point(6, 6); + this.lvwDefinedColors.MultiSelect = false; + this.lvwDefinedColors.Name = "lvwDefinedColors"; + this.lvwDefinedColors.Size = new System.Drawing.Size(517, 284); + this.lvwDefinedColors.TabIndex = 0; + this.lvwDefinedColors.UseCompatibleStateImageBehavior = false; + this.lvwDefinedColors.View = System.Windows.Forms.View.Details; + this.lvwDefinedColors.SelectedIndexChanged += new System.EventHandler(this.lvwDefinedColors_SelectedIndexChanged); + this.lvwDefinedColors.DoubleClick += new System.EventHandler(this.lvwDefinedColors_DoubleClick); // - // cbShowsHTML + // colShowStatus // - this.cbShowsHTML.AutoSize = true; - this.cbShowsHTML.Location = new System.Drawing.Point(8, 49); - this.cbShowsHTML.Name = "cbShowsHTML"; - this.cbShowsHTML.Size = new System.Drawing.Size(56, 17); - this.cbShowsHTML.TabIndex = 6; - this.cbShowsHTML.Text = "HTML"; - this.cbShowsHTML.UseVisualStyleBackColor = true; - this.cbShowsHTML.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.colShowStatus.Text = "Show Status"; + this.colShowStatus.Width = 297; // - // txtShowsHTMLTo + // colColor // - this.txtShowsHTMLTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtShowsHTMLTo.Location = new System.Drawing.Point(64, 47); - this.txtShowsHTMLTo.Name = "txtShowsHTMLTo"; - this.txtShowsHTMLTo.Size = new System.Drawing.Size(343, 20); - this.txtShowsHTMLTo.TabIndex = 7; + this.colColor.Text = "Color"; + this.colColor.Width = 92; // - // bnBrowseShowsTXT + // tbuTorrentNZB // - this.bnBrowseShowsTXT.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseShowsTXT.Location = new System.Drawing.Point(413, 21); - this.bnBrowseShowsTXT.Name = "bnBrowseShowsTXT"; - this.bnBrowseShowsTXT.Size = new System.Drawing.Size(75, 23); - this.bnBrowseShowsTXT.TabIndex = 5; - this.bnBrowseShowsTXT.Text = "Browse..."; - this.bnBrowseShowsTXT.UseVisualStyleBackColor = true; - this.bnBrowseShowsTXT.Click += new System.EventHandler(this.bnBrowseShowsTXT_Click); + this.tbuTorrentNZB.Controls.Add(this.qBitTorrent); + this.tbuTorrentNZB.Controls.Add(this.groupBox1); + this.tbuTorrentNZB.Controls.Add(this.groupBox6); + this.tbuTorrentNZB.Location = new System.Drawing.Point(4, 40); + this.tbuTorrentNZB.Name = "tbuTorrentNZB"; + this.tbuTorrentNZB.Padding = new System.Windows.Forms.Padding(3); + this.tbuTorrentNZB.Size = new System.Drawing.Size(529, 426); + this.tbuTorrentNZB.TabIndex = 4; + this.tbuTorrentNZB.Text = "Torrents / NZB"; + this.tbuTorrentNZB.UseVisualStyleBackColor = true; // - // cbShowsTXT + // qBitTorrent // - this.cbShowsTXT.AutoSize = true; - this.cbShowsTXT.Location = new System.Drawing.Point(8, 25); - this.cbShowsTXT.Name = "cbShowsTXT"; - this.cbShowsTXT.Size = new System.Drawing.Size(47, 17); - this.cbShowsTXT.TabIndex = 3; - this.cbShowsTXT.Text = "TXT"; - this.cbShowsTXT.UseVisualStyleBackColor = true; - this.cbShowsTXT.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.qBitTorrent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.qBitTorrent.Controls.Add(this.tbqBitTorrentHost); + this.qBitTorrent.Controls.Add(this.tbqBitTorrentPort); + this.qBitTorrent.Controls.Add(this.label41); + this.qBitTorrent.Controls.Add(this.label42); + this.qBitTorrent.Location = new System.Drawing.Point(6, 179); + this.qBitTorrent.Name = "qBitTorrent"; + this.qBitTorrent.Size = new System.Drawing.Size(520, 81); + this.qBitTorrent.TabIndex = 7; + this.qBitTorrent.TabStop = false; + this.qBitTorrent.Text = "qBitTorrent"; // - // txtShowsTXTTo + // tbqBitTorrentHost // - this.txtShowsTXTTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.tbqBitTorrentHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtShowsTXTTo.Location = new System.Drawing.Point(64, 23); - this.txtShowsTXTTo.Name = "txtShowsTXTTo"; - this.txtShowsTXTTo.Size = new System.Drawing.Size(342, 20); - this.txtShowsTXTTo.TabIndex = 4; + this.tbqBitTorrentHost.Location = new System.Drawing.Point(75, 19); + this.tbqBitTorrentHost.Name = "tbqBitTorrentHost"; + this.tbqBitTorrentHost.Size = new System.Drawing.Size(439, 20); + this.tbqBitTorrentHost.TabIndex = 1; // - // groupBox5 + // tbqBitTorrentPort // - this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.tbqBitTorrentPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox5.Controls.Add(this.bnBrowseFOXML); - this.groupBox5.Controls.Add(this.cbFOXML); - this.groupBox5.Controls.Add(this.txtFOXML); - this.groupBox5.Location = new System.Drawing.Point(6, 367); - this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(497, 55); - this.groupBox5.TabIndex = 3; - this.groupBox5.TabStop = false; - this.groupBox5.Text = "Finding and Organising"; + this.tbqBitTorrentPort.Location = new System.Drawing.Point(75, 48); + this.tbqBitTorrentPort.Name = "tbqBitTorrentPort"; + this.tbqBitTorrentPort.Size = new System.Drawing.Size(439, 20); + this.tbqBitTorrentPort.TabIndex = 4; // - // bnBrowseFOXML + // label41 // - this.bnBrowseFOXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseFOXML.Location = new System.Drawing.Point(413, 19); - this.bnBrowseFOXML.Name = "bnBrowseFOXML"; - this.bnBrowseFOXML.Size = new System.Drawing.Size(75, 23); - this.bnBrowseFOXML.TabIndex = 2; - this.bnBrowseFOXML.Text = "Browse..."; - this.bnBrowseFOXML.UseVisualStyleBackColor = true; - this.bnBrowseFOXML.Click += new System.EventHandler(this.bnBrowseFOXML_Click); + this.label41.AutoSize = true; + this.label41.Location = new System.Drawing.Point(11, 51); + this.label41.Name = "label41"; + this.label41.Size = new System.Drawing.Size(29, 13); + this.label41.TabIndex = 3; + this.label41.Text = "Port:"; // - // cbFOXML + // label42 // - this.cbFOXML.AutoSize = true; - this.cbFOXML.Location = new System.Drawing.Point(8, 23); - this.cbFOXML.Name = "cbFOXML"; - this.cbFOXML.Size = new System.Drawing.Size(48, 17); - this.cbFOXML.TabIndex = 0; - this.cbFOXML.Text = "XML"; - this.cbFOXML.UseVisualStyleBackColor = true; - this.cbFOXML.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.label42.AutoSize = true; + this.label42.Location = new System.Drawing.Point(11, 22); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(32, 13); + this.label42.TabIndex = 0; + this.label42.Text = "Host:"; // - // txtFOXML + // groupBox1 // - this.txtFOXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtFOXML.Location = new System.Drawing.Point(64, 21); - this.txtFOXML.Name = "txtFOXML"; - this.txtFOXML.Size = new System.Drawing.Size(343, 20); - this.txtFOXML.TabIndex = 1; + this.groupBox1.Controls.Add(this.txtSABHostPort); + this.groupBox1.Controls.Add(this.txtSABAPIKey); + this.groupBox1.Controls.Add(this.label8); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Location = new System.Drawing.Point(6, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(520, 81); + this.groupBox1.TabIndex = 6; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "SABnzbd"; // - // groupBox4 + // txtSABHostPort // - this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtSABHostPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox4.Controls.Add(this.bnBrowseRenamingXML); - this.groupBox4.Controls.Add(this.cbRenamingXML); - this.groupBox4.Controls.Add(this.txtRenamingXML); - this.groupBox4.Location = new System.Drawing.Point(6, 305); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(497, 57); - this.groupBox4.TabIndex = 2; - this.groupBox4.TabStop = false; - this.groupBox4.Text = "Renaming"; + this.txtSABHostPort.Location = new System.Drawing.Point(75, 19); + this.txtSABHostPort.Name = "txtSABHostPort"; + this.txtSABHostPort.Size = new System.Drawing.Size(439, 20); + this.txtSABHostPort.TabIndex = 1; // - // bnBrowseRenamingXML + // txtSABAPIKey // - this.bnBrowseRenamingXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseRenamingXML.Location = new System.Drawing.Point(413, 19); - this.bnBrowseRenamingXML.Name = "bnBrowseRenamingXML"; - this.bnBrowseRenamingXML.Size = new System.Drawing.Size(75, 23); - this.bnBrowseRenamingXML.TabIndex = 2; - this.bnBrowseRenamingXML.Text = "Browse..."; - this.bnBrowseRenamingXML.UseVisualStyleBackColor = true; - this.bnBrowseRenamingXML.Click += new System.EventHandler(this.bnBrowseRenamingXML_Click); + this.txtSABAPIKey.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSABAPIKey.Location = new System.Drawing.Point(75, 48); + this.txtSABAPIKey.Name = "txtSABAPIKey"; + this.txtSABAPIKey.Size = new System.Drawing.Size(439, 20); + this.txtSABAPIKey.TabIndex = 4; // - // cbRenamingXML + // label8 // - this.cbRenamingXML.AutoSize = true; - this.cbRenamingXML.Location = new System.Drawing.Point(8, 23); - this.cbRenamingXML.Name = "cbRenamingXML"; - this.cbRenamingXML.Size = new System.Drawing.Size(48, 17); - this.cbRenamingXML.TabIndex = 0; - this.cbRenamingXML.Text = "XML"; - this.cbRenamingXML.UseVisualStyleBackColor = true; - this.cbRenamingXML.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(11, 51); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(48, 13); + this.label8.TabIndex = 3; + this.label8.Text = "API Key:"; // - // txtRenamingXML + // label9 // - this.txtRenamingXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtRenamingXML.Location = new System.Drawing.Point(64, 21); - this.txtRenamingXML.Name = "txtRenamingXML"; - this.txtRenamingXML.Size = new System.Drawing.Size(343, 20); - this.txtRenamingXML.TabIndex = 1; + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(11, 22); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(51, 13); + this.label9.TabIndex = 0; + this.label9.Text = "Host:Port"; // - // groupBox3 + // groupBox6 // - this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox3.Controls.Add(this.bnBrowseMissingCSV); - this.groupBox3.Controls.Add(this.bnBrowseMissingXML); - this.groupBox3.Controls.Add(this.txtMissingCSV); - this.groupBox3.Controls.Add(this.cbMissingXML); - this.groupBox3.Controls.Add(this.cbMissingCSV); - this.groupBox3.Controls.Add(this.txtMissingXML); - this.groupBox3.Location = new System.Drawing.Point(6, 147); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(497, 79); - this.groupBox3.TabIndex = 1; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Missing"; + this.groupBox6.Controls.Add(this.bnUTBrowseResumeDat); + this.groupBox6.Controls.Add(this.txtUTResumeDatPath); + this.groupBox6.Controls.Add(this.bnRSSBrowseuTorrent); + this.groupBox6.Controls.Add(this.label27); + this.groupBox6.Controls.Add(this.label26); + this.groupBox6.Controls.Add(this.txtRSSuTorrentPath); + this.groupBox6.Location = new System.Drawing.Point(6, 93); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(520, 80); + this.groupBox6.TabIndex = 5; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "µTorrent"; // - // bnBrowseMissingCSV + // bnUTBrowseResumeDat // - this.bnBrowseMissingCSV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseMissingCSV.Location = new System.Drawing.Point(413, 47); - this.bnBrowseMissingCSV.Name = "bnBrowseMissingCSV"; - this.bnBrowseMissingCSV.Size = new System.Drawing.Size(75, 23); - this.bnBrowseMissingCSV.TabIndex = 2; - this.bnBrowseMissingCSV.Text = "Browse..."; - this.bnBrowseMissingCSV.UseVisualStyleBackColor = true; - this.bnBrowseMissingCSV.Click += new System.EventHandler(this.bnBrowseMissingCSV_Click); + this.bnUTBrowseResumeDat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnUTBrowseResumeDat.Location = new System.Drawing.Point(439, 46); + this.bnUTBrowseResumeDat.Name = "bnUTBrowseResumeDat"; + this.bnUTBrowseResumeDat.Size = new System.Drawing.Size(75, 23); + this.bnUTBrowseResumeDat.TabIndex = 5; + this.bnUTBrowseResumeDat.Text = "Bro&wse..."; + this.bnUTBrowseResumeDat.UseVisualStyleBackColor = true; + this.bnUTBrowseResumeDat.Click += new System.EventHandler(this.bnUTBrowseResumeDat_Click); // - // bnBrowseMissingXML + // txtUTResumeDatPath // - this.bnBrowseMissingXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnBrowseMissingXML.Location = new System.Drawing.Point(414, 19); - this.bnBrowseMissingXML.Name = "bnBrowseMissingXML"; - this.bnBrowseMissingXML.Size = new System.Drawing.Size(75, 23); - this.bnBrowseMissingXML.TabIndex = 5; - this.bnBrowseMissingXML.Text = "Browse..."; - this.bnBrowseMissingXML.UseVisualStyleBackColor = true; - this.bnBrowseMissingXML.Click += new System.EventHandler(this.bnBrowseMissingXML_Click); + this.txtUTResumeDatPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtUTResumeDatPath.Location = new System.Drawing.Point(75, 48); + this.txtUTResumeDatPath.Name = "txtUTResumeDatPath"; + this.txtUTResumeDatPath.Size = new System.Drawing.Size(358, 20); + this.txtUTResumeDatPath.TabIndex = 4; // - // txtMissingCSV + // bnRSSBrowseuTorrent // - this.txtMissingCSV.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtMissingCSV.Location = new System.Drawing.Point(64, 48); - this.txtMissingCSV.Name = "txtMissingCSV"; - this.txtMissingCSV.Size = new System.Drawing.Size(343, 20); - this.txtMissingCSV.TabIndex = 1; + this.bnRSSBrowseuTorrent.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnRSSBrowseuTorrent.Location = new System.Drawing.Point(439, 16); + this.bnRSSBrowseuTorrent.Name = "bnRSSBrowseuTorrent"; + this.bnRSSBrowseuTorrent.Size = new System.Drawing.Size(75, 23); + this.bnRSSBrowseuTorrent.TabIndex = 2; + this.bnRSSBrowseuTorrent.Text = "&Browse..."; + this.bnRSSBrowseuTorrent.UseVisualStyleBackColor = true; + this.bnRSSBrowseuTorrent.Click += new System.EventHandler(this.bnRSSBrowseuTorrent_Click); // - // cbMissingXML + // label27 // - this.cbMissingXML.AutoSize = true; - this.cbMissingXML.Location = new System.Drawing.Point(8, 23); - this.cbMissingXML.Name = "cbMissingXML"; - this.cbMissingXML.Size = new System.Drawing.Size(48, 17); - this.cbMissingXML.TabIndex = 3; - this.cbMissingXML.Text = "XML"; - this.cbMissingXML.UseVisualStyleBackColor = true; - this.cbMissingXML.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(7, 22); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(62, 13); + this.label27.TabIndex = 0; + this.label27.Text = "A&pplication:"; // - // cbMissingCSV + // label26 // - this.cbMissingCSV.AutoSize = true; - this.cbMissingCSV.Location = new System.Drawing.Point(9, 48); - this.cbMissingCSV.Name = "cbMissingCSV"; - this.cbMissingCSV.Size = new System.Drawing.Size(47, 17); - this.cbMissingCSV.TabIndex = 0; - this.cbMissingCSV.Text = "CSV"; - this.cbMissingCSV.UseVisualStyleBackColor = true; - this.cbMissingCSV.CheckedChanged += new System.EventHandler(this.EnableDisable); + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(7, 51); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(62, 13); + this.label26.TabIndex = 3; + this.label26.Text = "resume.&dat:"; // - // txtMissingXML + // txtRSSuTorrentPath // - this.txtMissingXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtRSSuTorrentPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtMissingXML.Location = new System.Drawing.Point(64, 21); - this.txtMissingXML.Name = "txtMissingXML"; - this.txtMissingXML.Size = new System.Drawing.Size(343, 20); - this.txtMissingXML.TabIndex = 4; + this.txtRSSuTorrentPath.Location = new System.Drawing.Point(75, 19); + this.txtRSSuTorrentPath.Name = "txtRSSuTorrentPath"; + this.txtRSSuTorrentPath.Size = new System.Drawing.Size(358, 20); + this.txtRSSuTorrentPath.TabIndex = 1; // - // tpScanOptions + // tbSearchFolders // - this.tpScanOptions.Controls.Add(this.cbCheckqBitTorrent); - this.tpScanOptions.Controls.Add(this.chkAutoMergeLibraryEpisodes); - this.tpScanOptions.Controls.Add(this.chkAutoMergeDownloadEpisodes); - this.tpScanOptions.Controls.Add(this.chkPreventMove); - this.tpScanOptions.Controls.Add(this.label40); - this.tpScanOptions.Controls.Add(this.cbxUpdateAirDate); - this.tpScanOptions.Controls.Add(this.label33); - this.tpScanOptions.Controls.Add(this.cbAutoCreateFolders); - this.tpScanOptions.Controls.Add(this.label28); - this.tpScanOptions.Controls.Add(this.cbSearchRSS); - this.tpScanOptions.Controls.Add(this.cbRenameCheck); - this.tpScanOptions.Controls.Add(this.cbMissing); - this.tpScanOptions.Controls.Add(this.cbLeaveOriginals); - this.tpScanOptions.Controls.Add(this.cbCheckSABnzbd); - this.tpScanOptions.Controls.Add(this.cbCheckuTorrent); - this.tpScanOptions.Controls.Add(this.cbSearchLocally); - this.tpScanOptions.Location = new System.Drawing.Point(4, 40); - this.tpScanOptions.Name = "tpScanOptions"; - this.tpScanOptions.Padding = new System.Windows.Forms.Padding(3); - this.tpScanOptions.Size = new System.Drawing.Size(509, 489); - this.tpScanOptions.TabIndex = 6; - this.tpScanOptions.Text = "Scan Options"; - this.tpScanOptions.UseVisualStyleBackColor = true; + this.tbSearchFolders.Controls.Add(this.label1); + this.tbSearchFolders.Controls.Add(this.domainUpDown1); + this.tbSearchFolders.Controls.Add(this.chkScheduledScan); + this.tbSearchFolders.Controls.Add(this.chkScanOnStartup); + this.tbSearchFolders.Controls.Add(this.lblScanAction); + this.tbSearchFolders.Controls.Add(this.rdoQuickScan); + this.tbSearchFolders.Controls.Add(this.rdoRecentScan); + this.tbSearchFolders.Controls.Add(this.rdoFullScan); + this.tbSearchFolders.Controls.Add(this.cbMonitorFolder); + this.tbSearchFolders.Controls.Add(this.bnOpenSearchFolder); + this.tbSearchFolders.Controls.Add(this.bnRemoveSearchFolder); + this.tbSearchFolders.Controls.Add(this.bnAddSearchFolder); + this.tbSearchFolders.Controls.Add(this.lbSearchFolders); + this.tbSearchFolders.Controls.Add(this.label23); + this.tbSearchFolders.Location = new System.Drawing.Point(4, 40); + this.tbSearchFolders.Name = "tbSearchFolders"; + this.tbSearchFolders.Size = new System.Drawing.Size(529, 426); + this.tbSearchFolders.TabIndex = 3; + this.tbSearchFolders.Text = "Search Folders"; + this.tbSearchFolders.UseVisualStyleBackColor = true; // - // cbCheckqBitTorrent + // label1 // - this.cbCheckqBitTorrent.AutoSize = true; - this.cbCheckqBitTorrent.Location = new System.Drawing.Point(40, 190); - this.cbCheckqBitTorrent.Name = "cbCheckqBitTorrent"; - this.cbCheckqBitTorrent.Size = new System.Drawing.Size(145, 17); - this.cbCheckqBitTorrent.TabIndex = 16; - this.cbCheckqBitTorrent.Text = "Check &qBitTorrent queue"; - this.cbCheckqBitTorrent.UseVisualStyleBackColor = true; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(178, 89); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(33, 13); + this.label1.TabIndex = 26; + this.label1.Text = "hours"; // - // chkAutoMergeLibraryEpisodes + // domainUpDown1 // - this.chkAutoMergeLibraryEpisodes.AutoSize = true; - this.chkAutoMergeLibraryEpisodes.Location = new System.Drawing.Point(9, 351); - this.chkAutoMergeLibraryEpisodes.Name = "chkAutoMergeLibraryEpisodes"; - this.chkAutoMergeLibraryEpisodes.Size = new System.Drawing.Size(306, 17); - this.chkAutoMergeLibraryEpisodes.TabIndex = 15; - this.chkAutoMergeLibraryEpisodes.Text = "Automatically create merge rules for merged library episodes"; - this.chkAutoMergeLibraryEpisodes.UseVisualStyleBackColor = true; + this.domainUpDown1.Items.Add("1"); + this.domainUpDown1.Items.Add("2"); + this.domainUpDown1.Items.Add("3"); + this.domainUpDown1.Items.Add("4"); + this.domainUpDown1.Items.Add("5"); + this.domainUpDown1.Items.Add("6"); + this.domainUpDown1.Items.Add("8"); + this.domainUpDown1.Items.Add("12"); + this.domainUpDown1.Items.Add("24"); + this.domainUpDown1.Items.Add("48"); + this.domainUpDown1.Items.Add("96"); + this.domainUpDown1.Location = new System.Drawing.Point(134, 87); + this.domainUpDown1.Name = "domainUpDown1"; + this.domainUpDown1.Size = new System.Drawing.Size(40, 20); + this.domainUpDown1.TabIndex = 25; + this.domainUpDown1.Text = "1"; + this.domainUpDown1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.domainUpDown1_KeyDown); // - // chkAutoMergeDownloadEpisodes + // lblScanAction // - this.chkAutoMergeDownloadEpisodes.AutoSize = true; - this.chkAutoMergeDownloadEpisodes.Location = new System.Drawing.Point(9, 329); - this.chkAutoMergeDownloadEpisodes.Name = "chkAutoMergeDownloadEpisodes"; - this.chkAutoMergeDownloadEpisodes.Size = new System.Drawing.Size(337, 17); - this.chkAutoMergeDownloadEpisodes.TabIndex = 13; - this.chkAutoMergeDownloadEpisodes.Text = "Automatically create merge rules for merged downloaded episodes"; - this.chkAutoMergeDownloadEpisodes.UseVisualStyleBackColor = true; + this.lblScanAction.AutoSize = true; + this.lblScanAction.Location = new System.Drawing.Point(2, 12); + this.lblScanAction.Name = "lblScanAction"; + this.lblScanAction.Size = new System.Drawing.Size(59, 13); + this.lblScanAction.TabIndex = 22; + this.lblScanAction.Text = "&Scan Type"; // - // chkPreventMove + // rdoQuickScan // - this.chkPreventMove.AutoSize = true; - this.chkPreventMove.Location = new System.Drawing.Point(40, 56); - this.chkPreventMove.Name = "chkPreventMove"; - this.chkPreventMove.Size = new System.Drawing.Size(188, 17); - this.chkPreventMove.TabIndex = 12; - this.chkPreventMove.Text = "Pre&vent move of files (just rename)"; - this.chkPreventMove.UseVisualStyleBackColor = true; + this.rdoQuickScan.AutoSize = true; + this.rdoQuickScan.Location = new System.Drawing.Point(134, 28); + this.rdoQuickScan.Name = "rdoQuickScan"; + this.rdoQuickScan.Size = new System.Drawing.Size(53, 17); + this.rdoQuickScan.TabIndex = 20; + this.rdoQuickScan.TabStop = true; + this.rdoQuickScan.Text = "&Quick"; + this.rdoQuickScan.UseVisualStyleBackColor = true; // - // label40 + // rdoRecentScan // - this.label40.AutoSize = true; - this.label40.Location = new System.Drawing.Point(6, 290); - this.label40.Name = "label40"; - this.label40.Size = new System.Drawing.Size(94, 13); - this.label40.TabIndex = 11; - this.label40.Text = "Additional Actions:"; + this.rdoRecentScan.AutoSize = true; + this.rdoRecentScan.Location = new System.Drawing.Point(68, 28); + this.rdoRecentScan.Name = "rdoRecentScan"; + this.rdoRecentScan.Size = new System.Drawing.Size(60, 17); + this.rdoRecentScan.TabIndex = 19; + this.rdoRecentScan.TabStop = true; + this.rdoRecentScan.Text = "&Recent"; + this.rdoRecentScan.UseVisualStyleBackColor = true; // - // cbxUpdateAirDate + // rdoFullScan // - this.cbxUpdateAirDate.AutoSize = true; - this.cbxUpdateAirDate.Location = new System.Drawing.Point(9, 306); - this.cbxUpdateAirDate.Name = "cbxUpdateAirDate"; - this.cbxUpdateAirDate.Size = new System.Drawing.Size(197, 17); - this.cbxUpdateAirDate.TabIndex = 10; - this.cbxUpdateAirDate.Text = "Update files and folders with air date"; - this.cbxUpdateAirDate.UseVisualStyleBackColor = true; + this.rdoFullScan.AutoSize = true; + this.rdoFullScan.Location = new System.Drawing.Point(21, 28); + this.rdoFullScan.Name = "rdoFullScan"; + this.rdoFullScan.Size = new System.Drawing.Size(41, 17); + this.rdoFullScan.TabIndex = 18; + this.rdoFullScan.TabStop = true; + this.rdoFullScan.Text = "&Full"; + this.rdoFullScan.UseVisualStyleBackColor = true; // - // label33 + // bnOpenSearchFolder // - this.label33.AutoSize = true; - this.label33.Location = new System.Drawing.Point(6, 243); - this.label33.Name = "label33"; - this.label33.Size = new System.Drawing.Size(80, 13); - this.label33.TabIndex = 9; - this.label33.Text = "Folder creation:"; + this.bnOpenSearchFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bnOpenSearchFolder.Location = new System.Drawing.Point(165, 395); + this.bnOpenSearchFolder.Name = "bnOpenSearchFolder"; + this.bnOpenSearchFolder.Size = new System.Drawing.Size(75, 23); + this.bnOpenSearchFolder.TabIndex = 4; + this.bnOpenSearchFolder.Text = "&Open"; + this.bnOpenSearchFolder.UseVisualStyleBackColor = true; + this.bnOpenSearchFolder.Click += new System.EventHandler(this.bnOpenSearchFolder_Click); // - // cbAutoCreateFolders + // bnRemoveSearchFolder // - this.cbAutoCreateFolders.AutoSize = true; - this.cbAutoCreateFolders.Location = new System.Drawing.Point(9, 259); - this.cbAutoCreateFolders.Name = "cbAutoCreateFolders"; - this.cbAutoCreateFolders.Size = new System.Drawing.Size(192, 17); - this.cbAutoCreateFolders.TabIndex = 8; - this.cbAutoCreateFolders.Text = "&Automatically create missing folders"; - this.cbAutoCreateFolders.UseVisualStyleBackColor = true; + this.bnRemoveSearchFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bnRemoveSearchFolder.Location = new System.Drawing.Point(84, 395); + this.bnRemoveSearchFolder.Name = "bnRemoveSearchFolder"; + this.bnRemoveSearchFolder.Size = new System.Drawing.Size(75, 23); + this.bnRemoveSearchFolder.TabIndex = 3; + this.bnRemoveSearchFolder.Text = "&Remove"; + this.bnRemoveSearchFolder.UseVisualStyleBackColor = true; + this.bnRemoveSearchFolder.Click += new System.EventHandler(this.bnRemoveSearchFolder_Click); // - // label28 + // bnAddSearchFolder // - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(6, 13); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(141, 13); - this.label28.TabIndex = 0; - this.label28.Text = "\"Scan\" checks and actions:"; + this.bnAddSearchFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bnAddSearchFolder.Location = new System.Drawing.Point(3, 395); + this.bnAddSearchFolder.Name = "bnAddSearchFolder"; + this.bnAddSearchFolder.Size = new System.Drawing.Size(75, 23); + this.bnAddSearchFolder.TabIndex = 2; + this.bnAddSearchFolder.Text = "&Add"; + this.bnAddSearchFolder.UseVisualStyleBackColor = true; + this.bnAddSearchFolder.Click += new System.EventHandler(this.bnAddSearchFolder_Click); // - // cbSearchRSS + // lbSearchFolders // - this.cbSearchRSS.AutoSize = true; - this.cbSearchRSS.Location = new System.Drawing.Point(40, 211); - this.cbSearchRSS.Name = "cbSearchRSS"; - this.cbSearchRSS.Size = new System.Drawing.Size(158, 17); - this.cbSearchRSS.TabIndex = 7; - this.cbSearchRSS.Text = "&Search RSS for missing files"; - this.cbSearchRSS.UseVisualStyleBackColor = true; + this.lbSearchFolders.AllowDrop = true; + this.lbSearchFolders.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbSearchFolders.FormattingEnabled = true; + this.lbSearchFolders.Location = new System.Drawing.Point(3, 153); + this.lbSearchFolders.Name = "lbSearchFolders"; + this.lbSearchFolders.ScrollAlwaysVisible = true; + this.lbSearchFolders.Size = new System.Drawing.Size(523, 225); + this.lbSearchFolders.TabIndex = 1; + this.lbSearchFolders.DragDrop += new System.Windows.Forms.DragEventHandler(this.lbSearchFolders_DragDrop); + this.lbSearchFolders.DragOver += new System.Windows.Forms.DragEventHandler(this.lbSearchFolders_DragOver); + this.lbSearchFolders.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lbSearchFolders_KeyDown); // - // cbRenameCheck + // label23 // - this.cbRenameCheck.AutoSize = true; - this.cbRenameCheck.Checked = true; - this.cbRenameCheck.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbRenameCheck.Location = new System.Drawing.Point(20, 33); - this.cbRenameCheck.Name = "cbRenameCheck"; - this.cbRenameCheck.Size = new System.Drawing.Size(100, 17); - this.cbRenameCheck.TabIndex = 1; - this.cbRenameCheck.Text = "&Rename Check"; - this.cbRenameCheck.UseVisualStyleBackColor = true; + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(5, 131); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(78, 13); + this.label23.TabIndex = 0; + this.label23.Text = "&Search Folders"; // - // cbMissing + // tbMediaCenter // - this.cbMissing.AutoSize = true; - this.cbMissing.Checked = true; - this.cbMissing.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbMissing.Location = new System.Drawing.Point(20, 79); - this.cbMissing.Name = "cbMissing"; - this.cbMissing.Size = new System.Drawing.Size(95, 17); - this.cbMissing.TabIndex = 2; - this.cbMissing.Text = "&Missing Check"; - this.cbMissing.UseVisualStyleBackColor = true; - this.cbMissing.CheckedChanged += new System.EventHandler(this.cbMissing_CheckedChanged); + this.tbMediaCenter.Controls.Add(this.cbWDLiveEpisodeFiles); + this.tbMediaCenter.Controls.Add(this.cbNFOEpisodes); + this.tbMediaCenter.Controls.Add(this.panel1); + this.tbMediaCenter.Controls.Add(this.cbKODIImages); + this.tbMediaCenter.Controls.Add(this.bnMCPresets); + this.tbMediaCenter.Controls.Add(this.cbShrinkLarge); + this.tbMediaCenter.Controls.Add(this.cbEpThumbJpg); + this.tbMediaCenter.Controls.Add(this.label29); + this.tbMediaCenter.Controls.Add(this.label24); + this.tbMediaCenter.Controls.Add(this.label18); + this.tbMediaCenter.Controls.Add(this.label12); + this.tbMediaCenter.Controls.Add(this.cbMetaSubfolder); + this.tbMediaCenter.Controls.Add(this.cbMeta); + this.tbMediaCenter.Controls.Add(this.cbEpTBNs); + this.tbMediaCenter.Controls.Add(this.cbSeriesJpg); + this.tbMediaCenter.Controls.Add(this.cbXMLFiles); + this.tbMediaCenter.Controls.Add(this.cbNFOShows); + this.tbMediaCenter.Controls.Add(this.cbFantArtJpg); + this.tbMediaCenter.Controls.Add(this.cbFolderJpg); + this.tbMediaCenter.Location = new System.Drawing.Point(4, 40); + this.tbMediaCenter.Name = "tbMediaCenter"; + this.tbMediaCenter.Padding = new System.Windows.Forms.Padding(3); + this.tbMediaCenter.Size = new System.Drawing.Size(529, 426); + this.tbMediaCenter.TabIndex = 8; + this.tbMediaCenter.Text = "Media Centres"; + this.tbMediaCenter.UseVisualStyleBackColor = true; // - // cbLeaveOriginals + // cbWDLiveEpisodeFiles // - this.cbLeaveOriginals.AutoSize = true; - this.cbLeaveOriginals.Location = new System.Drawing.Point(60, 125); - this.cbLeaveOriginals.Name = "cbLeaveOriginals"; - this.cbLeaveOriginals.Size = new System.Drawing.Size(129, 17); - this.cbLeaveOriginals.TabIndex = 4; - this.cbLeaveOriginals.Text = "&Copy files, don\'t move"; - this.cbLeaveOriginals.UseVisualStyleBackColor = true; + this.cbWDLiveEpisodeFiles.AutoSize = true; + this.cbWDLiveEpisodeFiles.Location = new System.Drawing.Point(38, 399); + this.cbWDLiveEpisodeFiles.Name = "cbWDLiveEpisodeFiles"; + this.cbWDLiveEpisodeFiles.Size = new System.Drawing.Size(200, 17); + this.cbWDLiveEpisodeFiles.TabIndex = 25; + this.cbWDLiveEpisodeFiles.Text = "WD TV Live Hub Episode Files (.xml)"; + this.cbWDLiveEpisodeFiles.UseVisualStyleBackColor = true; // - // cbCheckSABnzbd + // cbNFOEpisodes // - this.cbCheckSABnzbd.AutoSize = true; - this.cbCheckSABnzbd.Location = new System.Drawing.Point(40, 171); - this.cbCheckSABnzbd.Name = "cbCheckSABnzbd"; - this.cbCheckSABnzbd.Size = new System.Drawing.Size(137, 17); - this.cbCheckSABnzbd.TabIndex = 6; - this.cbCheckSABnzbd.Text = "Check SA&Bnzbd queue"; - this.cbCheckSABnzbd.UseVisualStyleBackColor = true; - this.cbCheckSABnzbd.CheckedChanged += new System.EventHandler(this.cbSearchLocally_CheckedChanged); + this.cbNFOEpisodes.AutoSize = true; + this.cbNFOEpisodes.Location = new System.Drawing.Point(38, 73); + this.cbNFOEpisodes.Name = "cbNFOEpisodes"; + this.cbNFOEpisodes.Size = new System.Drawing.Size(129, 17); + this.cbNFOEpisodes.TabIndex = 24; + this.cbNFOEpisodes.Text = "&NFO files for episodes"; + this.cbNFOEpisodes.UseVisualStyleBackColor = true; // - // cbCheckuTorrent + // panel1 // - this.cbCheckuTorrent.AutoSize = true; - this.cbCheckuTorrent.Location = new System.Drawing.Point(40, 148); - this.cbCheckuTorrent.Name = "cbCheckuTorrent"; - this.cbCheckuTorrent.Size = new System.Drawing.Size(133, 17); - this.cbCheckuTorrent.TabIndex = 5; - this.cbCheckuTorrent.Text = "C&heck µTorrent queue"; - this.cbCheckuTorrent.UseVisualStyleBackColor = true; - this.cbCheckuTorrent.CheckedChanged += new System.EventHandler(this.cbSearchLocally_CheckedChanged); + this.panel1.Controls.Add(this.rbFolderBanner); + this.panel1.Controls.Add(this.rbFolderPoster); + this.panel1.Controls.Add(this.rbFolderFanArt); + this.panel1.Controls.Add(this.rbFolderSeasonPoster); + this.panel1.Location = new System.Drawing.Point(59, 323); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(280, 24); + this.panel1.TabIndex = 22; // - // cbSearchLocally + // rbFolderBanner // - this.cbSearchLocally.AutoSize = true; - this.cbSearchLocally.Checked = true; - this.cbSearchLocally.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbSearchLocally.Location = new System.Drawing.Point(40, 102); - this.cbSearchLocally.Name = "cbSearchLocally"; - this.cbSearchLocally.Size = new System.Drawing.Size(218, 17); - this.cbSearchLocally.TabIndex = 3; - this.cbSearchLocally.Text = "&Look in \"Search Folders\" for missing files"; - this.cbSearchLocally.UseVisualStyleBackColor = true; - this.cbSearchLocally.CheckedChanged += new System.EventHandler(this.cbSearchLocally_CheckedChanged); + this.rbFolderBanner.AutoSize = true; + this.rbFolderBanner.Location = new System.Drawing.Point(0, 7); + this.rbFolderBanner.Name = "rbFolderBanner"; + this.rbFolderBanner.Size = new System.Drawing.Size(59, 17); + this.rbFolderBanner.TabIndex = 12; + this.rbFolderBanner.TabStop = true; + this.rbFolderBanner.Text = "&Banner"; + this.rbFolderBanner.UseVisualStyleBackColor = true; + // + // rbFolderPoster + // + this.rbFolderPoster.AutoSize = true; + this.rbFolderPoster.Location = new System.Drawing.Point(60, 7); + this.rbFolderPoster.Name = "rbFolderPoster"; + this.rbFolderPoster.Size = new System.Drawing.Size(55, 17); + this.rbFolderPoster.TabIndex = 13; + this.rbFolderPoster.TabStop = true; + this.rbFolderPoster.Text = "&Poster"; + this.rbFolderPoster.UseVisualStyleBackColor = true; + // + // rbFolderFanArt + // + this.rbFolderFanArt.AutoSize = true; + this.rbFolderFanArt.Location = new System.Drawing.Point(121, 7); + this.rbFolderFanArt.Name = "rbFolderFanArt"; + this.rbFolderFanArt.Size = new System.Drawing.Size(59, 17); + this.rbFolderFanArt.TabIndex = 14; + this.rbFolderFanArt.TabStop = true; + this.rbFolderFanArt.Text = "Fan A&rt"; + this.rbFolderFanArt.UseVisualStyleBackColor = true; + // + // rbFolderSeasonPoster + // + this.rbFolderSeasonPoster.AutoSize = true; + this.rbFolderSeasonPoster.Location = new System.Drawing.Point(186, 7); + this.rbFolderSeasonPoster.Name = "rbFolderSeasonPoster"; + this.rbFolderSeasonPoster.Size = new System.Drawing.Size(94, 17); + this.rbFolderSeasonPoster.TabIndex = 16; + this.rbFolderSeasonPoster.TabStop = true; + this.rbFolderSeasonPoster.Text = "Seaso&n Poster"; + this.rbFolderSeasonPoster.UseVisualStyleBackColor = true; + // + // cbKODIImages + // + this.cbKODIImages.AutoSize = true; + this.cbKODIImages.Location = new System.Drawing.Point(38, 93); + this.cbKODIImages.Name = "cbKODIImages"; + this.cbKODIImages.Size = new System.Drawing.Size(271, 17); + this.cbKODIImages.TabIndex = 17; + this.cbKODIImages.Text = "Download XMBC &Images (fanart, poster, banner.jpg)"; + this.cbKODIImages.UseVisualStyleBackColor = true; + // + // bnMCPresets + // + this.bnMCPresets.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnMCPresets.Location = new System.Drawing.Point(448, 399); + this.bnMCPresets.Name = "bnMCPresets"; + this.bnMCPresets.Size = new System.Drawing.Size(75, 23); + this.bnMCPresets.TabIndex = 16; + this.bnMCPresets.Text = "Pre&sets..."; + this.bnMCPresets.UseVisualStyleBackColor = true; + this.bnMCPresets.Click += new System.EventHandler(this.bnMCPresets_Click); + // + // cbShrinkLarge + // + this.cbShrinkLarge.AutoSize = true; + this.cbShrinkLarge.Location = new System.Drawing.Point(38, 260); + this.cbShrinkLarge.Name = "cbShrinkLarge"; + this.cbShrinkLarge.Size = new System.Drawing.Size(300, 17); + this.cbShrinkLarge.TabIndex = 9; + this.cbShrinkLarge.Text = "S&hrink large series and episode images to 156 x 232 pixels"; + this.cbShrinkLarge.UseVisualStyleBackColor = true; + // + // cbEpThumbJpg + // + this.cbEpThumbJpg.AutoSize = true; + this.cbEpThumbJpg.Location = new System.Drawing.Point(38, 376); + this.cbEpThumbJpg.Name = "cbEpThumbJpg"; + this.cbEpThumbJpg.Size = new System.Drawing.Size(147, 17); + this.cbEpThumbJpg.TabIndex = 16; + this.cbEpThumbJpg.Text = "Episode Thumbnails (.&jpg)"; + this.cbEpThumbJpg.UseVisualStyleBackColor = true; + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Location = new System.Drawing.Point(17, 194); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(49, 13); + this.label29.TabIndex = 6; + this.label29.Text = "Mede8er"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(17, 289); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(44, 13); + this.label24.TabIndex = 10; + this.label24.Text = "General"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(17, 123); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(39, 13); + this.label18.TabIndex = 3; + this.label18.Text = "pyTivo"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(17, 15); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(33, 13); + this.label12.TabIndex = 0; + this.label12.Text = "KODI"; + // + // cbMetaSubfolder + // + this.cbMetaSubfolder.AutoSize = true; + this.cbMetaSubfolder.Location = new System.Drawing.Point(38, 165); + this.cbMetaSubfolder.Name = "cbMetaSubfolder"; + this.cbMetaSubfolder.Size = new System.Drawing.Size(187, 17); + this.cbMetaSubfolder.TabIndex = 5; + this.cbMetaSubfolder.Text = "Pl&ace Meta files in .meta subfolder"; + this.cbMetaSubfolder.UseVisualStyleBackColor = true; + // + // cbMeta + // + this.cbMeta.AutoSize = true; + this.cbMeta.Location = new System.Drawing.Point(38, 142); + this.cbMeta.Name = "cbMeta"; + this.cbMeta.Size = new System.Drawing.Size(154, 17); + this.cbMeta.TabIndex = 4; + this.cbMeta.Text = "&Meta files for episodes (.txt)"; + this.cbMeta.UseVisualStyleBackColor = true; + this.cbMeta.CheckedChanged += new System.EventHandler(this.cbMeta_CheckedChanged); + // + // cbEpTBNs + // + this.cbEpTBNs.AutoSize = true; + this.cbEpTBNs.Location = new System.Drawing.Point(38, 34); + this.cbEpTBNs.Name = "cbEpTBNs"; + this.cbEpTBNs.Size = new System.Drawing.Size(148, 17); + this.cbEpTBNs.TabIndex = 1; + this.cbEpTBNs.Text = "&Episode Thumbnails (.tbn)"; + this.cbEpTBNs.UseVisualStyleBackColor = true; + // + // cbSeriesJpg + // + this.cbSeriesJpg.AutoSize = true; + this.cbSeriesJpg.Location = new System.Drawing.Point(38, 214); + this.cbSeriesJpg.Name = "cbSeriesJpg"; + this.cbSeriesJpg.Size = new System.Drawing.Size(172, 17); + this.cbSeriesJpg.TabIndex = 7; + this.cbSeriesJpg.Text = "&Create series poster (series.jpg)"; + this.cbSeriesJpg.UseVisualStyleBackColor = true; + // + // cbXMLFiles + // + this.cbXMLFiles.AutoSize = true; + this.cbXMLFiles.Location = new System.Drawing.Point(38, 237); + this.cbXMLFiles.Name = "cbXMLFiles"; + this.cbXMLFiles.Size = new System.Drawing.Size(183, 17); + this.cbXMLFiles.TabIndex = 8; + this.cbXMLFiles.Text = "&XML files for shows and episodes"; + this.cbXMLFiles.UseVisualStyleBackColor = true; + // + // cbNFOShows + // + this.cbNFOShows.AutoSize = true; + this.cbNFOShows.Location = new System.Drawing.Point(38, 55); + this.cbNFOShows.Name = "cbNFOShows"; + this.cbNFOShows.Size = new System.Drawing.Size(117, 17); + this.cbNFOShows.TabIndex = 2; + this.cbNFOShows.Text = "&NFO files for shows"; + this.cbNFOShows.UseVisualStyleBackColor = true; + // + // cbFantArtJpg + // + this.cbFantArtJpg.AutoSize = true; + this.cbFantArtJpg.Location = new System.Drawing.Point(38, 353); + this.cbFantArtJpg.Name = "cbFantArtJpg"; + this.cbFantArtJpg.Size = new System.Drawing.Size(141, 17); + this.cbFantArtJpg.TabIndex = 15; + this.cbFantArtJpg.Text = "Fanar&t Image (fanart.jpg)"; + this.cbFantArtJpg.UseVisualStyleBackColor = true; + // + // cbFolderJpg + // + this.cbFolderJpg.AutoSize = true; + this.cbFolderJpg.Location = new System.Drawing.Point(38, 310); + this.cbFolderJpg.Name = "cbFolderJpg"; + this.cbFolderJpg.Size = new System.Drawing.Size(138, 17); + this.cbFolderJpg.TabIndex = 11; + this.cbFolderJpg.Text = "&Folder image (folder.jpg)"; + this.cbFolderJpg.UseVisualStyleBackColor = true; // // tbFolderDeleting // + this.tbFolderDeleting.Controls.Add(this.cbDeleteShowFromDisk); this.tbFolderDeleting.Controls.Add(this.cbCleanUpDownloadDir); this.tbFolderDeleting.Controls.Add(this.label32); this.tbFolderDeleting.Controls.Add(this.label30); @@ -1558,7 +1728,7 @@ private void InitializeComponent() this.tbFolderDeleting.Location = new System.Drawing.Point(4, 40); this.tbFolderDeleting.Name = "tbFolderDeleting"; this.tbFolderDeleting.Padding = new System.Windows.Forms.Padding(3); - this.tbFolderDeleting.Size = new System.Drawing.Size(509, 489); + this.tbFolderDeleting.Size = new System.Drawing.Size(529, 426); this.tbFolderDeleting.TabIndex = 9; this.tbFolderDeleting.Text = "Folder Deleting"; this.tbFolderDeleting.UseVisualStyleBackColor = true; @@ -1596,26 +1766,6 @@ private void InitializeComponent() this.txtEmptyMaxSize.Size = new System.Drawing.Size(55, 20); this.txtEmptyMaxSize.TabIndex = 8; // - // txtEmptyIgnoreWords - // - this.txtEmptyIgnoreWords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtEmptyIgnoreWords.Location = new System.Drawing.Point(95, 89); - this.txtEmptyIgnoreWords.Name = "txtEmptyIgnoreWords"; - this.txtEmptyIgnoreWords.Size = new System.Drawing.Size(408, 20); - this.txtEmptyIgnoreWords.TabIndex = 3; - this.toolTip1.SetToolTip(this.txtEmptyIgnoreWords, "For example \"sample\""); - // - // txtEmptyIgnoreExtensions - // - this.txtEmptyIgnoreExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtEmptyIgnoreExtensions.Location = new System.Drawing.Point(95, 139); - this.txtEmptyIgnoreExtensions.Name = "txtEmptyIgnoreExtensions"; - this.txtEmptyIgnoreExtensions.Size = new System.Drawing.Size(408, 20); - this.txtEmptyIgnoreExtensions.TabIndex = 5; - this.toolTip1.SetToolTip(this.txtEmptyIgnoreExtensions, "For example \".par2;.nzb;.nfo\""); - // // label31 // this.label31.AutoSize = true; @@ -1674,1064 +1824,1154 @@ private void InitializeComponent() this.cbDeleteEmpty.Text = "&Delete empty folders after moving files"; this.cbDeleteEmpty.UseVisualStyleBackColor = true; // - // tbMediaCenter - // - this.tbMediaCenter.Controls.Add(this.cbWDLiveEpisodeFiles); - this.tbMediaCenter.Controls.Add(this.cbNFOEpisodes); - this.tbMediaCenter.Controls.Add(this.panel1); - this.tbMediaCenter.Controls.Add(this.cbKODIImages); - this.tbMediaCenter.Controls.Add(this.bnMCPresets); - this.tbMediaCenter.Controls.Add(this.cbShrinkLarge); - this.tbMediaCenter.Controls.Add(this.cbEpThumbJpg); - this.tbMediaCenter.Controls.Add(this.label29); - this.tbMediaCenter.Controls.Add(this.label24); - this.tbMediaCenter.Controls.Add(this.label18); - this.tbMediaCenter.Controls.Add(this.label12); - this.tbMediaCenter.Controls.Add(this.cbMetaSubfolder); - this.tbMediaCenter.Controls.Add(this.cbMeta); - this.tbMediaCenter.Controls.Add(this.cbEpTBNs); - this.tbMediaCenter.Controls.Add(this.cbSeriesJpg); - this.tbMediaCenter.Controls.Add(this.cbXMLFiles); - this.tbMediaCenter.Controls.Add(this.cbNFOShows); - this.tbMediaCenter.Controls.Add(this.cbFantArtJpg); - this.tbMediaCenter.Controls.Add(this.cbFolderJpg); - this.tbMediaCenter.Location = new System.Drawing.Point(4, 40); - this.tbMediaCenter.Name = "tbMediaCenter"; - this.tbMediaCenter.Padding = new System.Windows.Forms.Padding(3); - this.tbMediaCenter.Size = new System.Drawing.Size(509, 489); - this.tbMediaCenter.TabIndex = 8; - this.tbMediaCenter.Text = "Media Centres"; - this.tbMediaCenter.UseVisualStyleBackColor = true; - // - // cbWDLiveEpisodeFiles - // - this.cbWDLiveEpisodeFiles.AutoSize = true; - this.cbWDLiveEpisodeFiles.Location = new System.Drawing.Point(38, 399); - this.cbWDLiveEpisodeFiles.Name = "cbWDLiveEpisodeFiles"; - this.cbWDLiveEpisodeFiles.Size = new System.Drawing.Size(200, 17); - this.cbWDLiveEpisodeFiles.TabIndex = 25; - this.cbWDLiveEpisodeFiles.Text = "WD TV Live Hub Episode Files (.xml)"; - this.cbWDLiveEpisodeFiles.UseVisualStyleBackColor = true; - // - // cbNFOEpisodes - // - this.cbNFOEpisodes.AutoSize = true; - this.cbNFOEpisodes.Location = new System.Drawing.Point(38, 73); - this.cbNFOEpisodes.Name = "cbNFOEpisodes"; - this.cbNFOEpisodes.Size = new System.Drawing.Size(129, 17); - this.cbNFOEpisodes.TabIndex = 24; - this.cbNFOEpisodes.Text = "&NFO files for episodes"; - this.cbNFOEpisodes.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.Controls.Add(this.rbFolderBanner); - this.panel1.Controls.Add(this.rbFolderPoster); - this.panel1.Controls.Add(this.rbFolderFanArt); - this.panel1.Controls.Add(this.rbFolderSeasonPoster); - this.panel1.Location = new System.Drawing.Point(59, 323); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(280, 24); - this.panel1.TabIndex = 22; + // tpScanOptions // - // rbFolderBanner + this.tpScanOptions.Controls.Add(this.cbHigherQuality); + this.tpScanOptions.Controls.Add(this.cbSearchJSON); + this.tpScanOptions.Controls.Add(this.cbCheckqBitTorrent); + this.tpScanOptions.Controls.Add(this.chkAutoMergeLibraryEpisodes); + this.tpScanOptions.Controls.Add(this.chkAutoMergeDownloadEpisodes); + this.tpScanOptions.Controls.Add(this.chkPreventMove); + this.tpScanOptions.Controls.Add(this.label40); + this.tpScanOptions.Controls.Add(this.cbxUpdateAirDate); + this.tpScanOptions.Controls.Add(this.label33); + this.tpScanOptions.Controls.Add(this.cbAutoCreateFolders); + this.tpScanOptions.Controls.Add(this.label28); + this.tpScanOptions.Controls.Add(this.cbSearchRSS); + this.tpScanOptions.Controls.Add(this.cbRenameCheck); + this.tpScanOptions.Controls.Add(this.cbMissing); + this.tpScanOptions.Controls.Add(this.cbLeaveOriginals); + this.tpScanOptions.Controls.Add(this.cbCheckSABnzbd); + this.tpScanOptions.Controls.Add(this.cbCheckuTorrent); + this.tpScanOptions.Controls.Add(this.cbSearchLocally); + this.tpScanOptions.Location = new System.Drawing.Point(4, 40); + this.tpScanOptions.Name = "tpScanOptions"; + this.tpScanOptions.Padding = new System.Windows.Forms.Padding(3); + this.tpScanOptions.Size = new System.Drawing.Size(529, 426); + this.tpScanOptions.TabIndex = 6; + this.tpScanOptions.Text = "Scan Options"; + this.tpScanOptions.UseVisualStyleBackColor = true; // - this.rbFolderBanner.AutoSize = true; - this.rbFolderBanner.Location = new System.Drawing.Point(0, 7); - this.rbFolderBanner.Name = "rbFolderBanner"; - this.rbFolderBanner.Size = new System.Drawing.Size(59, 17); - this.rbFolderBanner.TabIndex = 12; - this.rbFolderBanner.TabStop = true; - this.rbFolderBanner.Text = "&Banner"; - this.rbFolderBanner.UseVisualStyleBackColor = true; + // cbHigherQuality // - // rbFolderPoster + this.cbHigherQuality.AutoSize = true; + this.cbHigherQuality.Location = new System.Drawing.Point(9, 394); + this.cbHigherQuality.Name = "cbHigherQuality"; + this.cbHigherQuality.Size = new System.Drawing.Size(256, 17); + this.cbHigherQuality.TabIndex = 18; + this.cbHigherQuality.Text = "Update episodes when higher-quality ones found"; + this.cbHigherQuality.UseVisualStyleBackColor = true; // - this.rbFolderPoster.AutoSize = true; - this.rbFolderPoster.Location = new System.Drawing.Point(60, 7); - this.rbFolderPoster.Name = "rbFolderPoster"; - this.rbFolderPoster.Size = new System.Drawing.Size(55, 17); - this.rbFolderPoster.TabIndex = 13; - this.rbFolderPoster.TabStop = true; - this.rbFolderPoster.Text = "&Poster"; - this.rbFolderPoster.UseVisualStyleBackColor = true; + // cbSearchJSON // - // rbFolderFanArt + this.cbSearchJSON.AutoSize = true; + this.cbSearchJSON.Location = new System.Drawing.Point(40, 234); + this.cbSearchJSON.Name = "cbSearchJSON"; + this.cbSearchJSON.Size = new System.Drawing.Size(164, 17); + this.cbSearchJSON.TabIndex = 17; + this.cbSearchJSON.Text = "Search &JSON for missing files"; + this.cbSearchJSON.UseVisualStyleBackColor = true; + this.cbSearchJSON.CheckedChanged += new System.EventHandler(this.cbSearchJSON_CheckedChanged); // - this.rbFolderFanArt.AutoSize = true; - this.rbFolderFanArt.Location = new System.Drawing.Point(121, 7); - this.rbFolderFanArt.Name = "rbFolderFanArt"; - this.rbFolderFanArt.Size = new System.Drawing.Size(59, 17); - this.rbFolderFanArt.TabIndex = 14; - this.rbFolderFanArt.TabStop = true; - this.rbFolderFanArt.Text = "Fan A&rt"; - this.rbFolderFanArt.UseVisualStyleBackColor = true; + // cbCheckqBitTorrent // - // rbFolderSeasonPoster + this.cbCheckqBitTorrent.AutoSize = true; + this.cbCheckqBitTorrent.Location = new System.Drawing.Point(40, 190); + this.cbCheckqBitTorrent.Name = "cbCheckqBitTorrent"; + this.cbCheckqBitTorrent.Size = new System.Drawing.Size(145, 17); + this.cbCheckqBitTorrent.TabIndex = 16; + this.cbCheckqBitTorrent.Text = "Check &qBitTorrent queue"; + this.cbCheckqBitTorrent.UseVisualStyleBackColor = true; // - this.rbFolderSeasonPoster.AutoSize = true; - this.rbFolderSeasonPoster.Location = new System.Drawing.Point(186, 7); - this.rbFolderSeasonPoster.Name = "rbFolderSeasonPoster"; - this.rbFolderSeasonPoster.Size = new System.Drawing.Size(94, 17); - this.rbFolderSeasonPoster.TabIndex = 16; - this.rbFolderSeasonPoster.TabStop = true; - this.rbFolderSeasonPoster.Text = "Seaso&n Poster"; - this.rbFolderSeasonPoster.UseVisualStyleBackColor = true; + // chkAutoMergeLibraryEpisodes // - // cbKODIImages + this.chkAutoMergeLibraryEpisodes.AutoSize = true; + this.chkAutoMergeLibraryEpisodes.Location = new System.Drawing.Point(9, 371); + this.chkAutoMergeLibraryEpisodes.Name = "chkAutoMergeLibraryEpisodes"; + this.chkAutoMergeLibraryEpisodes.Size = new System.Drawing.Size(306, 17); + this.chkAutoMergeLibraryEpisodes.TabIndex = 15; + this.chkAutoMergeLibraryEpisodes.Text = "Automatically create merge rules for merged library episodes"; + this.chkAutoMergeLibraryEpisodes.UseVisualStyleBackColor = true; // - this.cbKODIImages.AutoSize = true; - this.cbKODIImages.Location = new System.Drawing.Point(38, 93); - this.cbKODIImages.Name = "cbKODIImages"; - this.cbKODIImages.Size = new System.Drawing.Size(271, 17); - this.cbKODIImages.TabIndex = 17; - this.cbKODIImages.Text = "Download XMBC &Images (fanart, poster, banner.jpg)"; - this.cbKODIImages.UseVisualStyleBackColor = true; + // chkAutoMergeDownloadEpisodes // - // bnMCPresets + this.chkAutoMergeDownloadEpisodes.AutoSize = true; + this.chkAutoMergeDownloadEpisodes.Location = new System.Drawing.Point(9, 349); + this.chkAutoMergeDownloadEpisodes.Name = "chkAutoMergeDownloadEpisodes"; + this.chkAutoMergeDownloadEpisodes.Size = new System.Drawing.Size(337, 17); + this.chkAutoMergeDownloadEpisodes.TabIndex = 13; + this.chkAutoMergeDownloadEpisodes.Text = "Automatically create merge rules for merged downloaded episodes"; + this.chkAutoMergeDownloadEpisodes.UseVisualStyleBackColor = true; // - this.bnMCPresets.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnMCPresets.Location = new System.Drawing.Point(428, 399); - this.bnMCPresets.Name = "bnMCPresets"; - this.bnMCPresets.Size = new System.Drawing.Size(75, 23); - this.bnMCPresets.TabIndex = 16; - this.bnMCPresets.Text = "Pre&sets..."; - this.bnMCPresets.UseVisualStyleBackColor = true; - this.bnMCPresets.Click += new System.EventHandler(this.bnMCPresets_Click); + // chkPreventMove // - // cbShrinkLarge + this.chkPreventMove.AutoSize = true; + this.chkPreventMove.Location = new System.Drawing.Point(40, 56); + this.chkPreventMove.Name = "chkPreventMove"; + this.chkPreventMove.Size = new System.Drawing.Size(188, 17); + this.chkPreventMove.TabIndex = 12; + this.chkPreventMove.Text = "Pre&vent move of files (just rename)"; + this.chkPreventMove.UseVisualStyleBackColor = true; // - this.cbShrinkLarge.AutoSize = true; - this.cbShrinkLarge.Location = new System.Drawing.Point(38, 260); - this.cbShrinkLarge.Name = "cbShrinkLarge"; - this.cbShrinkLarge.Size = new System.Drawing.Size(300, 17); - this.cbShrinkLarge.TabIndex = 9; - this.cbShrinkLarge.Text = "S&hrink large series and episode images to 156 x 232 pixels"; - this.cbShrinkLarge.UseVisualStyleBackColor = true; + // label40 // - // cbEpThumbJpg + this.label40.AutoSize = true; + this.label40.Location = new System.Drawing.Point(6, 310); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(94, 13); + this.label40.TabIndex = 11; + this.label40.Text = "Additional Actions:"; // - this.cbEpThumbJpg.AutoSize = true; - this.cbEpThumbJpg.Location = new System.Drawing.Point(38, 376); - this.cbEpThumbJpg.Name = "cbEpThumbJpg"; - this.cbEpThumbJpg.Size = new System.Drawing.Size(147, 17); - this.cbEpThumbJpg.TabIndex = 16; - this.cbEpThumbJpg.Text = "Episode Thumbnails (.&jpg)"; - this.cbEpThumbJpg.UseVisualStyleBackColor = true; + // cbxUpdateAirDate // - // label29 + this.cbxUpdateAirDate.AutoSize = true; + this.cbxUpdateAirDate.Location = new System.Drawing.Point(9, 326); + this.cbxUpdateAirDate.Name = "cbxUpdateAirDate"; + this.cbxUpdateAirDate.Size = new System.Drawing.Size(197, 17); + this.cbxUpdateAirDate.TabIndex = 10; + this.cbxUpdateAirDate.Text = "Update files and folders with air date"; + this.cbxUpdateAirDate.UseVisualStyleBackColor = true; // - this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(17, 194); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(49, 13); - this.label29.TabIndex = 6; - this.label29.Text = "Mede8er"; + // label33 // - // label24 + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(6, 263); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(80, 13); + this.label33.TabIndex = 9; + this.label33.Text = "Folder creation:"; // - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(17, 289); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(44, 13); - this.label24.TabIndex = 10; - this.label24.Text = "General"; + // cbAutoCreateFolders // - // label18 + this.cbAutoCreateFolders.AutoSize = true; + this.cbAutoCreateFolders.Location = new System.Drawing.Point(9, 279); + this.cbAutoCreateFolders.Name = "cbAutoCreateFolders"; + this.cbAutoCreateFolders.Size = new System.Drawing.Size(192, 17); + this.cbAutoCreateFolders.TabIndex = 8; + this.cbAutoCreateFolders.Text = "&Automatically create missing folders"; + this.cbAutoCreateFolders.UseVisualStyleBackColor = true; // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(17, 123); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(39, 13); - this.label18.TabIndex = 3; - this.label18.Text = "pyTivo"; + // label28 // - // label12 + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(6, 13); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(141, 13); + this.label28.TabIndex = 0; + this.label28.Text = "\"Scan\" checks and actions:"; // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(17, 15); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(33, 13); - this.label12.TabIndex = 0; - this.label12.Text = "KODI"; + // cbSearchRSS // - // cbMetaSubfolder + this.cbSearchRSS.AutoSize = true; + this.cbSearchRSS.Location = new System.Drawing.Point(40, 211); + this.cbSearchRSS.Name = "cbSearchRSS"; + this.cbSearchRSS.Size = new System.Drawing.Size(158, 17); + this.cbSearchRSS.TabIndex = 7; + this.cbSearchRSS.Text = "&Search RSS for missing files"; + this.cbSearchRSS.UseVisualStyleBackColor = true; + this.cbSearchRSS.CheckedChanged += new System.EventHandler(this.cbSearchRSS_CheckedChanged); // - this.cbMetaSubfolder.AutoSize = true; - this.cbMetaSubfolder.Location = new System.Drawing.Point(38, 165); - this.cbMetaSubfolder.Name = "cbMetaSubfolder"; - this.cbMetaSubfolder.Size = new System.Drawing.Size(187, 17); - this.cbMetaSubfolder.TabIndex = 5; - this.cbMetaSubfolder.Text = "Pl&ace Meta files in .meta subfolder"; - this.cbMetaSubfolder.UseVisualStyleBackColor = true; + // cbRenameCheck // - // cbMeta + this.cbRenameCheck.AutoSize = true; + this.cbRenameCheck.Checked = true; + this.cbRenameCheck.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbRenameCheck.Location = new System.Drawing.Point(20, 33); + this.cbRenameCheck.Name = "cbRenameCheck"; + this.cbRenameCheck.Size = new System.Drawing.Size(100, 17); + this.cbRenameCheck.TabIndex = 1; + this.cbRenameCheck.Text = "&Rename Check"; + this.cbRenameCheck.UseVisualStyleBackColor = true; // - this.cbMeta.AutoSize = true; - this.cbMeta.Location = new System.Drawing.Point(38, 142); - this.cbMeta.Name = "cbMeta"; - this.cbMeta.Size = new System.Drawing.Size(154, 17); - this.cbMeta.TabIndex = 4; - this.cbMeta.Text = "&Meta files for episodes (.txt)"; - this.cbMeta.UseVisualStyleBackColor = true; - this.cbMeta.CheckedChanged += new System.EventHandler(this.cbMeta_CheckedChanged); + // cbMissing // - // cbEpTBNs + this.cbMissing.AutoSize = true; + this.cbMissing.Checked = true; + this.cbMissing.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbMissing.Location = new System.Drawing.Point(20, 79); + this.cbMissing.Name = "cbMissing"; + this.cbMissing.Size = new System.Drawing.Size(95, 17); + this.cbMissing.TabIndex = 2; + this.cbMissing.Text = "&Missing Check"; + this.cbMissing.UseVisualStyleBackColor = true; + this.cbMissing.CheckedChanged += new System.EventHandler(this.cbMissing_CheckedChanged); // - this.cbEpTBNs.AutoSize = true; - this.cbEpTBNs.Location = new System.Drawing.Point(38, 34); - this.cbEpTBNs.Name = "cbEpTBNs"; - this.cbEpTBNs.Size = new System.Drawing.Size(148, 17); - this.cbEpTBNs.TabIndex = 1; - this.cbEpTBNs.Text = "&Episode Thumbnails (.tbn)"; - this.cbEpTBNs.UseVisualStyleBackColor = true; + // cbLeaveOriginals // - // cbSeriesJpg + this.cbLeaveOriginals.AutoSize = true; + this.cbLeaveOriginals.Location = new System.Drawing.Point(60, 125); + this.cbLeaveOriginals.Name = "cbLeaveOriginals"; + this.cbLeaveOriginals.Size = new System.Drawing.Size(129, 17); + this.cbLeaveOriginals.TabIndex = 4; + this.cbLeaveOriginals.Text = "&Copy files, don\'t move"; + this.cbLeaveOriginals.UseVisualStyleBackColor = true; // - this.cbSeriesJpg.AutoSize = true; - this.cbSeriesJpg.Location = new System.Drawing.Point(38, 214); - this.cbSeriesJpg.Name = "cbSeriesJpg"; - this.cbSeriesJpg.Size = new System.Drawing.Size(172, 17); - this.cbSeriesJpg.TabIndex = 7; - this.cbSeriesJpg.Text = "&Create series poster (series.jpg)"; - this.cbSeriesJpg.UseVisualStyleBackColor = true; + // cbCheckSABnzbd // - // cbXMLFiles + this.cbCheckSABnzbd.AutoSize = true; + this.cbCheckSABnzbd.Location = new System.Drawing.Point(40, 171); + this.cbCheckSABnzbd.Name = "cbCheckSABnzbd"; + this.cbCheckSABnzbd.Size = new System.Drawing.Size(137, 17); + this.cbCheckSABnzbd.TabIndex = 6; + this.cbCheckSABnzbd.Text = "Check SA&Bnzbd queue"; + this.cbCheckSABnzbd.UseVisualStyleBackColor = true; + this.cbCheckSABnzbd.CheckedChanged += new System.EventHandler(this.cbSearchLocally_CheckedChanged); // - this.cbXMLFiles.AutoSize = true; - this.cbXMLFiles.Location = new System.Drawing.Point(38, 237); - this.cbXMLFiles.Name = "cbXMLFiles"; - this.cbXMLFiles.Size = new System.Drawing.Size(183, 17); - this.cbXMLFiles.TabIndex = 8; - this.cbXMLFiles.Text = "&XML files for shows and episodes"; - this.cbXMLFiles.UseVisualStyleBackColor = true; + // cbCheckuTorrent // - // cbNFOShows + this.cbCheckuTorrent.AutoSize = true; + this.cbCheckuTorrent.Location = new System.Drawing.Point(40, 148); + this.cbCheckuTorrent.Name = "cbCheckuTorrent"; + this.cbCheckuTorrent.Size = new System.Drawing.Size(133, 17); + this.cbCheckuTorrent.TabIndex = 5; + this.cbCheckuTorrent.Text = "C&heck µTorrent queue"; + this.cbCheckuTorrent.UseVisualStyleBackColor = true; + this.cbCheckuTorrent.CheckedChanged += new System.EventHandler(this.cbSearchLocally_CheckedChanged); // - this.cbNFOShows.AutoSize = true; - this.cbNFOShows.Location = new System.Drawing.Point(38, 55); - this.cbNFOShows.Name = "cbNFOShows"; - this.cbNFOShows.Size = new System.Drawing.Size(117, 17); - this.cbNFOShows.TabIndex = 2; - this.cbNFOShows.Text = "&NFO files for shows"; - this.cbNFOShows.UseVisualStyleBackColor = true; + // cbSearchLocally // - // cbFantArtJpg + this.cbSearchLocally.AutoSize = true; + this.cbSearchLocally.Checked = true; + this.cbSearchLocally.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbSearchLocally.Location = new System.Drawing.Point(40, 102); + this.cbSearchLocally.Name = "cbSearchLocally"; + this.cbSearchLocally.Size = new System.Drawing.Size(218, 17); + this.cbSearchLocally.TabIndex = 3; + this.cbSearchLocally.Text = "&Look in \"Search Folders\" for missing files"; + this.cbSearchLocally.UseVisualStyleBackColor = true; + this.cbSearchLocally.CheckedChanged += new System.EventHandler(this.cbSearchLocally_CheckedChanged); // - this.cbFantArtJpg.AutoSize = true; - this.cbFantArtJpg.Location = new System.Drawing.Point(38, 353); - this.cbFantArtJpg.Name = "cbFantArtJpg"; - this.cbFantArtJpg.Size = new System.Drawing.Size(141, 17); - this.cbFantArtJpg.TabIndex = 15; - this.cbFantArtJpg.Text = "Fanar&t Image (fanart.jpg)"; - this.cbFantArtJpg.UseVisualStyleBackColor = true; + // tbAutoExport // - // cbFolderJpg + this.tbAutoExport.Controls.Add(this.groupBox7); + this.tbAutoExport.Controls.Add(this.groupBox5); + this.tbAutoExport.Controls.Add(this.groupBox4); + this.tbAutoExport.Controls.Add(this.groupBox3); + this.tbAutoExport.Controls.Add(this.groupBox2); + this.tbAutoExport.Location = new System.Drawing.Point(4, 40); + this.tbAutoExport.Name = "tbAutoExport"; + this.tbAutoExport.Padding = new System.Windows.Forms.Padding(3); + this.tbAutoExport.Size = new System.Drawing.Size(529, 426); + this.tbAutoExport.TabIndex = 2; + this.tbAutoExport.Text = "Automatic Export"; + this.tbAutoExport.UseVisualStyleBackColor = true; // - this.cbFolderJpg.AutoSize = true; - this.cbFolderJpg.Location = new System.Drawing.Point(38, 310); - this.cbFolderJpg.Name = "cbFolderJpg"; - this.cbFolderJpg.Size = new System.Drawing.Size(138, 17); - this.cbFolderJpg.TabIndex = 11; - this.cbFolderJpg.Text = "&Folder image (folder.jpg)"; - this.cbFolderJpg.UseVisualStyleBackColor = true; + // groupBox7 // - // tbSearchFolders + this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox7.Controls.Add(this.bnBrowseShowsHTML); + this.groupBox7.Controls.Add(this.cbShowsHTML); + this.groupBox7.Controls.Add(this.txtShowsHTMLTo); + this.groupBox7.Controls.Add(this.bnBrowseShowsTXT); + this.groupBox7.Controls.Add(this.cbShowsTXT); + this.groupBox7.Controls.Add(this.txtShowsTXTTo); + this.groupBox7.Location = new System.Drawing.Point(7, 227); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(516, 72); + this.groupBox7.TabIndex = 4; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "All Shows"; // - this.tbSearchFolders.Controls.Add(this.label1); - this.tbSearchFolders.Controls.Add(this.domainUpDown1); - this.tbSearchFolders.Controls.Add(this.chkScheduledScan); - this.tbSearchFolders.Controls.Add(this.chkScanOnStartup); - this.tbSearchFolders.Controls.Add(this.lblScanAction); - this.tbSearchFolders.Controls.Add(this.rdoQuickScan); - this.tbSearchFolders.Controls.Add(this.rdoRecentScan); - this.tbSearchFolders.Controls.Add(this.rdoFullScan); - this.tbSearchFolders.Controls.Add(this.cbMonitorFolder); - this.tbSearchFolders.Controls.Add(this.bnOpenSearchFolder); - this.tbSearchFolders.Controls.Add(this.bnRemoveSearchFolder); - this.tbSearchFolders.Controls.Add(this.bnAddSearchFolder); - this.tbSearchFolders.Controls.Add(this.lbSearchFolders); - this.tbSearchFolders.Controls.Add(this.label23); - this.tbSearchFolders.Location = new System.Drawing.Point(4, 40); - this.tbSearchFolders.Name = "tbSearchFolders"; - this.tbSearchFolders.Size = new System.Drawing.Size(509, 489); - this.tbSearchFolders.TabIndex = 3; - this.tbSearchFolders.Text = "Search Folders"; - this.tbSearchFolders.UseVisualStyleBackColor = true; + // bnBrowseShowsHTML // - // label1 + this.bnBrowseShowsHTML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseShowsHTML.Location = new System.Drawing.Point(433, 45); + this.bnBrowseShowsHTML.Name = "bnBrowseShowsHTML"; + this.bnBrowseShowsHTML.Size = new System.Drawing.Size(75, 23); + this.bnBrowseShowsHTML.TabIndex = 8; + this.bnBrowseShowsHTML.Text = "Browse..."; + this.bnBrowseShowsHTML.UseVisualStyleBackColor = true; + this.bnBrowseShowsHTML.Click += new System.EventHandler(this.bnBrowseShowsHTML_Click); // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(178, 89); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(33, 13); - this.label1.TabIndex = 26; - this.label1.Text = "hours"; + // cbShowsHTML // - // domainUpDown1 + this.cbShowsHTML.AutoSize = true; + this.cbShowsHTML.Location = new System.Drawing.Point(8, 49); + this.cbShowsHTML.Name = "cbShowsHTML"; + this.cbShowsHTML.Size = new System.Drawing.Size(56, 17); + this.cbShowsHTML.TabIndex = 6; + this.cbShowsHTML.Text = "HTML"; + this.cbShowsHTML.UseVisualStyleBackColor = true; + this.cbShowsHTML.CheckedChanged += new System.EventHandler(this.EnableDisable); // - this.domainUpDown1.Items.Add("1"); - this.domainUpDown1.Items.Add("2"); - this.domainUpDown1.Items.Add("3"); - this.domainUpDown1.Items.Add("4"); - this.domainUpDown1.Items.Add("5"); - this.domainUpDown1.Items.Add("6"); - this.domainUpDown1.Items.Add("8"); - this.domainUpDown1.Items.Add("12"); - this.domainUpDown1.Items.Add("24"); - this.domainUpDown1.Items.Add("48"); - this.domainUpDown1.Items.Add("96"); - this.domainUpDown1.Location = new System.Drawing.Point(134, 87); - this.domainUpDown1.Name = "domainUpDown1"; - this.domainUpDown1.Size = new System.Drawing.Size(40, 20); - this.domainUpDown1.TabIndex = 25; - this.domainUpDown1.Text = "1"; - this.domainUpDown1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.domainUpDown1_KeyDown); + // txtShowsHTMLTo // - // chkScheduledScan + this.txtShowsHTMLTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtShowsHTMLTo.Location = new System.Drawing.Point(64, 47); + this.txtShowsHTMLTo.Name = "txtShowsHTMLTo"; + this.txtShowsHTMLTo.Size = new System.Drawing.Size(363, 20); + this.txtShowsHTMLTo.TabIndex = 7; // - this.chkScheduledScan.AutoSize = true; - this.chkScheduledScan.Location = new System.Drawing.Point(3, 88); - this.chkScheduledScan.Name = "chkScheduledScan"; - this.chkScheduledScan.Size = new System.Drawing.Size(135, 17); - this.chkScheduledScan.TabIndex = 24; - this.chkScheduledScan.Text = "Sc&heduled scan every "; - this.toolTip1.SetToolTip(this.chkScheduledScan, "If checked the system will automatically scan and complete actions on startup"); - this.chkScheduledScan.UseVisualStyleBackColor = true; + // bnBrowseShowsTXT + // + this.bnBrowseShowsTXT.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseShowsTXT.Location = new System.Drawing.Point(433, 21); + this.bnBrowseShowsTXT.Name = "bnBrowseShowsTXT"; + this.bnBrowseShowsTXT.Size = new System.Drawing.Size(75, 23); + this.bnBrowseShowsTXT.TabIndex = 5; + this.bnBrowseShowsTXT.Text = "Browse..."; + this.bnBrowseShowsTXT.UseVisualStyleBackColor = true; + this.bnBrowseShowsTXT.Click += new System.EventHandler(this.bnBrowseShowsTXT_Click); // - // chkScanOnStartup + // cbShowsTXT // - this.chkScanOnStartup.AutoSize = true; - this.chkScanOnStartup.Location = new System.Drawing.Point(3, 65); - this.chkScanOnStartup.Name = "chkScanOnStartup"; - this.chkScanOnStartup.Size = new System.Drawing.Size(103, 17); - this.chkScanOnStartup.TabIndex = 23; - this.chkScanOnStartup.Text = "&Scan on Startup"; - this.toolTip1.SetToolTip(this.chkScanOnStartup, "If checked the system will automatically scan and complete actions on startup"); - this.chkScanOnStartup.UseVisualStyleBackColor = true; + this.cbShowsTXT.AutoSize = true; + this.cbShowsTXT.Location = new System.Drawing.Point(8, 25); + this.cbShowsTXT.Name = "cbShowsTXT"; + this.cbShowsTXT.Size = new System.Drawing.Size(47, 17); + this.cbShowsTXT.TabIndex = 3; + this.cbShowsTXT.Text = "TXT"; + this.cbShowsTXT.UseVisualStyleBackColor = true; + this.cbShowsTXT.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // lblScanAction + // txtShowsTXTTo // - this.lblScanAction.AutoSize = true; - this.lblScanAction.Location = new System.Drawing.Point(2, 12); - this.lblScanAction.Name = "lblScanAction"; - this.lblScanAction.Size = new System.Drawing.Size(59, 13); - this.lblScanAction.TabIndex = 22; - this.lblScanAction.Text = "&Scan Type"; + this.txtShowsTXTTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtShowsTXTTo.Location = new System.Drawing.Point(64, 23); + this.txtShowsTXTTo.Name = "txtShowsTXTTo"; + this.txtShowsTXTTo.Size = new System.Drawing.Size(362, 20); + this.txtShowsTXTTo.TabIndex = 4; // - // rdoQuickScan + // groupBox5 // - this.rdoQuickScan.AutoSize = true; - this.rdoQuickScan.Location = new System.Drawing.Point(134, 28); - this.rdoQuickScan.Name = "rdoQuickScan"; - this.rdoQuickScan.Size = new System.Drawing.Size(53, 17); - this.rdoQuickScan.TabIndex = 20; - this.rdoQuickScan.TabStop = true; - this.rdoQuickScan.Text = "&Quick"; - this.rdoQuickScan.UseVisualStyleBackColor = true; + this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox5.Controls.Add(this.bnBrowseFOXML); + this.groupBox5.Controls.Add(this.cbFOXML); + this.groupBox5.Controls.Add(this.txtFOXML); + this.groupBox5.Location = new System.Drawing.Point(6, 367); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(517, 55); + this.groupBox5.TabIndex = 3; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Finding and Organising"; // - // rdoRecentScan + // bnBrowseFOXML // - this.rdoRecentScan.AutoSize = true; - this.rdoRecentScan.Location = new System.Drawing.Point(68, 28); - this.rdoRecentScan.Name = "rdoRecentScan"; - this.rdoRecentScan.Size = new System.Drawing.Size(60, 17); - this.rdoRecentScan.TabIndex = 19; - this.rdoRecentScan.TabStop = true; - this.rdoRecentScan.Text = "&Recent"; - this.rdoRecentScan.UseVisualStyleBackColor = true; + this.bnBrowseFOXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseFOXML.Location = new System.Drawing.Point(433, 19); + this.bnBrowseFOXML.Name = "bnBrowseFOXML"; + this.bnBrowseFOXML.Size = new System.Drawing.Size(75, 23); + this.bnBrowseFOXML.TabIndex = 2; + this.bnBrowseFOXML.Text = "Browse..."; + this.bnBrowseFOXML.UseVisualStyleBackColor = true; + this.bnBrowseFOXML.Click += new System.EventHandler(this.bnBrowseFOXML_Click); // - // rdoFullScan + // cbFOXML // - this.rdoFullScan.AutoSize = true; - this.rdoFullScan.Location = new System.Drawing.Point(21, 28); - this.rdoFullScan.Name = "rdoFullScan"; - this.rdoFullScan.Size = new System.Drawing.Size(41, 17); - this.rdoFullScan.TabIndex = 18; - this.rdoFullScan.TabStop = true; - this.rdoFullScan.Text = "&Full"; - this.rdoFullScan.UseVisualStyleBackColor = true; + this.cbFOXML.AutoSize = true; + this.cbFOXML.Location = new System.Drawing.Point(8, 23); + this.cbFOXML.Name = "cbFOXML"; + this.cbFOXML.Size = new System.Drawing.Size(48, 17); + this.cbFOXML.TabIndex = 0; + this.cbFOXML.Text = "XML"; + this.cbFOXML.UseVisualStyleBackColor = true; + this.cbFOXML.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // cbMonitorFolder + // txtFOXML // - this.cbMonitorFolder.AutoSize = true; - this.cbMonitorFolder.Location = new System.Drawing.Point(3, 111); - this.cbMonitorFolder.Name = "cbMonitorFolder"; - this.cbMonitorFolder.Size = new System.Drawing.Size(154, 17); - this.cbMonitorFolder.TabIndex = 5; - this.cbMonitorFolder.Text = "&Monitor folders for changes"; - this.toolTip1.SetToolTip(this.cbMonitorFolder, "If the contents of any of these folder change, then automatically do a \"Scan\" and" + - " \"Do\"."); - this.cbMonitorFolder.UseVisualStyleBackColor = true; + this.txtFOXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtFOXML.Location = new System.Drawing.Point(64, 21); + this.txtFOXML.Name = "txtFOXML"; + this.txtFOXML.Size = new System.Drawing.Size(363, 20); + this.txtFOXML.TabIndex = 1; // - // bnOpenSearchFolder + // groupBox4 // - this.bnOpenSearchFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.bnOpenSearchFolder.Location = new System.Drawing.Point(165, 458); - this.bnOpenSearchFolder.Name = "bnOpenSearchFolder"; - this.bnOpenSearchFolder.Size = new System.Drawing.Size(75, 23); - this.bnOpenSearchFolder.TabIndex = 4; - this.bnOpenSearchFolder.Text = "&Open"; - this.bnOpenSearchFolder.UseVisualStyleBackColor = true; - this.bnOpenSearchFolder.Click += new System.EventHandler(this.bnOpenSearchFolder_Click); + this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox4.Controls.Add(this.bnBrowseRenamingXML); + this.groupBox4.Controls.Add(this.cbRenamingXML); + this.groupBox4.Controls.Add(this.txtRenamingXML); + this.groupBox4.Location = new System.Drawing.Point(6, 305); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(517, 57); + this.groupBox4.TabIndex = 2; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Renaming"; // - // bnRemoveSearchFolder + // bnBrowseRenamingXML // - this.bnRemoveSearchFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.bnRemoveSearchFolder.Location = new System.Drawing.Point(84, 458); - this.bnRemoveSearchFolder.Name = "bnRemoveSearchFolder"; - this.bnRemoveSearchFolder.Size = new System.Drawing.Size(75, 23); - this.bnRemoveSearchFolder.TabIndex = 3; - this.bnRemoveSearchFolder.Text = "&Remove"; - this.bnRemoveSearchFolder.UseVisualStyleBackColor = true; - this.bnRemoveSearchFolder.Click += new System.EventHandler(this.bnRemoveSearchFolder_Click); + this.bnBrowseRenamingXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseRenamingXML.Location = new System.Drawing.Point(433, 19); + this.bnBrowseRenamingXML.Name = "bnBrowseRenamingXML"; + this.bnBrowseRenamingXML.Size = new System.Drawing.Size(75, 23); + this.bnBrowseRenamingXML.TabIndex = 2; + this.bnBrowseRenamingXML.Text = "Browse..."; + this.bnBrowseRenamingXML.UseVisualStyleBackColor = true; + this.bnBrowseRenamingXML.Click += new System.EventHandler(this.bnBrowseRenamingXML_Click); // - // bnAddSearchFolder + // cbRenamingXML // - this.bnAddSearchFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.bnAddSearchFolder.Location = new System.Drawing.Point(3, 458); - this.bnAddSearchFolder.Name = "bnAddSearchFolder"; - this.bnAddSearchFolder.Size = new System.Drawing.Size(75, 23); - this.bnAddSearchFolder.TabIndex = 2; - this.bnAddSearchFolder.Text = "&Add"; - this.bnAddSearchFolder.UseVisualStyleBackColor = true; - this.bnAddSearchFolder.Click += new System.EventHandler(this.bnAddSearchFolder_Click); + this.cbRenamingXML.AutoSize = true; + this.cbRenamingXML.Location = new System.Drawing.Point(8, 23); + this.cbRenamingXML.Name = "cbRenamingXML"; + this.cbRenamingXML.Size = new System.Drawing.Size(48, 17); + this.cbRenamingXML.TabIndex = 0; + this.cbRenamingXML.Text = "XML"; + this.cbRenamingXML.UseVisualStyleBackColor = true; + this.cbRenamingXML.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // lbSearchFolders + // txtRenamingXML // - this.lbSearchFolders.AllowDrop = true; - this.lbSearchFolders.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.txtRenamingXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.lbSearchFolders.FormattingEnabled = true; - this.lbSearchFolders.Location = new System.Drawing.Point(3, 153); - this.lbSearchFolders.Name = "lbSearchFolders"; - this.lbSearchFolders.ScrollAlwaysVisible = true; - this.lbSearchFolders.Size = new System.Drawing.Size(503, 290); - this.lbSearchFolders.TabIndex = 1; - this.lbSearchFolders.DragDrop += new System.Windows.Forms.DragEventHandler(this.lbSearchFolders_DragDrop); - this.lbSearchFolders.DragOver += new System.Windows.Forms.DragEventHandler(this.lbSearchFolders_DragOver); - this.lbSearchFolders.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lbSearchFolders_KeyDown); + this.txtRenamingXML.Location = new System.Drawing.Point(64, 21); + this.txtRenamingXML.Name = "txtRenamingXML"; + this.txtRenamingXML.Size = new System.Drawing.Size(363, 20); + this.txtRenamingXML.TabIndex = 1; // - // label23 + // groupBox3 // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(5, 131); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(78, 13); - this.label23.TabIndex = 0; - this.label23.Text = "&Search Folders"; + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.bnBrowseMissingCSV); + this.groupBox3.Controls.Add(this.bnBrowseMissingXML); + this.groupBox3.Controls.Add(this.txtMissingCSV); + this.groupBox3.Controls.Add(this.cbMissingXML); + this.groupBox3.Controls.Add(this.cbMissingCSV); + this.groupBox3.Controls.Add(this.txtMissingXML); + this.groupBox3.Location = new System.Drawing.Point(6, 147); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(517, 79); + this.groupBox3.TabIndex = 1; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Missing"; // - // tbuTorrentNZB + // bnBrowseMissingCSV // - this.tbuTorrentNZB.Controls.Add(this.qBitTorrent); - this.tbuTorrentNZB.Controls.Add(this.label45); - this.tbuTorrentNZB.Controls.Add(this.tbPreferredRSSTerms); - this.tbuTorrentNZB.Controls.Add(this.groupBox1); - this.tbuTorrentNZB.Controls.Add(this.groupBox6); - this.tbuTorrentNZB.Controls.Add(this.RSSGrid); - this.tbuTorrentNZB.Controls.Add(this.bnRSSRemove); - this.tbuTorrentNZB.Controls.Add(this.bnRSSAdd); - this.tbuTorrentNZB.Controls.Add(this.bnRSSGo); - this.tbuTorrentNZB.Controls.Add(this.label25); - this.tbuTorrentNZB.Location = new System.Drawing.Point(4, 40); - this.tbuTorrentNZB.Name = "tbuTorrentNZB"; - this.tbuTorrentNZB.Padding = new System.Windows.Forms.Padding(3); - this.tbuTorrentNZB.Size = new System.Drawing.Size(509, 489); - this.tbuTorrentNZB.TabIndex = 4; - this.tbuTorrentNZB.Text = "Torrents / NZB"; - this.tbuTorrentNZB.UseVisualStyleBackColor = true; + this.bnBrowseMissingCSV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseMissingCSV.Location = new System.Drawing.Point(433, 47); + this.bnBrowseMissingCSV.Name = "bnBrowseMissingCSV"; + this.bnBrowseMissingCSV.Size = new System.Drawing.Size(75, 23); + this.bnBrowseMissingCSV.TabIndex = 2; + this.bnBrowseMissingCSV.Text = "Browse..."; + this.bnBrowseMissingCSV.UseVisualStyleBackColor = true; + this.bnBrowseMissingCSV.Click += new System.EventHandler(this.bnBrowseMissingCSV_Click); // - // qBitTorrent + // bnBrowseMissingXML // - this.qBitTorrent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.bnBrowseMissingXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseMissingXML.Location = new System.Drawing.Point(434, 19); + this.bnBrowseMissingXML.Name = "bnBrowseMissingXML"; + this.bnBrowseMissingXML.Size = new System.Drawing.Size(75, 23); + this.bnBrowseMissingXML.TabIndex = 5; + this.bnBrowseMissingXML.Text = "Browse..."; + this.bnBrowseMissingXML.UseVisualStyleBackColor = true; + this.bnBrowseMissingXML.Click += new System.EventHandler(this.bnBrowseMissingXML_Click); + // + // txtMissingCSV + // + this.txtMissingCSV.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.qBitTorrent.Controls.Add(this.tbqBitTorrentHost); - this.qBitTorrent.Controls.Add(this.tbqBitTorrentPort); - this.qBitTorrent.Controls.Add(this.label41); - this.qBitTorrent.Controls.Add(this.label42); - this.qBitTorrent.Location = new System.Drawing.Point(3, 336); - this.qBitTorrent.Name = "qBitTorrent"; - this.qBitTorrent.Size = new System.Drawing.Size(500, 81); - this.qBitTorrent.TabIndex = 7; - this.qBitTorrent.TabStop = false; - this.qBitTorrent.Text = "qBitTorrent"; + this.txtMissingCSV.Location = new System.Drawing.Point(64, 48); + this.txtMissingCSV.Name = "txtMissingCSV"; + this.txtMissingCSV.Size = new System.Drawing.Size(363, 20); + this.txtMissingCSV.TabIndex = 1; + // + // cbMissingXML + // + this.cbMissingXML.AutoSize = true; + this.cbMissingXML.Location = new System.Drawing.Point(8, 23); + this.cbMissingXML.Name = "cbMissingXML"; + this.cbMissingXML.Size = new System.Drawing.Size(48, 17); + this.cbMissingXML.TabIndex = 3; + this.cbMissingXML.Text = "XML"; + this.cbMissingXML.UseVisualStyleBackColor = true; + this.cbMissingXML.CheckedChanged += new System.EventHandler(this.EnableDisable); + // + // cbMissingCSV + // + this.cbMissingCSV.AutoSize = true; + this.cbMissingCSV.Location = new System.Drawing.Point(9, 48); + this.cbMissingCSV.Name = "cbMissingCSV"; + this.cbMissingCSV.Size = new System.Drawing.Size(47, 17); + this.cbMissingCSV.TabIndex = 0; + this.cbMissingCSV.Text = "CSV"; + this.cbMissingCSV.UseVisualStyleBackColor = true; + this.cbMissingCSV.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // tbqBitTorrentHost + // txtMissingXML // - this.tbqBitTorrentHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtMissingXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tbqBitTorrentHost.Location = new System.Drawing.Point(75, 19); - this.tbqBitTorrentHost.Name = "tbqBitTorrentHost"; - this.tbqBitTorrentHost.Size = new System.Drawing.Size(419, 20); - this.tbqBitTorrentHost.TabIndex = 1; + this.txtMissingXML.Location = new System.Drawing.Point(64, 21); + this.txtMissingXML.Name = "txtMissingXML"; + this.txtMissingXML.Size = new System.Drawing.Size(363, 20); + this.txtMissingXML.TabIndex = 4; // - // tbqBitTorrentPort + // groupBox2 // - this.tbqBitTorrentPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tbqBitTorrentPort.Location = new System.Drawing.Point(75, 48); - this.tbqBitTorrentPort.Name = "tbqBitTorrentPort"; - this.tbqBitTorrentPort.Size = new System.Drawing.Size(419, 20); - this.tbqBitTorrentPort.TabIndex = 4; + this.groupBox2.Controls.Add(this.bnBrowseWTWICAL); + this.groupBox2.Controls.Add(this.txtWTWICAL); + this.groupBox2.Controls.Add(this.cbWTWICAL); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.txtExportRSSDaysPast); + this.groupBox2.Controls.Add(this.bnBrowseWTWXML); + this.groupBox2.Controls.Add(this.txtWTWXML); + this.groupBox2.Controls.Add(this.cbWTWXML); + this.groupBox2.Controls.Add(this.bnBrowseWTWRSS); + this.groupBox2.Controls.Add(this.txtWTWRSS); + this.groupBox2.Controls.Add(this.cbWTWRSS); + this.groupBox2.Controls.Add(this.label17); + this.groupBox2.Controls.Add(this.label16); + this.groupBox2.Controls.Add(this.label15); + this.groupBox2.Controls.Add(this.txtExportRSSMaxDays); + this.groupBox2.Controls.Add(this.txtExportRSSMaxShows); + this.groupBox2.Location = new System.Drawing.Point(6, 6); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(517, 135); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "When to Watch"; // - // label41 + // bnBrowseWTWICAL // - this.label41.AutoSize = true; - this.label41.Location = new System.Drawing.Point(11, 51); - this.label41.Name = "label41"; - this.label41.Size = new System.Drawing.Size(29, 13); - this.label41.TabIndex = 3; - this.label41.Text = "Port:"; + this.bnBrowseWTWICAL.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseWTWICAL.Location = new System.Drawing.Point(434, 76); + this.bnBrowseWTWICAL.Name = "bnBrowseWTWICAL"; + this.bnBrowseWTWICAL.Size = new System.Drawing.Size(75, 23); + this.bnBrowseWTWICAL.TabIndex = 24; + this.bnBrowseWTWICAL.Text = "Browse..."; + this.bnBrowseWTWICAL.UseVisualStyleBackColor = true; + this.bnBrowseWTWICAL.Click += new System.EventHandler(this.bnBrowseWTWICAL_Click); // - // label42 + // txtWTWICAL // - this.label42.AutoSize = true; - this.label42.Location = new System.Drawing.Point(11, 22); - this.label42.Name = "label42"; - this.label42.Size = new System.Drawing.Size(32, 13); - this.label42.TabIndex = 0; - this.label42.Text = "Host:"; + this.txtWTWICAL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtWTWICAL.Location = new System.Drawing.Point(65, 78); + this.txtWTWICAL.Name = "txtWTWICAL"; + this.txtWTWICAL.Size = new System.Drawing.Size(362, 20); + this.txtWTWICAL.TabIndex = 23; // - // label45 + // cbWTWICAL // - this.label45.AutoSize = true; - this.label45.Location = new System.Drawing.Point(150, 9); - this.label45.Name = "label45"; - this.label45.Size = new System.Drawing.Size(85, 13); - this.label45.TabIndex = 24; - this.label45.Text = "Preferred Terms:"; + this.cbWTWICAL.AutoSize = true; + this.cbWTWICAL.Location = new System.Drawing.Point(8, 80); + this.cbWTWICAL.Name = "cbWTWICAL"; + this.cbWTWICAL.Size = new System.Drawing.Size(43, 17); + this.cbWTWICAL.TabIndex = 22; + this.cbWTWICAL.Text = "iCal"; + this.cbWTWICAL.UseVisualStyleBackColor = true; + this.cbWTWICAL.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // tbPreferredRSSTerms + // label4 // - this.tbPreferredRSSTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbPreferredRSSTerms.Location = new System.Drawing.Point(241, 6); - this.tbPreferredRSSTerms.Name = "tbPreferredRSSTerms"; - this.tbPreferredRSSTerms.Size = new System.Drawing.Size(262, 20); - this.tbPreferredRSSTerms.TabIndex = 23; + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(330, 109); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(59, 13); + this.label4.TabIndex = 21; + this.label4.Text = "in the past."; // - // groupBox1 + // txtExportRSSDaysPast // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox1.Controls.Add(this.txtSABHostPort); - this.groupBox1.Controls.Add(this.txtSABAPIKey); - this.groupBox1.Controls.Add(this.label8); - this.groupBox1.Controls.Add(this.label9); - this.groupBox1.Location = new System.Drawing.Point(3, 163); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(500, 81); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "SABnzbd"; + this.txtExportRSSDaysPast.Location = new System.Drawing.Point(294, 106); + this.txtExportRSSDaysPast.Name = "txtExportRSSDaysPast"; + this.txtExportRSSDaysPast.Size = new System.Drawing.Size(28, 20); + this.txtExportRSSDaysPast.TabIndex = 20; // - // txtSABHostPort + // bnBrowseWTWXML // - this.txtSABHostPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSABHostPort.Location = new System.Drawing.Point(75, 19); - this.txtSABHostPort.Name = "txtSABHostPort"; - this.txtSABHostPort.Size = new System.Drawing.Size(419, 20); - this.txtSABHostPort.TabIndex = 1; + this.bnBrowseWTWXML.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseWTWXML.Location = new System.Drawing.Point(541, 47); + this.bnBrowseWTWXML.Name = "bnBrowseWTWXML"; + this.bnBrowseWTWXML.Size = new System.Drawing.Size(75, 23); + this.bnBrowseWTWXML.TabIndex = 19; + this.bnBrowseWTWXML.Text = "Browse..."; + this.bnBrowseWTWXML.UseVisualStyleBackColor = true; + this.bnBrowseWTWXML.Click += new System.EventHandler(this.bnBrowseWTWXML_Click); // - // txtSABAPIKey + // txtWTWXML // - this.txtSABAPIKey.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtWTWXML.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSABAPIKey.Location = new System.Drawing.Point(75, 48); - this.txtSABAPIKey.Name = "txtSABAPIKey"; - this.txtSABAPIKey.Size = new System.Drawing.Size(419, 20); - this.txtSABAPIKey.TabIndex = 4; + this.txtWTWXML.Location = new System.Drawing.Point(65, 49); + this.txtWTWXML.Name = "txtWTWXML"; + this.txtWTWXML.Size = new System.Drawing.Size(443, 20); + this.txtWTWXML.TabIndex = 18; // - // label8 + // cbWTWXML // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(11, 51); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(48, 13); - this.label8.TabIndex = 3; - this.label8.Text = "API Key:"; + this.cbWTWXML.AutoSize = true; + this.cbWTWXML.Location = new System.Drawing.Point(8, 51); + this.cbWTWXML.Name = "cbWTWXML"; + this.cbWTWXML.Size = new System.Drawing.Size(48, 17); + this.cbWTWXML.TabIndex = 17; + this.cbWTWXML.Text = "XML"; + this.cbWTWXML.UseVisualStyleBackColor = true; + this.cbWTWXML.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // label9 + // bnBrowseWTWRSS // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(11, 22); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(51, 13); - this.label9.TabIndex = 0; - this.label9.Text = "Host:Port"; + this.bnBrowseWTWRSS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnBrowseWTWRSS.Location = new System.Drawing.Point(540, 18); + this.bnBrowseWTWRSS.Name = "bnBrowseWTWRSS"; + this.bnBrowseWTWRSS.Size = new System.Drawing.Size(75, 23); + this.bnBrowseWTWRSS.TabIndex = 2; + this.bnBrowseWTWRSS.Text = "Browse..."; + this.bnBrowseWTWRSS.UseVisualStyleBackColor = true; + this.bnBrowseWTWRSS.Click += new System.EventHandler(this.bnBrowseWTWRSS_Click); // - // groupBox6 + // txtWTWRSS // - this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtWTWRSS.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox6.Controls.Add(this.bnUTBrowseResumeDat); - this.groupBox6.Controls.Add(this.txtUTResumeDatPath); - this.groupBox6.Controls.Add(this.bnRSSBrowseuTorrent); - this.groupBox6.Controls.Add(this.label27); - this.groupBox6.Controls.Add(this.label26); - this.groupBox6.Controls.Add(this.txtRSSuTorrentPath); - this.groupBox6.Location = new System.Drawing.Point(3, 250); - this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(500, 80); - this.groupBox6.TabIndex = 5; - this.groupBox6.TabStop = false; - this.groupBox6.Text = "µTorrent"; + this.txtWTWRSS.Location = new System.Drawing.Point(64, 20); + this.txtWTWRSS.Name = "txtWTWRSS"; + this.txtWTWRSS.Size = new System.Drawing.Size(444, 20); + this.txtWTWRSS.TabIndex = 1; // - // bnUTBrowseResumeDat + // cbWTWRSS // - this.bnUTBrowseResumeDat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnUTBrowseResumeDat.Location = new System.Drawing.Point(419, 46); - this.bnUTBrowseResumeDat.Name = "bnUTBrowseResumeDat"; - this.bnUTBrowseResumeDat.Size = new System.Drawing.Size(75, 23); - this.bnUTBrowseResumeDat.TabIndex = 5; - this.bnUTBrowseResumeDat.Text = "Bro&wse..."; - this.bnUTBrowseResumeDat.UseVisualStyleBackColor = true; - this.bnUTBrowseResumeDat.Click += new System.EventHandler(this.bnUTBrowseResumeDat_Click); + this.cbWTWRSS.AutoSize = true; + this.cbWTWRSS.Location = new System.Drawing.Point(8, 22); + this.cbWTWRSS.Name = "cbWTWRSS"; + this.cbWTWRSS.Size = new System.Drawing.Size(48, 17); + this.cbWTWRSS.TabIndex = 0; + this.cbWTWRSS.Text = "RSS"; + this.cbWTWRSS.UseVisualStyleBackColor = true; + this.cbWTWRSS.CheckedChanged += new System.EventHandler(this.EnableDisable); // - // txtUTResumeDatPath + // label17 // - this.txtUTResumeDatPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtUTResumeDatPath.Location = new System.Drawing.Point(75, 48); - this.txtUTResumeDatPath.Name = "txtUTResumeDatPath"; - this.txtUTResumeDatPath.Size = new System.Drawing.Size(338, 20); - this.txtUTResumeDatPath.TabIndex = 4; + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(212, 109); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(79, 13); + this.label17.TabIndex = 7; + this.label17.Text = "days worth and"; // - // bnRSSBrowseuTorrent + // label16 // - this.bnRSSBrowseuTorrent.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bnRSSBrowseuTorrent.Location = new System.Drawing.Point(419, 16); - this.bnRSSBrowseuTorrent.Name = "bnRSSBrowseuTorrent"; - this.bnRSSBrowseuTorrent.Size = new System.Drawing.Size(75, 23); - this.bnRSSBrowseuTorrent.TabIndex = 2; - this.bnRSSBrowseuTorrent.Text = "&Browse..."; - this.bnRSSBrowseuTorrent.UseVisualStyleBackColor = true; - this.bnRSSBrowseuTorrent.Click += new System.EventHandler(this.bnRSSBrowseuTorrent_Click); + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(120, 109); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(52, 13); + this.label16.TabIndex = 5; + this.label16.Text = "shows, or"; // - // label27 + // label15 // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(7, 22); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(62, 13); - this.label27.TabIndex = 0; - this.label27.Text = "A&pplication:"; + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(9, 109); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(71, 13); + this.label15.TabIndex = 3; + this.label15.Text = "No more than"; // - // label26 + // txtExportRSSMaxDays + // + this.txtExportRSSMaxDays.Location = new System.Drawing.Point(178, 106); + this.txtExportRSSMaxDays.Name = "txtExportRSSMaxDays"; + this.txtExportRSSMaxDays.Size = new System.Drawing.Size(28, 20); + this.txtExportRSSMaxDays.TabIndex = 6; + this.txtExportRSSMaxDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + // + // txtExportRSSMaxShows + // + this.txtExportRSSMaxShows.Location = new System.Drawing.Point(86, 106); + this.txtExportRSSMaxShows.Name = "txtExportRSSMaxShows"; + this.txtExportRSSMaxShows.Size = new System.Drawing.Size(28, 20); + this.txtExportRSSMaxShows.TabIndex = 4; + this.txtExportRSSMaxShows.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + // + // tbFilesAndFolders // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(7, 51); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(62, 13); - this.label26.TabIndex = 3; - this.label26.Text = "resume.&dat:"; + this.tbFilesAndFolders.Controls.Add(this.label53); + this.tbFilesAndFolders.Controls.Add(this.label54); + this.tbFilesAndFolders.Controls.Add(this.tbPercentBetter); + this.tbFilesAndFolders.Controls.Add(this.tbPriorityOverrideTerms); + this.tbFilesAndFolders.Controls.Add(this.label52); + this.tbFilesAndFolders.Controls.Add(this.txtSeasonFormat); + this.tbFilesAndFolders.Controls.Add(this.txtKeepTogether); + this.tbFilesAndFolders.Controls.Add(this.txtMaxSampleSize); + this.tbFilesAndFolders.Controls.Add(this.txtSpecialsFolderName); + this.tbFilesAndFolders.Controls.Add(this.txtOtherExtensions); + this.tbFilesAndFolders.Controls.Add(this.txtVideoExtensions); + this.tbFilesAndFolders.Controls.Add(this.label47); + this.tbFilesAndFolders.Controls.Add(this.bnTags); + this.tbFilesAndFolders.Controls.Add(this.label39); + this.tbFilesAndFolders.Controls.Add(this.cbKeepTogetherMode); + this.tbFilesAndFolders.Controls.Add(this.bnReplaceRemove); + this.tbFilesAndFolders.Controls.Add(this.bnReplaceAdd); + this.tbFilesAndFolders.Controls.Add(this.label3); + this.tbFilesAndFolders.Controls.Add(this.ReplacementsGrid); + this.tbFilesAndFolders.Controls.Add(this.label19); + this.tbFilesAndFolders.Controls.Add(this.label22); + this.tbFilesAndFolders.Controls.Add(this.label14); + this.tbFilesAndFolders.Controls.Add(this.label13); + this.tbFilesAndFolders.Controls.Add(this.cbKeepTogether); + this.tbFilesAndFolders.Controls.Add(this.cbForceLower); + this.tbFilesAndFolders.Controls.Add(this.cbIgnoreSamples); + this.tbFilesAndFolders.Controls.Add(this.cbLeadingZero); + this.tbFilesAndFolders.Location = new System.Drawing.Point(4, 40); + this.tbFilesAndFolders.Name = "tbFilesAndFolders"; + this.tbFilesAndFolders.Padding = new System.Windows.Forms.Padding(3); + this.tbFilesAndFolders.Size = new System.Drawing.Size(529, 426); + this.tbFilesAndFolders.TabIndex = 1; + this.tbFilesAndFolders.Text = "Files and Folders"; + this.tbFilesAndFolders.UseVisualStyleBackColor = true; // - // txtRSSuTorrentPath + // label53 // - this.txtRSSuTorrentPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtRSSuTorrentPath.Location = new System.Drawing.Point(75, 19); - this.txtRSSuTorrentPath.Name = "txtRSSuTorrentPath"; - this.txtRSSuTorrentPath.Size = new System.Drawing.Size(338, 20); - this.txtRSSuTorrentPath.TabIndex = 1; + this.label53.AutoSize = true; + this.label53.Location = new System.Drawing.Point(3, 382); + this.label53.Name = "label53"; + this.label53.Size = new System.Drawing.Size(129, 13); + this.label53.TabIndex = 30; + this.label53.Text = "Consider a file better if it is"; // - // RSSGrid + // label54 // - this.RSSGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.RSSGrid.BackColor = System.Drawing.SystemColors.Window; - this.RSSGrid.EnableSort = true; - this.RSSGrid.Location = new System.Drawing.Point(3, 36); - this.RSSGrid.Name = "RSSGrid"; - this.RSSGrid.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; - this.RSSGrid.SelectionMode = SourceGrid.GridSelectionMode.Cell; - this.RSSGrid.Size = new System.Drawing.Size(500, 91); - this.RSSGrid.TabIndex = 1; - this.RSSGrid.TabStop = true; - this.RSSGrid.ToolTipText = ""; + this.label54.AutoSize = true; + this.label54.Location = new System.Drawing.Point(171, 382); + this.label54.Name = "label54"; + this.label54.Size = new System.Drawing.Size(129, 13); + this.label54.TabIndex = 32; + this.label54.Text = "% higher resulution/longer"; // - // bnRSSRemove + // tbPercentBetter // - this.bnRSSRemove.Location = new System.Drawing.Point(84, 136); - this.bnRSSRemove.Name = "bnRSSRemove"; - this.bnRSSRemove.Size = new System.Drawing.Size(75, 23); - this.bnRSSRemove.TabIndex = 3; - this.bnRSSRemove.Text = "&Remove"; - this.bnRSSRemove.UseVisualStyleBackColor = true; - this.bnRSSRemove.Click += new System.EventHandler(this.bnRSSRemove_Click); + this.tbPercentBetter.Location = new System.Drawing.Point(137, 378); + this.tbPercentBetter.Name = "tbPercentBetter"; + this.tbPercentBetter.Size = new System.Drawing.Size(28, 20); + this.tbPercentBetter.TabIndex = 31; // - // bnRSSAdd + // tbPriorityOverrideTerms // - this.bnRSSAdd.Location = new System.Drawing.Point(3, 136); - this.bnRSSAdd.Name = "bnRSSAdd"; - this.bnRSSAdd.Size = new System.Drawing.Size(75, 23); - this.bnRSSAdd.TabIndex = 2; - this.bnRSSAdd.Text = "&Add"; - this.bnRSSAdd.UseVisualStyleBackColor = true; - this.bnRSSAdd.Click += new System.EventHandler(this.bnRSSAdd_Click); + this.tbPriorityOverrideTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbPriorityOverrideTerms.Location = new System.Drawing.Point(111, 352); + this.tbPriorityOverrideTerms.Name = "tbPriorityOverrideTerms"; + this.tbPriorityOverrideTerms.Size = new System.Drawing.Size(410, 20); + this.tbPriorityOverrideTerms.TabIndex = 29; // - // bnRSSGo + // label52 // - this.bnRSSGo.Location = new System.Drawing.Point(165, 136); - this.bnRSSGo.Name = "bnRSSGo"; - this.bnRSSGo.Size = new System.Drawing.Size(75, 23); - this.bnRSSGo.TabIndex = 4; - this.bnRSSGo.Text = "&Open"; - this.bnRSSGo.UseVisualStyleBackColor = true; - this.bnRSSGo.Click += new System.EventHandler(this.bnRSSGo_Click); + this.label52.AutoSize = true; + this.label52.Location = new System.Drawing.Point(4, 355); + this.label52.Name = "label52"; + this.label52.Size = new System.Drawing.Size(110, 13); + this.label52.TabIndex = 28; + this.label52.Text = "Priority override terms:"; // - // label25 + // txtSeasonFormat // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(3, 13); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(99, 13); - this.label25.TabIndex = 0; - this.label25.Text = "Torrent RSS URLs:"; + this.txtSeasonFormat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSeasonFormat.Location = new System.Drawing.Point(113, 280); + this.txtSeasonFormat.Name = "txtSeasonFormat"; + this.txtSeasonFormat.Size = new System.Drawing.Size(410, 20); + this.txtSeasonFormat.TabIndex = 26; // - // tpTreeColoring + // txtKeepTogether // - this.tpTreeColoring.Controls.Add(this.label7); - this.tpTreeColoring.Controls.Add(this.cboShowStatus); - this.tpTreeColoring.Controls.Add(this.label5); - this.tpTreeColoring.Controls.Add(this.txtShowStatusColor); - this.tpTreeColoring.Controls.Add(this.btnSelectColor); - this.tpTreeColoring.Controls.Add(this.bnRemoveDefinedColor); - this.tpTreeColoring.Controls.Add(this.btnAddShowStatusColoring); - this.tpTreeColoring.Controls.Add(this.lvwDefinedColors); - this.tpTreeColoring.Location = new System.Drawing.Point(4, 40); - this.tpTreeColoring.Name = "tpTreeColoring"; - this.tpTreeColoring.Padding = new System.Windows.Forms.Padding(3); - this.tpTreeColoring.Size = new System.Drawing.Size(509, 489); - this.tpTreeColoring.TabIndex = 7; - this.tpTreeColoring.Text = "Tree Colouring"; - this.tpTreeColoring.UseVisualStyleBackColor = true; + this.txtKeepTogether.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtKeepTogether.Location = new System.Drawing.Point(204, 206); + this.txtKeepTogether.Name = "txtKeepTogether"; + this.txtKeepTogether.Size = new System.Drawing.Size(319, 20); + this.txtKeepTogether.TabIndex = 23; // - // label7 + // txtMaxSampleSize // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(3, 328); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(40, 13); - this.label7.TabIndex = 8; - this.label7.Text = "&Status:"; + this.txtMaxSampleSize.Location = new System.Drawing.Point(172, 304); + this.txtMaxSampleSize.Name = "txtMaxSampleSize"; + this.txtMaxSampleSize.Size = new System.Drawing.Size(53, 20); + this.txtMaxSampleSize.TabIndex = 14; + this.txtMaxSampleSize.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); // - // cboShowStatus + // txtSpecialsFolderName // - this.cboShowStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtSpecialsFolderName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.cboShowStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboShowStatus.FormattingEnabled = true; - this.cboShowStatus.Location = new System.Drawing.Point(51, 325); - this.cboShowStatus.Name = "cboShowStatus"; - this.cboShowStatus.Size = new System.Drawing.Size(452, 21); - this.cboShowStatus.TabIndex = 7; + this.txtSpecialsFolderName.Location = new System.Drawing.Point(113, 254); + this.txtSpecialsFolderName.Name = "txtSpecialsFolderName"; + this.txtSpecialsFolderName.Size = new System.Drawing.Size(410, 20); + this.txtSpecialsFolderName.TabIndex = 12; // - // label5 + // txtOtherExtensions // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(3, 360); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(58, 13); - this.label5.TabIndex = 6; - this.label5.Text = "&Text Color:"; + this.txtOtherExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtOtherExtensions.Location = new System.Drawing.Point(99, 154); + this.txtOtherExtensions.Name = "txtOtherExtensions"; + this.txtOtherExtensions.Size = new System.Drawing.Size(424, 20); + this.txtOtherExtensions.TabIndex = 7; // - // txtShowStatusColor + // txtVideoExtensions // - this.txtShowStatusColor.Location = new System.Drawing.Point(67, 357); - this.txtShowStatusColor.Name = "txtShowStatusColor"; - this.txtShowStatusColor.Size = new System.Drawing.Size(100, 20); - this.txtShowStatusColor.TabIndex = 5; - this.txtShowStatusColor.TextChanged += new System.EventHandler(this.txtShowStatusColor_TextChanged); + this.txtVideoExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtVideoExtensions.Location = new System.Drawing.Point(99, 128); + this.txtVideoExtensions.Name = "txtVideoExtensions"; + this.txtVideoExtensions.Size = new System.Drawing.Size(526, 20); + this.txtVideoExtensions.TabIndex = 5; // - // btnSelectColor + // label47 // - this.btnSelectColor.Location = new System.Drawing.Point(173, 355); - this.btnSelectColor.Name = "btnSelectColor"; - this.btnSelectColor.Size = new System.Drawing.Size(75, 23); - this.btnSelectColor.TabIndex = 4; - this.btnSelectColor.Text = "Select &Color"; - this.btnSelectColor.UseVisualStyleBackColor = true; - this.btnSelectColor.Click += new System.EventHandler(this.btnSelectColor_Click); + this.label47.AutoSize = true; + this.label47.Location = new System.Drawing.Point(6, 283); + this.label47.Name = "label47"; + this.label47.Size = new System.Drawing.Size(112, 13); + this.label47.TabIndex = 25; + this.label47.Text = "&Seasons folder format:"; // - // bnRemoveDefinedColor + // bnTags // - this.bnRemoveDefinedColor.Enabled = false; - this.bnRemoveDefinedColor.Location = new System.Drawing.Point(6, 296); - this.bnRemoveDefinedColor.Name = "bnRemoveDefinedColor"; - this.bnRemoveDefinedColor.Size = new System.Drawing.Size(75, 23); - this.bnRemoveDefinedColor.TabIndex = 3; - this.bnRemoveDefinedColor.Text = "&Remove"; - this.bnRemoveDefinedColor.UseVisualStyleBackColor = true; - this.bnRemoveDefinedColor.Click += new System.EventHandler(this.bnRemoveDefinedColor_Click); + this.bnTags.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bnTags.Location = new System.Drawing.Point(568, 328); + this.bnTags.Name = "bnTags"; + this.bnTags.Size = new System.Drawing.Size(75, 23); + this.bnTags.TabIndex = 24; + this.bnTags.Text = "Tags..."; + this.bnTags.UseVisualStyleBackColor = true; + this.bnTags.Click += new System.EventHandler(this.bnTags_Click); // - // btnAddShowStatusColoring + // label39 // - this.btnAddShowStatusColoring.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnAddShowStatusColoring.Location = new System.Drawing.Point(428, 352); - this.btnAddShowStatusColoring.Name = "btnAddShowStatusColoring"; - this.btnAddShowStatusColoring.Size = new System.Drawing.Size(75, 23); - this.btnAddShowStatusColoring.TabIndex = 3; - this.btnAddShowStatusColoring.Text = "&Add"; - this.btnAddShowStatusColoring.UseVisualStyleBackColor = true; - this.btnAddShowStatusColoring.Click += new System.EventHandler(this.btnAddShowStatusColoring_Click); + this.label39.AutoSize = true; + this.label39.Location = new System.Drawing.Point(25, 210); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(21, 13); + this.label39.TabIndex = 22; + this.label39.Text = "Do"; // - // lvwDefinedColors + // cbKeepTogetherMode // - this.lvwDefinedColors.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lvwDefinedColors.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colShowStatus, - this.colColor}); - this.lvwDefinedColors.GridLines = true; - this.lvwDefinedColors.Location = new System.Drawing.Point(6, 6); - this.lvwDefinedColors.MultiSelect = false; - this.lvwDefinedColors.Name = "lvwDefinedColors"; - this.lvwDefinedColors.Size = new System.Drawing.Size(497, 284); - this.lvwDefinedColors.TabIndex = 0; - this.lvwDefinedColors.UseCompatibleStateImageBehavior = false; - this.lvwDefinedColors.View = System.Windows.Forms.View.Details; - this.lvwDefinedColors.SelectedIndexChanged += new System.EventHandler(this.lvwDefinedColors_SelectedIndexChanged); - this.lvwDefinedColors.DoubleClick += new System.EventHandler(this.lvwDefinedColors_DoubleClick); + this.cbKeepTogetherMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbKeepTogetherMode.FormattingEnabled = true; + this.cbKeepTogetherMode.Items.AddRange(new object[] { + "All", + "All but these", + "Just"}); + this.cbKeepTogetherMode.Location = new System.Drawing.Point(52, 207); + this.cbKeepTogetherMode.Name = "cbKeepTogetherMode"; + this.cbKeepTogetherMode.Size = new System.Drawing.Size(146, 21); + this.cbKeepTogetherMode.Sorted = true; + this.cbKeepTogetherMode.TabIndex = 21; + this.cbKeepTogetherMode.SelectedIndexChanged += new System.EventHandler(this.cbKeepTogetherMode_SelectedIndexChanged); // - // colShowStatus + // bnReplaceRemove // - this.colShowStatus.Text = "Show Status"; - this.colShowStatus.Width = 297; + this.bnReplaceRemove.Location = new System.Drawing.Point(90, 91); + this.bnReplaceRemove.Name = "bnReplaceRemove"; + this.bnReplaceRemove.Size = new System.Drawing.Size(75, 23); + this.bnReplaceRemove.TabIndex = 3; + this.bnReplaceRemove.Text = "&Remove"; + this.bnReplaceRemove.UseVisualStyleBackColor = true; + this.bnReplaceRemove.Click += new System.EventHandler(this.bnReplaceRemove_Click); // - // colColor + // bnReplaceAdd // - this.colColor.Text = "Color"; - this.colColor.Width = 92; + this.bnReplaceAdd.Location = new System.Drawing.Point(9, 91); + this.bnReplaceAdd.Name = "bnReplaceAdd"; + this.bnReplaceAdd.Size = new System.Drawing.Size(75, 23); + this.bnReplaceAdd.TabIndex = 2; + this.bnReplaceAdd.Text = "&Add"; + this.bnReplaceAdd.UseVisualStyleBackColor = true; + this.bnReplaceAdd.Click += new System.EventHandler(this.bnReplaceAdd_Click); // - // tpBulkAdd + // label3 // - this.tpBulkAdd.Controls.Add(this.groupBox9); - this.tpBulkAdd.Controls.Add(this.groupBox8); - this.tpBulkAdd.Location = new System.Drawing.Point(4, 40); - this.tpBulkAdd.Name = "tpBulkAdd"; - this.tpBulkAdd.Padding = new System.Windows.Forms.Padding(3); - this.tpBulkAdd.Size = new System.Drawing.Size(509, 489); - this.tpBulkAdd.TabIndex = 10; - this.tpBulkAdd.Text = "Bulk/Auto Add"; - this.tpBulkAdd.UseVisualStyleBackColor = true; + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 3); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(120, 13); + this.label3.TabIndex = 0; + this.label3.Text = "Filename Replacements"; // - // groupBox9 + // ReplacementsGrid // - this.groupBox9.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.ReplacementsGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox9.Controls.Add(this.chkForceBulkAddToUseSettingsOnly); - this.groupBox9.Controls.Add(this.cbIgnoreRecycleBin); - this.groupBox9.Controls.Add(this.cbIgnoreNoVideoFolders); - this.groupBox9.Location = new System.Drawing.Point(6, 10); - this.groupBox9.Name = "groupBox9"; - this.groupBox9.Size = new System.Drawing.Size(497, 111); - this.groupBox9.TabIndex = 16; - this.groupBox9.TabStop = false; - this.groupBox9.Text = "Bulk Add"; + this.ReplacementsGrid.BackColor = System.Drawing.SystemColors.Window; + this.ReplacementsGrid.EnableSort = true; + this.ReplacementsGrid.Location = new System.Drawing.Point(6, 19); + this.ReplacementsGrid.Name = "ReplacementsGrid"; + this.ReplacementsGrid.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; + this.ReplacementsGrid.SelectionMode = SourceGrid.GridSelectionMode.Cell; + this.ReplacementsGrid.Size = new System.Drawing.Size(517, 62); + this.ReplacementsGrid.TabIndex = 1; + this.ReplacementsGrid.TabStop = true; + this.ReplacementsGrid.ToolTipText = ""; // - // chkForceBulkAddToUseSettingsOnly + // label19 // - this.chkForceBulkAddToUseSettingsOnly.AutoSize = true; - this.chkForceBulkAddToUseSettingsOnly.Location = new System.Drawing.Point(6, 65); - this.chkForceBulkAddToUseSettingsOnly.Name = "chkForceBulkAddToUseSettingsOnly"; - this.chkForceBulkAddToUseSettingsOnly.Size = new System.Drawing.Size(248, 17); - this.chkForceBulkAddToUseSettingsOnly.TabIndex = 15; - this.chkForceBulkAddToUseSettingsOnly.Text = "Force to Use Season Words from Settings Only"; - this.toolTip1.SetToolTip(this.chkForceBulkAddToUseSettingsOnly, "If set then Bulk Add just uses the season words from settings. If not set (recomm" + - "ended) then Bulk Add finds addition season words from each show\'s configuration." + - ""); - this.chkForceBulkAddToUseSettingsOnly.UseVisualStyleBackColor = true; + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(228, 307); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(55, 13); + this.label19.TabIndex = 15; + this.label19.Text = "MB in size"; // - // cbIgnoreRecycleBin + // label22 // - this.cbIgnoreRecycleBin.AutoSize = true; - this.cbIgnoreRecycleBin.Location = new System.Drawing.Point(6, 42); - this.cbIgnoreRecycleBin.Name = "cbIgnoreRecycleBin"; - this.cbIgnoreRecycleBin.Size = new System.Drawing.Size(116, 17); - this.cbIgnoreRecycleBin.TabIndex = 14; - this.cbIgnoreRecycleBin.Text = "Ignore &Recycle Bin"; - this.toolTip1.SetToolTip(this.cbIgnoreRecycleBin, "If set then Bulk Add ignores all files in the Recycle Bin"); - this.cbIgnoreRecycleBin.UseVisualStyleBackColor = true; + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(3, 157); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(89, 13); + this.label22.TabIndex = 6; + this.label22.Text = "&Other extensions:"; // - // cbIgnoreNoVideoFolders + // label14 // - this.cbIgnoreNoVideoFolders.AutoSize = true; - this.cbIgnoreNoVideoFolders.Location = new System.Drawing.Point(6, 19); - this.cbIgnoreNoVideoFolders.Name = "cbIgnoreNoVideoFolders"; - this.cbIgnoreNoVideoFolders.Size = new System.Drawing.Size(225, 17); - this.cbIgnoreNoVideoFolders.TabIndex = 13; - this.cbIgnoreNoVideoFolders.Text = "&Only Include Folders containing Video files"; - this.toolTip1.SetToolTip(this.cbIgnoreNoVideoFolders, "If set then only folders that contain video files are considered for the \'Bulk Ad" + - "d\' feature"); - this.cbIgnoreNoVideoFolders.UseVisualStyleBackColor = true; + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(3, 131); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(90, 13); + this.label14.TabIndex = 4; + this.label14.Text = "&Video extensions:"; // - // groupBox8 + // label13 // - this.groupBox8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox8.Controls.Add(this.chkAutoSearchForDownloadedFiles); - this.groupBox8.Controls.Add(this.label43); - this.groupBox8.Controls.Add(this.label44); - this.groupBox8.Controls.Add(this.tbIgnoreSuffixes); - this.groupBox8.Controls.Add(this.tbMovieTerms); - this.groupBox8.Location = new System.Drawing.Point(6, 127); - this.groupBox8.Name = "groupBox8"; - this.groupBox8.Size = new System.Drawing.Size(497, 107); - this.groupBox8.TabIndex = 13; - this.groupBox8.TabStop = false; - this.groupBox8.Text = "Auto Add"; + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(6, 254); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(108, 13); + this.label13.TabIndex = 11; + this.label13.Text = "&Specials folder name:"; // - // chkAutoSearchForDownloadedFiles + // cbKeepTogether // - this.chkAutoSearchForDownloadedFiles.AutoSize = true; - this.chkAutoSearchForDownloadedFiles.Location = new System.Drawing.Point(6, 19); - this.chkAutoSearchForDownloadedFiles.Name = "chkAutoSearchForDownloadedFiles"; - this.chkAutoSearchForDownloadedFiles.Size = new System.Drawing.Size(186, 17); - this.chkAutoSearchForDownloadedFiles.TabIndex = 16; - this.chkAutoSearchForDownloadedFiles.Text = "Notify when new shows are found"; - this.chkAutoSearchForDownloadedFiles.UseVisualStyleBackColor = true; + this.cbKeepTogether.AutoSize = true; + this.cbKeepTogether.Location = new System.Drawing.Point(6, 180); + this.cbKeepTogether.Name = "cbKeepTogether"; + this.cbKeepTogether.Size = new System.Drawing.Size(251, 17); + this.cbKeepTogether.TabIndex = 8; + this.cbKeepTogether.Text = "&Copy/Move files with same base name as video"; + this.cbKeepTogether.UseVisualStyleBackColor = true; + this.cbKeepTogether.CheckedChanged += new System.EventHandler(this.cbKeepTogether_CheckedChanged); // - // label43 + // cbForceLower // - this.label43.AutoSize = true; - this.label43.Location = new System.Drawing.Point(3, 69); - this.label43.Name = "label43"; - this.label43.Size = new System.Drawing.Size(78, 13); - this.label43.TabIndex = 14; - this.label43.Text = "&Ignore suffixes:"; + this.cbForceLower.AutoSize = true; + this.cbForceLower.Location = new System.Drawing.Point(6, 329); + this.cbForceLower.Name = "cbForceLower"; + this.cbForceLower.Size = new System.Drawing.Size(167, 17); + this.cbForceLower.TabIndex = 16; + this.cbForceLower.Text = "&Make all filenames lower case"; + this.cbForceLower.UseVisualStyleBackColor = true; // - // label44 + // cbIgnoreSamples // - this.label44.AutoSize = true; - this.label44.Location = new System.Drawing.Point(3, 43); - this.label44.Name = "label44"; - this.label44.Size = new System.Drawing.Size(71, 13); - this.label44.TabIndex = 12; - this.label44.Text = "&Movie Terms:"; + this.cbIgnoreSamples.AutoSize = true; + this.cbIgnoreSamples.Location = new System.Drawing.Point(6, 306); + this.cbIgnoreSamples.Name = "cbIgnoreSamples"; + this.cbIgnoreSamples.Size = new System.Drawing.Size(166, 17); + this.cbIgnoreSamples.TabIndex = 13; + this.cbIgnoreSamples.Text = "&Ignore \"sample\" videos, up to"; + this.cbIgnoreSamples.UseVisualStyleBackColor = true; // - // tbIgnoreSuffixes + // cbLeadingZero // - this.tbIgnoreSuffixes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbIgnoreSuffixes.Location = new System.Drawing.Point(99, 66); - this.tbIgnoreSuffixes.Name = "tbIgnoreSuffixes"; - this.tbIgnoreSuffixes.Size = new System.Drawing.Size(395, 20); - this.tbIgnoreSuffixes.TabIndex = 15; - this.toolTip1.SetToolTip(this.tbIgnoreSuffixes, "These terms and any text after them will be ignored when\r\nsearching on TVDB for t" + - "he show title based on the filename."); + this.cbLeadingZero.AutoSize = true; + this.cbLeadingZero.Location = new System.Drawing.Point(6, 234); + this.cbLeadingZero.Name = "cbLeadingZero"; + this.cbLeadingZero.Size = new System.Drawing.Size(170, 17); + this.cbLeadingZero.TabIndex = 10; + this.cbLeadingZero.Text = "&Leading 0 on Season numbers"; + this.cbLeadingZero.UseVisualStyleBackColor = true; // - // tbMovieTerms + // tbGeneral // - this.tbMovieTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbMovieTerms.Location = new System.Drawing.Point(99, 40); - this.tbMovieTerms.Name = "tbMovieTerms"; - this.tbMovieTerms.Size = new System.Drawing.Size(395, 20); - this.tbMovieTerms.TabIndex = 13; - this.toolTip1.SetToolTip(this.tbMovieTerms, "If a filename contains any of these terms then it is assumed\r\nthat it is a Film a" + - "nd not a TV Show. Hence \'Auto Add\' is not\r\ninvoked for this file."); + this.tbGeneral.Controls.Add(this.cbShowCollections); + this.tbGeneral.Controls.Add(this.label37); + this.tbGeneral.Controls.Add(this.label38); + this.tbGeneral.Controls.Add(this.tbPercentDirty); + this.tbGeneral.Controls.Add(this.txtParallelDownloads); + this.tbGeneral.Controls.Add(this.txtWTWDays); + this.tbGeneral.Controls.Add(this.cbMode); + this.tbGeneral.Controls.Add(this.label34); + this.tbGeneral.Controls.Add(this.label10); + this.tbGeneral.Controls.Add(this.cbLookForAirdate); + this.tbGeneral.Controls.Add(this.cbLanguages); + this.tbGeneral.Controls.Add(this.label21); + this.tbGeneral.Controls.Add(this.label20); + this.tbGeneral.Controls.Add(this.label2); + this.tbGeneral.Location = new System.Drawing.Point(4, 40); + this.tbGeneral.Name = "tbGeneral"; + this.tbGeneral.Padding = new System.Windows.Forms.Padding(3); + this.tbGeneral.Size = new System.Drawing.Size(529, 426); + this.tbGeneral.TabIndex = 0; + this.tbGeneral.Text = "General"; + this.tbGeneral.UseVisualStyleBackColor = true; // - // tpSubtitles + // label37 // - this.tpSubtitles.Controls.Add(this.cbTxtToSub); - this.tpSubtitles.Controls.Add(this.label46); - this.tpSubtitles.Controls.Add(this.txtSubtitleExtensions); - this.tpSubtitles.Controls.Add(this.chkRetainLanguageSpecificSubtitles); - this.tpSubtitles.Location = new System.Drawing.Point(4, 40); - this.tpSubtitles.Name = "tpSubtitles"; - this.tpSubtitles.Padding = new System.Windows.Forms.Padding(3); - this.tpSubtitles.Size = new System.Drawing.Size(509, 489); - this.tpSubtitles.TabIndex = 11; - this.tpSubtitles.Text = "Subtitles"; - this.tpSubtitles.UseVisualStyleBackColor = true; + this.label37.AutoSize = true; + this.label37.Location = new System.Drawing.Point(11, 62); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(114, 13); + this.label37.TabIndex = 20; + this.label37.Text = "Refresh entire series if"; // - // cbTxtToSub + // label38 // - this.cbTxtToSub.AutoSize = true; - this.cbTxtToSub.Location = new System.Drawing.Point(6, 38); - this.cbTxtToSub.Name = "cbTxtToSub"; - this.cbTxtToSub.Size = new System.Drawing.Size(118, 17); - this.cbTxtToSub.TabIndex = 28; - this.cbTxtToSub.Text = "&Rename .txt to .sub"; - this.cbTxtToSub.UseVisualStyleBackColor = true; + this.label38.AutoSize = true; + this.label38.Location = new System.Drawing.Point(163, 62); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(132, 13); + this.label38.TabIndex = 22; + this.label38.Text = "% of episodes are updated"; // - // label46 + // tbPercentDirty // - this.label46.AutoSize = true; - this.label46.Location = new System.Drawing.Point(3, 66); - this.label46.Name = "label46"; - this.label46.Size = new System.Drawing.Size(98, 13); - this.label46.TabIndex = 26; - this.label46.Text = "&Subtitle extensions:"; + this.tbPercentDirty.Location = new System.Drawing.Point(128, 59); + this.tbPercentDirty.Name = "tbPercentDirty"; + this.tbPercentDirty.Size = new System.Drawing.Size(28, 20); + this.tbPercentDirty.TabIndex = 21; // - // txtSubtitleExtensions + // txtParallelDownloads // - this.txtSubtitleExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSubtitleExtensions.Location = new System.Drawing.Point(107, 63); - this.txtSubtitleExtensions.Name = "txtSubtitleExtensions"; - this.txtSubtitleExtensions.Size = new System.Drawing.Size(396, 20); - this.txtSubtitleExtensions.TabIndex = 27; + this.txtParallelDownloads.Location = new System.Drawing.Point(97, 35); + this.txtParallelDownloads.Name = "txtParallelDownloads"; + this.txtParallelDownloads.Size = new System.Drawing.Size(28, 20); + this.txtParallelDownloads.TabIndex = 12; + this.txtParallelDownloads.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); // - // chkRetainLanguageSpecificSubtitles + // txtWTWDays // - this.chkRetainLanguageSpecificSubtitles.AutoSize = true; - this.chkRetainLanguageSpecificSubtitles.Location = new System.Drawing.Point(6, 15); - this.chkRetainLanguageSpecificSubtitles.Name = "chkRetainLanguageSpecificSubtitles"; - this.chkRetainLanguageSpecificSubtitles.Size = new System.Drawing.Size(192, 17); - this.chkRetainLanguageSpecificSubtitles.TabIndex = 25; - this.chkRetainLanguageSpecificSubtitles.Text = "Retain &Language Specific Subtitles"; - this.chkRetainLanguageSpecificSubtitles.UseVisualStyleBackColor = true; + this.txtWTWDays.Location = new System.Drawing.Point(13, 9); + this.txtWTWDays.Name = "txtWTWDays"; + this.txtWTWDays.Size = new System.Drawing.Size(28, 20); + this.txtWTWDays.TabIndex = 1; + this.txtWTWDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TxtNumberOnlyKeyPress); + // + // cbMode + // + this.cbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbMode.FormattingEnabled = true; + this.cbMode.Items.AddRange(new object[] { + "Beta", + "Production"}); + this.cbMode.Location = new System.Drawing.Point(117, 130); + this.cbMode.Name = "cbMode"; + this.cbMode.Size = new System.Drawing.Size(146, 21); + this.cbMode.Sorted = true; + this.cbMode.TabIndex = 19; // - // folderBrowser + // label34 // - this.folderBrowser.ShowNewFolderButton = false; + this.label34.AutoSize = true; + this.label34.Location = new System.Drawing.Point(11, 133); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(37, 13); + this.label34.TabIndex = 18; + this.label34.Text = "&Mode:"; // - // openFile + // label10 // - this.openFile.Filter = "Torrent files (*.torrent)|*.torrent|All files (*.*)|*.*"; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(11, 109); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(100, 13); + this.label10.TabIndex = 16; + this.label10.Text = "&Preferred language:"; // - // cmDefaults + // cbLookForAirdate // - this.cmDefaults.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.KODIToolStripMenuItem, - this.pyTivoToolStripMenuItem, - this.mede8erToolStripMenuItem, - this.noneToolStripMenuItem}); - this.cmDefaults.Name = "cmDefaults"; - this.cmDefaults.Size = new System.Drawing.Size(121, 92); - this.cmDefaults.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.cmDefaults_ItemClicked); + this.cbLookForAirdate.AutoSize = true; + this.cbLookForAirdate.Location = new System.Drawing.Point(14, 85); + this.cbLookForAirdate.Name = "cbLookForAirdate"; + this.cbLookForAirdate.Size = new System.Drawing.Size(158, 17); + this.cbLookForAirdate.TabIndex = 15; + this.cbLookForAirdate.Text = "&Look for airdate in filenames"; + this.cbLookForAirdate.UseVisualStyleBackColor = true; // - // KODIToolStripMenuItem + // cbLanguages // - this.KODIToolStripMenuItem.Name = "KODIToolStripMenuItem"; - this.KODIToolStripMenuItem.Size = new System.Drawing.Size(120, 22); - this.KODIToolStripMenuItem.Tag = "1"; - this.KODIToolStripMenuItem.Text = "&KODI"; + this.cbLanguages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbLanguages.FormattingEnabled = true; + this.cbLanguages.Items.AddRange(new object[] { + "My Shows", + "Scan", + "When to Watch"}); + this.cbLanguages.Location = new System.Drawing.Point(117, 106); + this.cbLanguages.Name = "cbLanguages"; + this.cbLanguages.Size = new System.Drawing.Size(146, 21); + this.cbLanguages.Sorted = true; + this.cbLanguages.TabIndex = 17; // - // pyTivoToolStripMenuItem + // label21 // - this.pyTivoToolStripMenuItem.Name = "pyTivoToolStripMenuItem"; - this.pyTivoToolStripMenuItem.Size = new System.Drawing.Size(120, 22); - this.pyTivoToolStripMenuItem.Tag = "2"; - this.pyTivoToolStripMenuItem.Text = "&pyTivo"; + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(11, 38); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(82, 13); + this.label21.TabIndex = 11; + this.label21.Text = "&Download up to"; // - // mede8erToolStripMenuItem + // label20 // - this.mede8erToolStripMenuItem.Name = "mede8erToolStripMenuItem"; - this.mede8erToolStripMenuItem.Size = new System.Drawing.Size(120, 22); - this.mede8erToolStripMenuItem.Tag = "3"; - this.mede8erToolStripMenuItem.Text = "&Mede8er"; + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(131, 38); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(170, 13); + this.label20.TabIndex = 13; + this.label20.Text = "shows simultaneously from thetvdb"; // - // noneToolStripMenuItem + // label2 // - this.noneToolStripMenuItem.Name = "noneToolStripMenuItem"; - this.noneToolStripMenuItem.Size = new System.Drawing.Size(120, 22); - this.noneToolStripMenuItem.Tag = "4"; - this.noneToolStripMenuItem.Text = "&None"; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(47, 12); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(111, 13); + this.label2.TabIndex = 2; + this.label2.Text = "days counts as recent"; + // + // tpSearch + // + this.tpSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tpSearch.Controls.Add(this.tbGeneral); + this.tpSearch.Controls.Add(this.tbFilesAndFolders); + this.tpSearch.Controls.Add(this.tbAutoExport); + this.tpSearch.Controls.Add(this.tpScanOptions); + this.tpSearch.Controls.Add(this.tbFolderDeleting); + this.tpSearch.Controls.Add(this.tbMediaCenter); + this.tpSearch.Controls.Add(this.tbSearchFolders); + this.tpSearch.Controls.Add(this.tbuTorrentNZB); + this.tpSearch.Controls.Add(this.tpTreeColoring); + this.tpSearch.Controls.Add(this.tpBulkAdd); + this.tpSearch.Controls.Add(this.tpSubtitles); + this.tpSearch.Controls.Add(this.tabPage1); + this.tpSearch.Controls.Add(this.tpDisplay); + this.tpSearch.Location = new System.Drawing.Point(12, 12); + this.tpSearch.Multiline = true; + this.tpSearch.Name = "tpSearch"; + this.tpSearch.SelectedIndex = 0; + this.tpSearch.Size = new System.Drawing.Size(537, 470); + this.tpSearch.TabIndex = 0; + // + // cbShowCollections + // + this.cbShowCollections.AutoSize = true; + this.cbShowCollections.Location = new System.Drawing.Point(13, 157); + this.cbShowCollections.Name = "cbShowCollections"; + this.cbShowCollections.Size = new System.Drawing.Size(145, 17); + this.cbShowCollections.TabIndex = 23; + this.cbShowCollections.Text = "Multiple Show collections"; + this.cbShowCollections.UseVisualStyleBackColor = true; + // + // cbDeleteShowFromDisk + // + this.cbDeleteShowFromDisk.AutoSize = true; + this.cbDeleteShowFromDisk.Location = new System.Drawing.Point(16, 267); + this.cbDeleteShowFromDisk.Name = "cbDeleteShowFromDisk"; + this.cbDeleteShowFromDisk.Size = new System.Drawing.Size(269, 17); + this.cbDeleteShowFromDisk.TabIndex = 12; + this.cbDeleteShowFromDisk.Text = "Delete from disk when deleting show from database"; + this.cbDeleteShowFromDisk.UseVisualStyleBackColor = true; // // Preferences // @@ -2739,9 +2979,9 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.bnCancel; - this.ClientSize = new System.Drawing.Size(541, 576); + this.ClientSize = new System.Drawing.Size(561, 535); this.ControlBox = false; - this.Controls.Add(this.tabControl1); + this.Controls.Add(this.tpSearch); this.Controls.Add(this.bnCancel); this.Controls.Add(this.OKButton); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -2755,13 +2995,40 @@ private void InitializeComponent() this.Text = "Preferences"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Preferences_FormClosing); this.Load += new System.EventHandler(this.Preferences_Load); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.tabControl1.ResumeLayout(false); - this.tbGeneral.ResumeLayout(false); - this.tbGeneral.PerformLayout(); - this.tbFilesAndFolders.ResumeLayout(false); - this.tbFilesAndFolders.PerformLayout(); + this.cmDefaults.ResumeLayout(false); + this.tpDisplay.ResumeLayout(false); + this.tpDisplay.PerformLayout(); + this.tabPage1.ResumeLayout(false); + this.gbJSON.ResumeLayout(false); + this.gbJSON.PerformLayout(); + this.gbRSS.ResumeLayout(false); + this.gbRSS.PerformLayout(); + this.tpSubtitles.ResumeLayout(false); + this.tpSubtitles.PerformLayout(); + this.tpBulkAdd.ResumeLayout(false); + this.groupBox9.ResumeLayout(false); + this.groupBox9.PerformLayout(); + this.groupBox8.ResumeLayout(false); + this.groupBox8.PerformLayout(); + this.tpTreeColoring.ResumeLayout(false); + this.tpTreeColoring.PerformLayout(); + this.tbuTorrentNZB.ResumeLayout(false); + this.qBitTorrent.ResumeLayout(false); + this.qBitTorrent.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.tbSearchFolders.ResumeLayout(false); + this.tbSearchFolders.PerformLayout(); + this.tbMediaCenter.ResumeLayout(false); + this.tbMediaCenter.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.tbFolderDeleting.ResumeLayout(false); + this.tbFolderDeleting.PerformLayout(); + this.tpScanOptions.ResumeLayout(false); + this.tpScanOptions.PerformLayout(); this.tbAutoExport.ResumeLayout(false); this.groupBox7.ResumeLayout(false); this.groupBox7.PerformLayout(); @@ -2771,34 +3038,13 @@ private void InitializeComponent() this.groupBox4.PerformLayout(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); - this.tpScanOptions.ResumeLayout(false); - this.tpScanOptions.PerformLayout(); - this.tbFolderDeleting.ResumeLayout(false); - this.tbFolderDeleting.PerformLayout(); - this.tbMediaCenter.ResumeLayout(false); - this.tbMediaCenter.PerformLayout(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.tbSearchFolders.ResumeLayout(false); - this.tbSearchFolders.PerformLayout(); - this.tbuTorrentNZB.ResumeLayout(false); - this.tbuTorrentNZB.PerformLayout(); - this.qBitTorrent.ResumeLayout(false); - this.qBitTorrent.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox6.ResumeLayout(false); - this.groupBox6.PerformLayout(); - this.tpTreeColoring.ResumeLayout(false); - this.tpTreeColoring.PerformLayout(); - this.tpBulkAdd.ResumeLayout(false); - this.groupBox9.ResumeLayout(false); - this.groupBox9.PerformLayout(); - this.groupBox8.ResumeLayout(false); - this.groupBox8.PerformLayout(); - this.tpSubtitles.ResumeLayout(false); - this.tpSubtitles.PerformLayout(); - this.cmDefaults.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.tbFilesAndFolders.ResumeLayout(false); + this.tbFilesAndFolders.PerformLayout(); + this.tbGeneral.ResumeLayout(false); + this.tbGeneral.PerformLayout(); + this.tpSearch.ResumeLayout(false); this.ResumeLayout(false); } @@ -2806,202 +3052,132 @@ private void InitializeComponent() #endregion - private System.Windows.Forms.TabPage tpScanOptions; - private System.Windows.Forms.CheckBox cbSearchRSS; - private System.Windows.Forms.CheckBox cbRenameCheck; - private System.Windows.Forms.CheckBox cbMissing; - private System.Windows.Forms.CheckBox cbLeaveOriginals; - private System.Windows.Forms.CheckBox cbSearchLocally; - private System.Windows.Forms.Label label28; - private SourceGrid.Grid ReplacementsGrid; - private System.Windows.Forms.Button bnReplaceRemove; - private System.Windows.Forms.Button bnReplaceAdd; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.CheckBox cbCheckuTorrent; - private System.Windows.Forms.CheckBox cbAutoSelInMyShows; - private System.Windows.Forms.RadioButton rbFolderSeasonPoster; - private System.Windows.Forms.Button OKButton; private System.Windows.Forms.Button bnCancel; - - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Button bnBrowseWTWRSS; - private System.Windows.Forms.TextBox txtWTWRSS; - - private System.Windows.Forms.CheckBox cbWTWRSS; private System.Windows.Forms.SaveFileDialog saveFile; - - private System.Windows.Forms.TextBox txtWTWDays; - private System.Windows.Forms.Label label2; + private System.Windows.Forms.FolderBrowserDialog folderBrowser; + private System.Windows.Forms.OpenFileDialog openFile; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.ColorDialog colorDialog; + private System.Windows.Forms.ContextMenuStrip cmDefaults; + private System.Windows.Forms.ToolStripMenuItem KODIToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem pyTivoToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mede8erToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem; + private System.Windows.Forms.TabPage tpDisplay; + private System.Windows.Forms.CheckBox chkHideWtWSpoilers; + private System.Windows.Forms.CheckBox chkHideMyShowsSpoilers; + private System.Windows.Forms.RadioButton rbWTWScan; + private System.Windows.Forms.RadioButton rbWTWSearch; private System.Windows.Forms.ComboBox cbStartupTab; + private System.Windows.Forms.CheckBox cbAutoSelInMyShows; + private System.Windows.Forms.CheckBox cbShowEpisodePictures; + private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label6; - - private System.Windows.Forms.CheckBox cbNotificationIcon; - private System.Windows.Forms.TextBox txtVideoExtensions; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.TextBox txtExportRSSMaxDays; - - private System.Windows.Forms.TextBox txtExportRSSMaxShows; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.CheckBox cbKeepTogether; - private System.Windows.Forms.CheckBox cbLeadingZero; private System.Windows.Forms.CheckBox chkShowInTaskbar; - private System.Windows.Forms.CheckBox cbShowEpisodePictures; - private System.Windows.Forms.TextBox txtSpecialsFolderName; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tbGeneral; - private System.Windows.Forms.TabPage tbFilesAndFolders; - private System.Windows.Forms.TabPage tbAutoExport; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.GroupBox groupBox5; - private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.Button bnBrowseMissingCSV; - private System.Windows.Forms.CheckBox cbMissingCSV; - private System.Windows.Forms.TextBox txtMissingCSV; - private System.Windows.Forms.Button bnBrowseMissingXML; - private System.Windows.Forms.CheckBox cbMissingXML; - private System.Windows.Forms.TextBox txtMissingXML; - private System.Windows.Forms.Button bnBrowseFOXML; - - private System.Windows.Forms.CheckBox cbFOXML; - private System.Windows.Forms.TextBox txtFOXML; - - private System.Windows.Forms.Button bnBrowseRenamingXML; - private System.Windows.Forms.CheckBox cbRenamingXML; - private System.Windows.Forms.TextBox txtRenamingXML; - private System.Windows.Forms.CheckBox cbIgnoreSamples; - - private System.Windows.Forms.CheckBox cbForceLower; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.TextBox txtMaxSampleSize; - private System.Windows.Forms.Label label21; - private System.Windows.Forms.Label label20; - private System.Windows.Forms.TextBox txtParallelDownloads; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.TextBox txtOtherExtensions; - private System.Windows.Forms.TabPage tbSearchFolders; - private System.Windows.Forms.Button bnOpenSearchFolder; - private System.Windows.Forms.Button bnRemoveSearchFolder; - private System.Windows.Forms.Button bnAddSearchFolder; - private System.Windows.Forms.ListBox lbSearchFolders; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.FolderBrowserDialog folderBrowser; - private System.Windows.Forms.TabPage tbuTorrentNZB; - private System.Windows.Forms.Button bnRSSBrowseuTorrent; - private System.Windows.Forms.Button bnRSSGo; - private System.Windows.Forms.TextBox txtRSSuTorrentPath; - - private System.Windows.Forms.Label label25; + private System.Windows.Forms.CheckBox cbNotificationIcon; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.GroupBox gbJSON; + private System.Windows.Forms.Label label51; + private System.Windows.Forms.TextBox tbJSONFilenameToken; + private System.Windows.Forms.Label label50; + private System.Windows.Forms.TextBox tbJSONURLToken; + private System.Windows.Forms.Label label49; + private System.Windows.Forms.TextBox tbJSONRootNode; + private System.Windows.Forms.Label label48; + private System.Windows.Forms.TextBox tbJSONURL; + private System.Windows.Forms.GroupBox gbRSS; + private System.Windows.Forms.Label label45; + private System.Windows.Forms.TextBox tbPreferredRSSTerms; private SourceGrid.Grid RSSGrid; - + private System.Windows.Forms.Label label25; private System.Windows.Forms.Button bnRSSRemove; + private System.Windows.Forms.Button bnRSSGo; private System.Windows.Forms.Button bnRSSAdd; - private System.Windows.Forms.OpenFileDialog openFile; - private System.Windows.Forms.GroupBox groupBox6; - private System.Windows.Forms.Button bnUTBrowseResumeDat; - private System.Windows.Forms.TextBox txtUTResumeDatPath; - private System.Windows.Forms.Label label27; - private System.Windows.Forms.Label label26; - private System.Windows.Forms.CheckBox cbLookForAirdate; - private System.Windows.Forms.CheckBox cbMonitorFolder; - private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.TabPage tpSubtitles; + private System.Windows.Forms.CheckBox cbTxtToSub; + private System.Windows.Forms.Label label46; + private System.Windows.Forms.TextBox txtSubtitleExtensions; + private System.Windows.Forms.CheckBox chkRetainLanguageSpecificSubtitles; + private System.Windows.Forms.TabPage tpBulkAdd; + private System.Windows.Forms.GroupBox groupBox9; + private System.Windows.Forms.CheckBox chkForceBulkAddToUseSettingsOnly; + private System.Windows.Forms.CheckBox cbIgnoreRecycleBin; + private System.Windows.Forms.CheckBox cbIgnoreNoVideoFolders; + private System.Windows.Forms.GroupBox groupBox8; + private System.Windows.Forms.CheckBox chkAutoSearchForDownloadedFiles; + private System.Windows.Forms.Label label43; + private System.Windows.Forms.Label label44; + private System.Windows.Forms.TextBox tbIgnoreSuffixes; + private System.Windows.Forms.TextBox tbMovieTerms; private System.Windows.Forms.TabPage tpTreeColoring; - private System.Windows.Forms.ListView lvwDefinedColors; - private System.Windows.Forms.ColumnHeader colShowStatus; - private System.Windows.Forms.ColumnHeader colColor; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.ComboBox cboShowStatus; + private System.Windows.Forms.Label label5; private System.Windows.Forms.TextBox txtShowStatusColor; private System.Windows.Forms.Button btnSelectColor; - private System.Windows.Forms.Button btnAddShowStatusColoring; - private System.Windows.Forms.ColorDialog colorDialog; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.ComboBox cboShowStatus; - private System.Windows.Forms.Label label7; private System.Windows.Forms.Button bnRemoveDefinedColor; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox txtExportRSSDaysPast; - private System.Windows.Forms.Button bnBrowseWTWXML; - private System.Windows.Forms.TextBox txtWTWXML; - private System.Windows.Forms.CheckBox cbWTWXML; + private System.Windows.Forms.Button btnAddShowStatusColoring; + private System.Windows.Forms.ListView lvwDefinedColors; + private System.Windows.Forms.ColumnHeader colShowStatus; + private System.Windows.Forms.ColumnHeader colColor; + private System.Windows.Forms.TabPage tbuTorrentNZB; + private System.Windows.Forms.GroupBox qBitTorrent; + private System.Windows.Forms.TextBox tbqBitTorrentHost; + private System.Windows.Forms.TextBox tbqBitTorrentPort; + private System.Windows.Forms.Label label41; + private System.Windows.Forms.Label label42; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.TextBox txtSABHostPort; private System.Windows.Forms.TextBox txtSABAPIKey; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label9; - private System.Windows.Forms.CheckBox cbCheckSABnzbd; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.ComboBox cbLanguages; - private System.Windows.Forms.RadioButton rbWTWScan; - private System.Windows.Forms.RadioButton rbWTWSearch; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.CheckBox cbKODIImages; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.Button bnUTBrowseResumeDat; + private System.Windows.Forms.TextBox txtUTResumeDatPath; + private System.Windows.Forms.Button bnRSSBrowseuTorrent; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.TextBox txtRSSuTorrentPath; + private System.Windows.Forms.TabPage tbSearchFolders; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DomainUpDown domainUpDown1; + private System.Windows.Forms.CheckBox chkScheduledScan; + private System.Windows.Forms.CheckBox chkScanOnStartup; private System.Windows.Forms.Label lblScanAction; private System.Windows.Forms.RadioButton rdoQuickScan; private System.Windows.Forms.RadioButton rdoRecentScan; private System.Windows.Forms.RadioButton rdoFullScan; + private System.Windows.Forms.CheckBox cbMonitorFolder; + private System.Windows.Forms.Button bnOpenSearchFolder; + private System.Windows.Forms.Button bnRemoveSearchFolder; + private System.Windows.Forms.Button bnAddSearchFolder; + private System.Windows.Forms.ListBox lbSearchFolders; + private System.Windows.Forms.Label label23; private System.Windows.Forms.TabPage tbMediaCenter; + private System.Windows.Forms.CheckBox cbWDLiveEpisodeFiles; + private System.Windows.Forms.CheckBox cbNFOEpisodes; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.RadioButton rbFolderBanner; + private System.Windows.Forms.RadioButton rbFolderPoster; + private System.Windows.Forms.RadioButton rbFolderFanArt; + private System.Windows.Forms.RadioButton rbFolderSeasonPoster; + private System.Windows.Forms.CheckBox cbKODIImages; + private System.Windows.Forms.Button bnMCPresets; + private System.Windows.Forms.CheckBox cbShrinkLarge; + private System.Windows.Forms.CheckBox cbEpThumbJpg; private System.Windows.Forms.Label label29; private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label12; private System.Windows.Forms.CheckBox cbMetaSubfolder; private System.Windows.Forms.CheckBox cbMeta; - private System.Windows.Forms.RadioButton rbFolderFanArt; - private System.Windows.Forms.RadioButton rbFolderPoster; - private System.Windows.Forms.RadioButton rbFolderBanner; private System.Windows.Forms.CheckBox cbEpTBNs; - private System.Windows.Forms.CheckBox cbNFOShows; - private System.Windows.Forms.CheckBox cbFolderJpg; - private System.Windows.Forms.CheckBox cbEpThumbJpg; - private System.Windows.Forms.CheckBox cbShrinkLarge; private System.Windows.Forms.CheckBox cbSeriesJpg; private System.Windows.Forms.CheckBox cbXMLFiles; - private System.Windows.Forms.Button bnMCPresets; - private System.Windows.Forms.ContextMenuStrip cmDefaults; - private System.Windows.Forms.ToolStripMenuItem KODIToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem pyTivoToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem mede8erToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem; + private System.Windows.Forms.CheckBox cbNFOShows; private System.Windows.Forms.CheckBox cbFantArtJpg; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.CheckBox cbNFOEpisodes; - private System.Windows.Forms.GroupBox groupBox7; - private System.Windows.Forms.Button bnBrowseShowsTXT; - private System.Windows.Forms.CheckBox cbShowsTXT; - private System.Windows.Forms.TextBox txtShowsTXTTo; - private System.Windows.Forms.Label label33; - private System.Windows.Forms.CheckBox cbAutoCreateFolders; - private System.Windows.Forms.ComboBox cbMode; - private System.Windows.Forms.Label label34; - private System.Windows.Forms.TextBox txtSeasonFolderName; - private System.Windows.Forms.Label label35; - private System.Windows.Forms.TextBox tbSeasonSearchTerms; - private System.Windows.Forms.Label label36; - private System.Windows.Forms.Label label37; - private System.Windows.Forms.Label label38; - private System.Windows.Forms.TextBox tbPercentDirty; - private System.Windows.Forms.Label label39; - private System.Windows.Forms.ComboBox cbKeepTogetherMode; - private System.Windows.Forms.TextBox txtKeepTogether; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.DomainUpDown domainUpDown1; - private System.Windows.Forms.CheckBox chkScheduledScan; - private System.Windows.Forms.CheckBox chkScanOnStartup; - private System.Windows.Forms.Label label40; - private System.Windows.Forms.CheckBox cbxUpdateAirDate; - private System.Windows.Forms.CheckBox chkHideWtWSpoilers; - private System.Windows.Forms.CheckBox chkHideMyShowsSpoilers; - private System.Windows.Forms.CheckBox chkPreventMove; - private System.Windows.Forms.CheckBox chkAutoMergeDownloadEpisodes; - private System.Windows.Forms.TabPage tpBulkAdd; - private System.Windows.Forms.Button bnBrowseShowsHTML; - private System.Windows.Forms.CheckBox cbShowsHTML; - private System.Windows.Forms.TextBox txtShowsHTMLTo; - private System.Windows.Forms.Label label45; - private System.Windows.Forms.TextBox tbPreferredRSSTerms; - private System.Windows.Forms.CheckBox chkAutoMergeLibraryEpisodes; + private System.Windows.Forms.CheckBox cbFolderJpg; private System.Windows.Forms.TabPage tbFolderDeleting; private System.Windows.Forms.CheckBox cbCleanUpDownloadDir; private System.Windows.Forms.Label label32; @@ -3015,33 +3191,113 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox cbEmptyIgnoreWords; private System.Windows.Forms.CheckBox cbEmptyIgnoreExtensions; private System.Windows.Forms.CheckBox cbDeleteEmpty; - private System.Windows.Forms.TabPage tpSubtitles; - private System.Windows.Forms.Label label46; - private System.Windows.Forms.TextBox txtSubtitleExtensions; - private System.Windows.Forms.CheckBox chkRetainLanguageSpecificSubtitles; - private System.Windows.Forms.CheckBox cbTxtToSub; - private System.Windows.Forms.GroupBox groupBox9; - private System.Windows.Forms.CheckBox chkForceBulkAddToUseSettingsOnly; - private System.Windows.Forms.CheckBox cbIgnoreRecycleBin; - private System.Windows.Forms.CheckBox cbIgnoreNoVideoFolders; - private System.Windows.Forms.GroupBox groupBox8; - private System.Windows.Forms.CheckBox chkAutoSearchForDownloadedFiles; - private System.Windows.Forms.Label label43; - private System.Windows.Forms.Label label44; - private System.Windows.Forms.TextBox tbIgnoreSuffixes; - private System.Windows.Forms.TextBox tbMovieTerms; + private System.Windows.Forms.TabPage tpScanOptions; + private System.Windows.Forms.CheckBox cbHigherQuality; + private System.Windows.Forms.CheckBox cbSearchJSON; + private System.Windows.Forms.CheckBox cbCheckqBitTorrent; + private System.Windows.Forms.CheckBox chkAutoMergeLibraryEpisodes; + private System.Windows.Forms.CheckBox chkAutoMergeDownloadEpisodes; + private System.Windows.Forms.CheckBox chkPreventMove; + private System.Windows.Forms.Label label40; + private System.Windows.Forms.CheckBox cbxUpdateAirDate; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.CheckBox cbAutoCreateFolders; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.CheckBox cbSearchRSS; + private System.Windows.Forms.CheckBox cbRenameCheck; + private System.Windows.Forms.CheckBox cbMissing; + private System.Windows.Forms.CheckBox cbLeaveOriginals; + private System.Windows.Forms.CheckBox cbCheckSABnzbd; + private System.Windows.Forms.CheckBox cbCheckuTorrent; + private System.Windows.Forms.CheckBox cbSearchLocally; + private System.Windows.Forms.TabPage tbAutoExport; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.Button bnBrowseShowsHTML; + private System.Windows.Forms.CheckBox cbShowsHTML; + private System.Windows.Forms.TextBox txtShowsHTMLTo; + private System.Windows.Forms.Button bnBrowseShowsTXT; + private System.Windows.Forms.CheckBox cbShowsTXT; + private System.Windows.Forms.TextBox txtShowsTXTTo; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.Button bnBrowseFOXML; + private System.Windows.Forms.CheckBox cbFOXML; + private System.Windows.Forms.TextBox txtFOXML; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Button bnBrowseRenamingXML; + private System.Windows.Forms.CheckBox cbRenamingXML; + private System.Windows.Forms.TextBox txtRenamingXML; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Button bnBrowseMissingCSV; + private System.Windows.Forms.Button bnBrowseMissingXML; + private System.Windows.Forms.TextBox txtMissingCSV; + private System.Windows.Forms.CheckBox cbMissingXML; + private System.Windows.Forms.CheckBox cbMissingCSV; + private System.Windows.Forms.TextBox txtMissingXML; + private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Button bnBrowseWTWICAL; private System.Windows.Forms.TextBox txtWTWICAL; private System.Windows.Forms.CheckBox cbWTWICAL; - private System.Windows.Forms.GroupBox qBitTorrent; - private System.Windows.Forms.TextBox tbqBitTorrentHost; - private System.Windows.Forms.TextBox tbqBitTorrentPort; - private System.Windows.Forms.Label label41; - private System.Windows.Forms.Label label42; - private System.Windows.Forms.CheckBox cbCheckqBitTorrent; - private System.Windows.Forms.Button bnTags; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtExportRSSDaysPast; + private System.Windows.Forms.Button bnBrowseWTWXML; + private System.Windows.Forms.TextBox txtWTWXML; + private System.Windows.Forms.CheckBox cbWTWXML; + private System.Windows.Forms.Button bnBrowseWTWRSS; + private System.Windows.Forms.TextBox txtWTWRSS; + private System.Windows.Forms.CheckBox cbWTWRSS; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txtExportRSSMaxDays; + private System.Windows.Forms.TextBox txtExportRSSMaxShows; + private System.Windows.Forms.TabPage tbFilesAndFolders; private System.Windows.Forms.TextBox txtSeasonFormat; + private System.Windows.Forms.TextBox txtKeepTogether; + private System.Windows.Forms.TextBox txtMaxSampleSize; + private System.Windows.Forms.TextBox txtSpecialsFolderName; + private System.Windows.Forms.TextBox txtOtherExtensions; + private System.Windows.Forms.TextBox txtVideoExtensions; private System.Windows.Forms.Label label47; - private System.Windows.Forms.CheckBox cbWDLiveEpisodeFiles; + private System.Windows.Forms.Button bnTags; + private System.Windows.Forms.Label label39; + private System.Windows.Forms.ComboBox cbKeepTogetherMode; + private System.Windows.Forms.Button bnReplaceRemove; + private System.Windows.Forms.Button bnReplaceAdd; + private System.Windows.Forms.Label label3; + private SourceGrid.Grid ReplacementsGrid; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.CheckBox cbKeepTogether; + private System.Windows.Forms.CheckBox cbForceLower; + private System.Windows.Forms.CheckBox cbIgnoreSamples; + private System.Windows.Forms.CheckBox cbLeadingZero; + private System.Windows.Forms.TabPage tbGeneral; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.TextBox tbPercentDirty; + private System.Windows.Forms.TextBox txtParallelDownloads; + private System.Windows.Forms.TextBox txtWTWDays; + private System.Windows.Forms.ComboBox cbMode; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.CheckBox cbLookForAirdate; + private System.Windows.Forms.ComboBox cbLanguages; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TabControl tpSearch; + private System.Windows.Forms.TextBox tbSeasonSearchTerms; + private System.Windows.Forms.Label label36; + private System.Windows.Forms.TextBox txtSeasonFolderName; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.Label label53; + private System.Windows.Forms.Label label54; + private System.Windows.Forms.TextBox tbPercentBetter; + private System.Windows.Forms.TextBox tbPriorityOverrideTerms; + private System.Windows.Forms.Label label52; + private System.Windows.Forms.CheckBox cbDeleteShowFromDisk; + private System.Windows.Forms.CheckBox cbShowCollections; } } diff --git a/TVRename/Forms/Preferences/Preferences.cs b/TVRename/Forms/Preferences/Preferences.cs index 46eeaba97..96096d614 100644 --- a/TVRename/Forms/Preferences/Preferences.cs +++ b/TVRename/Forms/Preferences/Preferences.cs @@ -50,7 +50,7 @@ public Preferences(TVDoc doc, bool goToScanOpts, Season s) cntfw = null; if (goToScanOpts) - tabControl1.SelectedTab = tpScanOptions; + tpSearch.SelectedTab = tpScanOptions; } private void OKButton_Click(object sender, EventArgs e) @@ -60,7 +60,7 @@ private void OKButton_Click(object sender, EventArgs e) MessageBox.Show( "Extensions list must be separated by semicolons, and each extension must start with a dot.", "Preferences", MessageBoxButtons.OK, MessageBoxIcon.Warning); - tabControl1.SelectedTab = tbFolderDeleting; + tpSearch.SelectedTab = tbFolderDeleting; txtEmptyIgnoreExtensions.Focus(); return; } @@ -70,7 +70,7 @@ private void OKButton_Click(object sender, EventArgs e) MessageBox.Show( "Extensions list must be separated by semicolons, and each extension must start with a dot.", "Preferences", MessageBoxButtons.OK, MessageBoxIcon.Warning); - tabControl1.SelectedTab = tbFilesAndFolders; + tpSearch.SelectedTab = tbFilesAndFolders; txtVideoExtensions.Focus(); return; } @@ -79,7 +79,7 @@ private void OKButton_Click(object sender, EventArgs e) MessageBox.Show( "Extensions list must be separated by semicolons, and each extension must start with a dot.", "Preferences", MessageBoxButtons.OK, MessageBoxIcon.Warning); - tabControl1.SelectedTab = tpSubtitles; + tpSearch.SelectedTab = tpSubtitles; txtSubtitleExtensions.Focus(); return; } @@ -88,7 +88,7 @@ private void OKButton_Click(object sender, EventArgs e) MessageBox.Show( "Extensions list must be separated by semicolons, and each extension must start with a dot.", "Preferences", MessageBoxButtons.OK, MessageBoxIcon.Warning); - tabControl1.SelectedTab = tbFilesAndFolders; + tpSearch.SelectedTab = tbFilesAndFolders; txtOtherExtensions.Focus(); return; } @@ -97,7 +97,7 @@ private void OKButton_Click(object sender, EventArgs e) MessageBox.Show( "Extensions list must be separated by semicolons, and each extension must start with a dot.", "Preferences", MessageBoxButtons.OK, MessageBoxIcon.Warning); - tabControl1.SelectedTab = tbFilesAndFolders; + tpSearch.SelectedTab = tbFilesAndFolders; txtKeepTogether.Focus(); return; } @@ -147,6 +147,9 @@ private void OKButton_Click(object sender, EventArgs e) s.ShowInTaskbar = chkShowInTaskbar.Checked; s.RenameTxtToSub = cbTxtToSub.Checked; s.ShowEpisodePictures = cbShowEpisodePictures.Checked; + s.ShowCollections = cbShowCollections.Checked; + s.DeleteShowFromDisk = cbDeleteShowFromDisk.Checked; + s.ReplaceWithBetterQuality = cbHigherQuality.Checked; s.HideMyShowsSpoilers = chkHideMyShowsSpoilers.Checked; s.HideWtWSpoilers = chkHideWtWSpoilers.Checked; s.AutoSelectShowInMyShows = cbAutoSelInMyShows.Checked; @@ -190,6 +193,12 @@ private void OKButton_Click(object sender, EventArgs e) s.RetainLanguageSpecificSubtitles = chkRetainLanguageSpecificSubtitles.Checked; s.ForceBulkAddToUseSettingsOnly = chkForceBulkAddToUseSettingsOnly.Checked; + s.SearchJSON = cbSearchJSON.Checked; + s.SearchJSONURL = tbJSONURL.Text; + s.SearchJSONRootNode = tbJSONRootNode.Text; + s.SearchJSONFilenameToken = tbJSONFilenameToken.Text; + s.SearchJSONURLToken = tbJSONURLToken.Text; + s.MonitorFolders = cbMonitorFolder.Checked; s.runStartupCheck = chkScanOnStartup.Checked; s.runPeriodicCheck = chkScheduledScan.Checked; @@ -215,6 +224,7 @@ private void OKButton_Click(object sender, EventArgs e) s.BulkAddIgnoreRecycleBin = cbIgnoreRecycleBin.Checked; s.AutoAddIgnoreSuffixes = tbIgnoreSuffixes.Text; s.AutoAddMovieTerms = tbMovieTerms.Text; + s.PriorityReplaceTerms = tbPriorityOverrideTerms.Text; if (rbFolderFanArt.Checked) s.FolderJpgIs = TVSettings.FolderJpgIsType.FanArt; @@ -277,11 +287,25 @@ private void OKButton_Click(object sender, EventArgs e) { s.upgradeDirtyPercent = 20; } + if (s.upgradeDirtyPercent < 1) s.upgradeDirtyPercent = 1; else if (s.upgradeDirtyPercent > 100) s.upgradeDirtyPercent = 100; + try + { + s.replaceMargin = float.Parse(tbPercentBetter.Text); + } + catch + { + s.replaceMargin = 10; + } + + if (s.replaceMargin < 1) + s.replaceMargin = 1; + else if (s.replaceMargin > 100) + s.replaceMargin = 100; try { @@ -381,6 +405,8 @@ private void Preferences_Load(object sender, EventArgs e) chkHideWtWSpoilers.Checked = s.HideWtWSpoilers; cbAutoCreateFolders.Checked = s.AutoCreateFolders; cbAutoSelInMyShows.Checked = s.AutoSelectShowInMyShows; + cbShowCollections.Checked = s.ShowCollections; + cbDeleteShowFromDisk.Checked = s.DeleteShowFromDisk; txtSpecialsFolderName.Text = s.SpecialsFolderName; txtSeasonFormat.Text= s.SeasonFolderFormat ; cbForceLower.Checked = s.ForceLowercaseFilenames; @@ -393,9 +419,17 @@ private void Preferences_Load(object sender, EventArgs e) tbqBitTorrentPort.Text = s.qBitTorrentPort; cbCheckqBitTorrent.Checked= s.CheckqBitTorrent ; cbCheckSABnzbd.Checked = s.CheckSABnzbd; + cbHigherQuality.Checked= s.ReplaceWithBetterQuality ; txtParallelDownloads.Text = s.ParallelDownloads.ToString(); tbPercentDirty.Text = s.upgradeDirtyPercent.ToString(CultureInfo.InvariantCulture); + tbPercentBetter.Text = s.replaceMargin.ToString(CultureInfo.InvariantCulture); + + cbSearchJSON.Checked = s.SearchJSON; + tbJSONURL.Text = s.SearchJSONURL; + tbJSONRootNode.Text = s.SearchJSONRootNode; + tbJSONFilenameToken.Text = s.SearchJSONFilenameToken; + tbJSONURLToken.Text = s.SearchJSONURLToken; cbSearchRSS.Checked = s.SearchRSS; cbEpTBNs.Checked = s.EpTBNs; @@ -450,6 +484,8 @@ private void Preferences_Load(object sender, EventArgs e) tbMovieTerms.Text = s.AutoAddMovieTerms; tbIgnoreSuffixes.Text = s.AutoAddIgnoreSuffixes; + tbPriorityOverrideTerms.Text = s.PriorityReplaceTerms; + switch (s.WTWDoubleClick) { case TVSettings.WTWDoubleClickAction.Search: @@ -1219,5 +1255,15 @@ private void bnTags_Click(object sender, EventArgs e) cntfw.Show(this); Focus(); } + + private void cbSearchRSS_CheckedChanged(object sender, EventArgs e) + { + gbRSS.Enabled = cbSearchRSS.Checked; + } + + private void cbSearchJSON_CheckedChanged(object sender, EventArgs e) + { + gbJSON.Enabled = cbSearchJSON.Checked; + } } } diff --git a/TVRename/Forms/Preferences/Preferences.resx b/TVRename/Forms/Preferences/Preferences.resx index b4e8c4829..10fa0e6f1 100644 --- a/TVRename/Forms/Preferences/Preferences.resx +++ b/TVRename/Forms/Preferences/Preferences.resx @@ -120,15 +120,15 @@ 17, 17 - - 108, 17 - 205, 17 332, 17 + + 108, 17 + 430, 17 diff --git a/TVRename/Forms/ShowPreferences/AddEditShow.cs b/TVRename/Forms/ShowPreferences/AddEditShow.cs index 90776e422..d3f2b8c97 100644 --- a/TVRename/Forms/ShowPreferences/AddEditShow.cs +++ b/TVRename/Forms/ShowPreferences/AddEditShow.cs @@ -187,7 +187,7 @@ private bool OkToClose() } if (chkCustomLanguage.Checked && string.IsNullOrWhiteSpace(cbLanguage.SelectedItem?.ToString())) { - DialogResult dr = MessageBox.Show("Please enter language for the show or accept the default preferred language", "TVRename Add/Edit Show", + MessageBox.Show("Please enter language for the show or accept the default preferred language", "TVRename Add/Edit Show", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; diff --git a/TVRename/Forms/Supporting/CopyMoveProgress.cs b/TVRename/Forms/Supporting/CopyMoveProgress.cs index 51a65f8bf..1cd833927 100644 --- a/TVRename/Forms/Supporting/CopyMoveProgress.cs +++ b/TVRename/Forms/Supporting/CopyMoveProgress.cs @@ -151,10 +151,13 @@ private void UpdateDiskSpace() int diskValue = 0; string diskText = "--- GB free"; - ActionCopyMoveRename activeCMAction = GetActiveCmAction(); + ActionCopyMoveRename activeCMAction = null; + + activeCMAction = GetActiveCmAction(); if (activeCMAction is null) return; + string folder = activeCMAction.TargetFolder; DirectoryInfo toRoot = (!string.IsNullOrEmpty(folder) && !folder.StartsWith("\\\\")) ? new DirectoryInfo(folder).Root : null; @@ -180,10 +183,10 @@ private void UpdateDiskSpace() } } - DirectoryInfo toUncRoot = (!string.IsNullOrEmpty(folder) && folder.StartsWith("\\\\")) ? new DirectoryInfo(folder).Root : null; - if (toUncRoot != null) + DirectoryInfo toUNCRoot = (!string.IsNullOrEmpty(folder) && folder.StartsWith("\\\\")) ? new DirectoryInfo(folder).Root : null; + if (toUNCRoot != null) { - FileSystemProperties driveStats = FileHelper.GetProperties(toUncRoot.ToString()); + FileSystemProperties driveStats = FileHelper.GetProperties(toUNCRoot.ToString()); if (driveStats != null) { int pct = (int)((1000 * driveStats.AvailableBytes) / driveStats.TotalBytes); diff --git a/TVRename/Forms/Supporting/UpdateNotification.Designer.cs b/TVRename/Forms/Supporting/UpdateNotification.Designer.cs index 8164fde91..54a5250b7 100644 --- a/TVRename/Forms/Supporting/UpdateNotification.Designer.cs +++ b/TVRename/Forms/Supporting/UpdateNotification.Designer.cs @@ -124,7 +124,6 @@ private void InitializeComponent() this.webReleaseNotes.Size = new System.Drawing.Size(382, 333); this.webReleaseNotes.TabIndex = 7; this.webReleaseNotes.Visible = false; - this.webReleaseNotes.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.NavigateTo); // // UpdateNotification // @@ -165,5 +164,5 @@ private void InitializeComponent() private System.Windows.Forms.TextBox tbReleaseNotes; private System.Windows.Forms.Label lblStatus; private System.Windows.Forms.WebBrowser webReleaseNotes; - } + } } diff --git a/TVRename/Forms/Supporting/UpdateNotification.cs b/TVRename/Forms/Supporting/UpdateNotification.cs index d7158ab2a..a0125b189 100644 --- a/TVRename/Forms/Supporting/UpdateNotification.cs +++ b/TVRename/Forms/Supporting/UpdateNotification.cs @@ -10,6 +10,7 @@ public partial class UpdateNotification : Form { private readonly UpdateVersion newVersion; + public UpdateNotification(UpdateVersion update) { newVersion = update; @@ -25,44 +26,38 @@ private void UpdateWithMarkdown() { const string GITHUB_CONVERSION_URL = "https://api.github.com/markdown"; - if (WebRequest.Create(new Uri(GITHUB_CONVERSION_URL)) is HttpWebRequest req) + //string responsebody; + + HttpWebRequest req = WebRequest.Create(new Uri(GITHUB_CONVERSION_URL)) as HttpWebRequest; + req.Method = "POST"; + req.ContentType = "application/json"; + req.UserAgent= + "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"; + + JObject request = new JObject + { + {"text", newVersion.ReleaseNotesText}, + {"mode", "gfm"}, + {"context", "TV-Rename/tvrename"} + }; + + using (StreamWriter writer = new StreamWriter(req.GetRequestStream())) { - req.Method = "POST"; - req.ContentType = "application/json"; - req.UserAgent = - "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"; - - JObject request = new JObject - { - {"text", newVersion.ReleaseNotesText}, - {"mode", "gfm"}, - {"context", "TV-Rename/tvrename"} - }; - - using (StreamWriter writer = new StreamWriter(req.GetRequestStream())) - { - writer.Write(request.ToString()); - } - - string result = null; - using (HttpWebResponse resp = req.GetResponse() as HttpWebResponse) - { - if (resp != null) - { - StreamReader reader = - new StreamReader(resp.GetResponseStream() ?? throw new InvalidOperationException()); - - result = reader.ReadToEnd(); - } - } - - string HTML_HEAD = - ""; - - string HTML_FOOTER = ""; - - webReleaseNotes.DocumentText = HTML_HEAD + result + HTML_FOOTER; + writer.Write(request.ToString()); } + + string result = null; + using (HttpWebResponse resp = req.GetResponse() as HttpWebResponse) + { + StreamReader reader = + new StreamReader(resp.GetResponseStream()); + result = reader.ReadToEnd(); + } + + string HTML_HEAD = ""; + string HTML_FOOTER = ""; + + webReleaseNotes.DocumentText= HTML_HEAD+result+HTML_FOOTER; webReleaseNotes.Visible = true; tbReleaseNotes.Visible = false; diff --git a/TVRename/Forms/UI.Designer.cs b/TVRename/Forms/UI.Designer.cs index beae5951b..90cad08cd 100644 --- a/TVRename/Forms/UI.Designer.cs +++ b/TVRename/Forms/UI.Designer.cs @@ -63,6 +63,10 @@ public void InitializeComponent() System.Windows.Forms.ListViewGroup listViewGroup14 = new System.Windows.Forms.ListViewGroup("Later", System.Windows.Forms.HorizontalAlignment.Left); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.collToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aeCollToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripSeparator0 = new System.Windows.Forms.ToolStripSeparator(); this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -87,7 +91,7 @@ public void InitializeComponent() this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.showSummaryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.actorsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.betaToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.episodeFileQualitySummaryLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.timezoneInconsistencyLOGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.torrentMatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -101,6 +105,8 @@ public void InitializeComponent() this.buyMeADrinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.checkForNewVersionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); + this.logToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tbMyShows = new System.Windows.Forms.TabPage(); this.btnFilter = new System.Windows.Forms.Button(); @@ -190,8 +196,7 @@ public void InitializeComponent() this.tmrPeriodicScan = new System.Windows.Forms.Timer(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.btnUpdateAvailable = new System.Windows.Forms.Button(); - this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.logToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tbMyShows.SuspendLayout(); @@ -214,7 +219,7 @@ public void InitializeComponent() this.optionsToolStripMenuItem, this.toolsToolStripMenuItem, this.viewToolStripMenuItem, - this.betaToolsToolStripMenuItem, + this.episodeFileQualitySummaryLogToolStripMenuItem, this.helpToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; @@ -225,6 +230,8 @@ public void InitializeComponent() // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.collToolStripMenuItem, + this.toolStripSeparator0, this.exportToolStripMenuItem, this.saveToolStripMenuItem, this.toolStripSeparator1, @@ -234,6 +241,33 @@ public void InitializeComponent() this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "&File"; // + // collToolStripMenuItem + // + this.collToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.aeCollToolStripMenuItem, + this.toolStripSeparator8}); + this.collToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("collToolStripMenuItem.Image"))); + this.collToolStripMenuItem.Name = "collToolStripMenuItem"; + this.collToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.collToolStripMenuItem.Text = "&Collection"; + // + // aeCollToolStripMenuItem + // + this.aeCollToolStripMenuItem.Name = "aeCollToolStripMenuItem"; + this.aeCollToolStripMenuItem.Size = new System.Drawing.Size(127, 22); + this.aeCollToolStripMenuItem.Text = "Add / Edit"; + this.aeCollToolStripMenuItem.Click += new System.EventHandler(this.aeCollToolStripMenuItem_Click); + // + // toolStripSeparator8 + // + this.toolStripSeparator8.Name = "toolStripSeparator8"; + this.toolStripSeparator8.Size = new System.Drawing.Size(124, 6); + // + // toolStripSeparator0 + // + this.toolStripSeparator0.Name = "toolStripSeparator0"; + this.toolStripSeparator0.Size = new System.Drawing.Size(144, 6); + // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; @@ -354,7 +388,7 @@ public void InitializeComponent() this.folderMonitorToolStripMenuItem, this.duplicateFinderLOGToolStripMenuItem}); this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20); this.toolsToolStripMenuItem.Text = "&Tools"; // // flushCacheToolStripMenuItem @@ -432,40 +466,41 @@ public void InitializeComponent() this.actorsToolStripMenuItem.Text = "&Actors Grid..."; this.actorsToolStripMenuItem.Click += new System.EventHandler(this.actorsToolStripMenuItem_Click); // - // betaToolsToolStripMenuItem + // episodeFileQualitySummaryLogToolStripMenuItem // - this.betaToolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.episodeFileQualitySummaryLogToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.timezoneInconsistencyLOGToolStripMenuItem, + this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem, this.toolStripSeparator4, this.torrentMatchToolStripMenuItem, this.uTorrentToolStripMenuItem}); - this.betaToolsToolStripMenuItem.Name = "betaToolsToolStripMenuItem"; - this.betaToolsToolStripMenuItem.Size = new System.Drawing.Size(42, 20); - this.betaToolsToolStripMenuItem.Text = "Beta"; + this.episodeFileQualitySummaryLogToolStripMenuItem.Name = "episodeFileQualitySummaryLogToolStripMenuItem"; + this.episodeFileQualitySummaryLogToolStripMenuItem.Size = new System.Drawing.Size(42, 20); + this.episodeFileQualitySummaryLogToolStripMenuItem.Text = "Beta"; // // timezoneInconsistencyLOGToolStripMenuItem // this.timezoneInconsistencyLOGToolStripMenuItem.Name = "timezoneInconsistencyLOGToolStripMenuItem"; - this.timezoneInconsistencyLOGToolStripMenuItem.Size = new System.Drawing.Size(235, 22); + this.timezoneInconsistencyLOGToolStripMenuItem.Size = new System.Drawing.Size(262, 22); this.timezoneInconsistencyLOGToolStripMenuItem.Text = "Timezone Inconsistency (LOG)"; this.timezoneInconsistencyLOGToolStripMenuItem.Click += new System.EventHandler(this.timezoneInconsistencyLOGToolStripMenuItem_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(232, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(259, 6); // // torrentMatchToolStripMenuItem // this.torrentMatchToolStripMenuItem.Name = "torrentMatchToolStripMenuItem"; - this.torrentMatchToolStripMenuItem.Size = new System.Drawing.Size(235, 22); + this.torrentMatchToolStripMenuItem.Size = new System.Drawing.Size(262, 22); this.torrentMatchToolStripMenuItem.Text = "&Torrent Match"; this.torrentMatchToolStripMenuItem.Click += new System.EventHandler(this.torrentMatchToolStripMenuItem_Click); // // uTorrentToolStripMenuItem // this.uTorrentToolStripMenuItem.Name = "uTorrentToolStripMenuItem"; - this.uTorrentToolStripMenuItem.Size = new System.Drawing.Size(235, 22); + this.uTorrentToolStripMenuItem.Size = new System.Drawing.Size(262, 22); this.uTorrentToolStripMenuItem.Text = "&uTorrent Save To"; this.uTorrentToolStripMenuItem.Click += new System.EventHandler(this.uTorrentToolStripMenuItem_Click); // @@ -480,7 +515,7 @@ public void InitializeComponent() this.buyMeADrinkToolStripMenuItem, this.toolStripSeparator6, this.checkForNewVersionToolStripMenuItem, - this.toolStripSeparator8, + this.toolStripSeparator9, this.logToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); @@ -490,7 +525,7 @@ public void InitializeComponent() // this.quickstartGuideToolStripMenuItem.Image = global::TVRename.Properties.Resources.Help; this.quickstartGuideToolStripMenuItem.Name = "quickstartGuideToolStripMenuItem"; - this.quickstartGuideToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.quickstartGuideToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.quickstartGuideToolStripMenuItem.Text = "&Quickstart Guide"; this.quickstartGuideToolStripMenuItem.Click += new System.EventHandler(this.quickstartGuideToolStripMenuItem_Click); // @@ -498,48 +533,60 @@ public void InitializeComponent() // this.visitWebsiteToolStripMenuItem.Image = global::TVRename.Properties.Resources.Web; this.visitWebsiteToolStripMenuItem.Name = "visitWebsiteToolStripMenuItem"; - this.visitWebsiteToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.visitWebsiteToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.visitWebsiteToolStripMenuItem.Text = "&Visit Website"; this.visitWebsiteToolStripMenuItem.Click += new System.EventHandler(this.visitWebsiteToolStripMenuItem_Click); // // visitSupportForumToolStripMenuItem // this.visitSupportForumToolStripMenuItem.Name = "visitSupportForumToolStripMenuItem"; - this.visitSupportForumToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.visitSupportForumToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.visitSupportForumToolStripMenuItem.Text = "Visit Support Forum"; this.visitSupportForumToolStripMenuItem.Click += new System.EventHandler(this.visitSupportForumToolStripMenuItem_Click); // // bugReportToolStripMenuItem // this.bugReportToolStripMenuItem.Name = "bugReportToolStripMenuItem"; - this.bugReportToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.bugReportToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.bugReportToolStripMenuItem.Text = "Bug &Report"; this.bugReportToolStripMenuItem.Click += new System.EventHandler(this.bugReportToolStripMenuItem_Click); // // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(192, 6); + this.toolStripSeparator7.Size = new System.Drawing.Size(193, 6); // // buyMeADrinkToolStripMenuItem // this.buyMeADrinkToolStripMenuItem.Name = "buyMeADrinkToolStripMenuItem"; - this.buyMeADrinkToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.buyMeADrinkToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.buyMeADrinkToolStripMenuItem.Text = "&Buy Me A Drink"; this.buyMeADrinkToolStripMenuItem.Click += new System.EventHandler(this.buyMeADrinkToolStripMenuItem_Click); // // toolStripSeparator6 // this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(192, 6); + this.toolStripSeparator6.Size = new System.Drawing.Size(193, 6); // // checkForNewVersionToolStripMenuItem // this.checkForNewVersionToolStripMenuItem.Name = "checkForNewVersionToolStripMenuItem"; - this.checkForNewVersionToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.checkForNewVersionToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.checkForNewVersionToolStripMenuItem.Text = "Check For New Version"; this.checkForNewVersionToolStripMenuItem.Click += new System.EventHandler(this.checkForNewVersionToolStripMenuItem_Click); // + // toolStripSeparator9 + // + this.toolStripSeparator9.Name = "toolStripSeparator9"; + this.toolStripSeparator9.Size = new System.Drawing.Size(193, 6); + // + // logToolStripMenuItem + // + this.logToolStripMenuItem.Name = "logToolStripMenuItem"; + this.logToolStripMenuItem.Size = new System.Drawing.Size(196, 22); + this.logToolStripMenuItem.Text = "Log"; + this.logToolStripMenuItem.Click += new System.EventHandler(this.logToolStripMenuItem_Click); + // // tabControl1 // this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -1505,17 +1552,12 @@ public void InitializeComponent() this.btnUpdateAvailable.Visible = false; this.btnUpdateAvailable.Click += new System.EventHandler(this.btnUpdateAvailable_Click); // - // toolStripSeparator8 + // episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem // - this.toolStripSeparator8.Name = "toolStripSeparator8"; - this.toolStripSeparator8.Size = new System.Drawing.Size(192, 6); - // - // logToolStripMenuItem - // - this.logToolStripMenuItem.Name = "logToolStripMenuItem"; - this.logToolStripMenuItem.Size = new System.Drawing.Size(195, 22); - this.logToolStripMenuItem.Text = "Log"; - this.logToolStripMenuItem.Click += new System.EventHandler(this.logToolStripMenuItem_Click); + this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem.Name = "episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem"; + this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem.Size = new System.Drawing.Size(262, 22); + this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem.Text = "Episode File Quality Summary (Log)"; + this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem.Click += new System.EventHandler(this.episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem_Click); // // UI // @@ -1681,7 +1723,7 @@ public void InitializeComponent() private System.Windows.Forms.Button btnFilter; private System.Windows.Forms.TextBox filterTextBox; private System.Windows.Forms.ToolStripMenuItem visitSupportForumToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem betaToolsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem episodeFileQualitySummaryLogToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem showSummaryToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem checkForNewVersionToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem duplicateFinderLOGToolStripMenuItem; @@ -1695,7 +1737,12 @@ public void InitializeComponent() private ToolStripSeparator toolStripSeparator5; private ToolStripSeparator toolStripSeparator7; private ToolStripSeparator toolStripSeparator6; + private ToolStripMenuItem collToolStripMenuItem; + private ToolStripSeparator toolStripSeparator0; + private ToolStripMenuItem aeCollToolStripMenuItem; private ToolStripSeparator toolStripSeparator8; + private ToolStripSeparator toolStripSeparator9; private ToolStripMenuItem logToolStripMenuItem; + private ToolStripMenuItem episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem; } } diff --git a/TVRename/Forms/UI.cs b/TVRename/Forms/UI.cs index 48b9851d2..654049741 100644 --- a/TVRename/Forms/UI.cs +++ b/TVRename/Forms/UI.cs @@ -148,6 +148,13 @@ public UI(TVDoc doc, TVRenameSplash splash, bool showUi) } UpdateSplashStatus(splash, "Filling Shows"); + + if (!TVSettings.Instance.ShowCollections) + { + collToolStripMenuItem.Visible = false; + toolStripSeparator0.Visible = false; + } + FillMyShows(); UpdateSearchButtons(); ClearInfoWindows(); @@ -162,6 +169,8 @@ public UI(TVDoc doc, TVRenameSplash splash, bool showUi) UpdateSplashStatus(splash, "Setting Notifications"); ShowHideNotificationIcon(); + BuildCollectionsMenu(); + int t = TVSettings.Instance.StartupTab; if (t < tabControl1.TabCount) tabControl1.SelectedIndex = TVSettings.Instance.StartupTab; @@ -299,7 +308,7 @@ private void UI_Load(object sender, EventArgs e) // Send EM_SETMARGINS to prevent text from disappearing underneath the button NativeMethods.SendMessage(filterTextBox.Handle, 0xd3, (IntPtr) 2, (IntPtr) (filterButton.Width << 16)); - betaToolsToolStripMenuItem.Visible = TVSettings.Instance.IncludeBetaUpdates(); + episodeFileQualitySummaryLogToolStripMenuItem.Visible = TVSettings.Instance.IncludeBetaUpdates(); Show(); UI_LocationChanged(null, null); @@ -554,7 +563,9 @@ private void UI_FormClosing(object sender, FormClosingEventArgs e) MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning); if (res == DialogResult.Yes) - mDoc.WriteXMLSettings(); + { + mDoc.WriteXMLFile(FileToHandle.Settings | FileToHandle.Shows | FileToHandle.TvDB); + } else if (res == DialogResult.Cancel) e.Cancel = true; else if (res == DialogResult.No) @@ -1414,6 +1425,106 @@ private void AddFolder(List added, ref int n, ref bool first, string fol } } + private void BuildCollectionsMenu () + { + // ActualCollMenuItem + if (mDoc.ShowCollections.Count == 0) + { + // Setup a default collection when we come's from 2.4.x RCy + ShowCollection Sc = new ShowCollection("2.1"); + Sc.Name = "Default"; + Sc.Description = "Default collection in mono collection use"; + mDoc.ShowCollections.Add(Sc); + mDoc.WriteXMLFile(FileToHandle.Collections); + } + + ToolStripMenuItem[] CollMenu = new ToolStripMenuItem[mDoc.ShowCollections.Count]; + int i = 0; + foreach (ShowCollection ShowColl in mDoc.ShowCollections) + { + CollMenu[i] = new ToolStripMenuItem(); + CollMenu[i].Name = "CollectionMenuItem" + i.ToString(); + CollMenu[i].Tag = ShowColl; + CollMenu[i].Text = ShowColl.Name; + CollMenu[i].ToolTipText = ShowColl.Description; + if (ShowColl.Path == PathManager.ShowCollection) + { + CollMenu[i].Checked = true; + } + CollMenu[i].Click += new EventHandler(SelCollMenuItemClickHandler); + i++; + } + + collToolStripMenuItem.DropDownItems.AddRange(CollMenu); + } + + private void RemoveCollectionsMenu () + { + int iCount = collToolStripMenuItem.DropDownItems.Count -2; + string MenuItemName = ""; + for (int iCurr = 0; iCurr < iCount; iCurr++) + { + MenuItemName = "CollectionMenuItem" + iCurr.ToString(); + collToolStripMenuItem.DropDownItems.RemoveAt(2); + } + } + + private void SelCollMenuItemClickHandler(object sender, EventArgs e) + { + bool bNeedCancel = false; + ToolStripMenuItem clickedItem = (ToolStripMenuItem)sender; + ShowCollection SelectedCollection = (ShowCollection)clickedItem.Tag; + + try + { + if (mDoc.Dirty()) + { + DialogResult res = MessageBox.Show( + "Your changes have not been saved. Do you wish to save before changing show collection?", "Unsaved data", + MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning); + + if (res == DialogResult.Yes) + { + mDoc.WriteXMLFile(FileToHandle.Settings | FileToHandle.Shows | FileToHandle.TvDB); + } + else if (res == DialogResult.Cancel) + bNeedCancel = true; + else if (res == DialogResult.No) + { + bNeedCancel = false; + } + } + + if (!bNeedCancel) + { + ToolStripItemCollection TSMIC = collToolStripMenuItem.DropDownItems; + ToolStripMenuItem TsM; + foreach (ToolStripItem TsI in TSMIC) + { + try + { + TsM = (ToolStripMenuItem)TsI; + TsM.Checked = false; + } + catch (Exception) + { + // Just a pass thru for MenuSeparators + } + } + clickedItem.Checked = true; + + mDoc.SwitchToCollection(SelectedCollection.Path); + mDoc.WriteXMLFile(FileToHandle.Collections); + FillMyShows(); + } + } + catch (Exception ex) + { + MessageBox.Show(this, ex.Message + "\r\n\r\n" + ex.StackTrace, "Switch Show Collection", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void BuildRightClickMenu(Point pt) { showRightClickMenu.Items.Clear(); @@ -1733,9 +1844,11 @@ private void DoPrefs(bool scanOptions) ShowHideNotificationIcon(); FillWhenToWatchList(); ShowInTaskbar = TVSettings.Instance.ShowInTaskbar; + collToolStripMenuItem.Visible = (TVSettings.Instance.ShowCollections) ? true : false; + toolStripSeparator0.Visible = (TVSettings.Instance.ShowCollections) ? true : false; FillEpGuideHtml(); mAutoFolderMonitor.SettingsChanged(TVSettings.Instance.MonitorFolders); - betaToolsToolStripMenuItem.Visible = TVSettings.Instance.IncludeBetaUpdates(); + episodeFileQualitySummaryLogToolStripMenuItem.Visible = TVSettings.Instance.IncludeBetaUpdates(); ForceRefresh(null); } @@ -1747,8 +1860,7 @@ private void saveToolStripMenuItem_Click(object sender, EventArgs e) { try { - mDoc.WriteXMLSettings(); - TheTVDB.Instance.SaveCache(); + mDoc.WriteXMLFile(FileToHandle.Collections | FileToHandle.Settings | FileToHandle.Shows | FileToHandle.TvDB); if (!SaveLayoutXml()) { Logger.Error("Failed to Save Layout Configuration Files"); @@ -1804,7 +1916,7 @@ private void statusTimer_Tick(object sender, EventArgs e) if (n == 0 && lastDlRemaining > 0) { // we've just finished a bunch of background downloads - TheTVDB.Instance.SaveCache(); + mDoc.WriteXMLFile(FileToHandle.TvDB); RefreshWTW(false); backgroundDownloadNowToolStripMenuItem.Enabled = true; @@ -2146,7 +2258,7 @@ private void DeleteShow(ShowItem si) if (res != DialogResult.Yes) return; - if (Directory.Exists(si.AutoAddFolderBase)) + if ((Directory.Exists(si.AutoAddFolderBase)) && TVSettings.Instance.DeleteShowFromDisk) { DialogResult res3 = MessageBox.Show( $"Remove folder \"{si.AutoAddFolderBase}\" from disk?", @@ -2341,6 +2453,8 @@ private List CurrentlySelectedPel() List pel = null; if (currentShow != null && currentShow.SeasonEpisodes.ContainsKey(snum)) pel = currentShow.SeasonEpisodes[snum]; + else if (currentShow?.SeasonEpisodes.First() != null) + pel = currentShow?.SeasonEpisodes.First().Value; else { foreach (ShowItem si in mDoc.Library.GetShowItems()) @@ -2362,7 +2476,7 @@ private List CurrentlySelectedPel() private void filenameTemplateEditorToolStripMenuItem_Click(object sender, EventArgs e) { CustomEpisodeName cn = new CustomEpisodeName(TVSettings.Instance.NamingStyle.StyleString); - CustomNameDesigner cne = new CustomNameDesigner(CurrentlySelectedPel(), cn); + CustomNameDesigner cne = new CustomNameDesigner(CurrentlySelectedPel(), cn, mDoc); DialogResult dr = cne.ShowDialog(); if (dr == DialogResult.OK) { @@ -2736,10 +2850,9 @@ private ListViewItem LviForItem(Item item) if (item is Action act && act.Error) { lvi.BackColor = Helpers.WarningColor(); - lvi.SubItems.Add(act.ErrorText); // error text } - else - lvi.SubItems.Add(""); + + lvi.SubItems.Add(item.ErrorText); // error text if (!(item is Action)) lvi.Checked = false; @@ -2819,7 +2932,7 @@ private void FillActionList() } else if (action is ActionDownloadImage) downloadCount++; - else if (action is ActionRSS) + else if (action is ActionTDownload) rssCount++; else if (action is ActionWriteMetadata) // base interface that all metadata actions are derived from metaCount++; @@ -3229,7 +3342,7 @@ private void cbActionRSS_Click(object sender, EventArgs e) foreach (ListViewItem lvi in lvAction.Items) { Item i = (Item) lvi.Tag; - if (i is ActionRSS) + if (i is ActionTDownload) lvi.Checked = cs == CheckState.Checked; } @@ -3545,10 +3658,25 @@ private void exportToolStripMenuItem_Click(object sender, EventArgs e) { } + private void aeCollToolStripMenuItem_Click(object sender, EventArgs e) + { + AddEditCollection AEC = new AddEditCollection(mDoc); + if (AEC.ShowDialog() == DialogResult.OK) + { + RemoveCollectionsMenu(); + BuildCollectionsMenu(); + } + } + private void logToolStripMenuItem_Click(object sender, EventArgs e) { LogViewer form = new LogViewer(); form.Show(); } + + private void episodeFileQualitySummaryLogToolStripMenuItemToolStripMenuItem_Click(object sender, EventArgs e) + { + mDoc.LogShowEpisodeSizes(); + } } } diff --git a/TVRename/Forms/UI.resx b/TVRename/Forms/UI.resx index 39821f653..c7687e33a 100644 --- a/TVRename/Forms/UI.resx +++ b/TVRename/Forms/UI.resx @@ -120,6 +120,19 @@ 139, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACwwAAAsMAT9AIsgAAAE7SURBVDhPlZIhc4QwEIX5S5W1 + lUjkWWQlEotERmKRyJOxkZErYyMjI7dvEzg4kk6nmfnmuMm+717CNcxcZTGBlfYvhpUyi+V5NRjJc0Xw + QEKyfDhxIabPWQceIZK5algQgQwbd/KkyHCkZ4WGE5pUw4IIZNhiWJCQhuBoIXvdZOth4SXASRIXybaL + HiJwumVv+oJCcJNIi9TAPT/xg+WqCi6SmyBydDNQHP0CtrQpAkLo4CqRvSzYDgHCIOienfr4k7OBCGJg + rwf2W8d+bTlYlQZ+WyIIyGTBer0D9NrJRylBzVuDJJCAnP/EU8YBQiNrZzZmYiKbBN1o9te4VATpQicw + ggF8gwdHajGaBVjp/9I4le/gDN7DPcjhSF8VwYwvOFc64/4m3kWAICPIAAfzLiDVskj+g2SygJsf4FxG + MwKGJzMAAAAASUVORK5CYII= + + 17, 95 @@ -128,7 +141,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADk - HQAAAk1TRnQBSQFMAgEBEwEAAcgBAwHIAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + HQAAAk1TRnQBSQFMAgEBEwEAASABBAEgAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAAVADAAEBAQABCAYAARQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -258,7 +271,6 @@ AgABgAEBAgABgAEBAgABwAEDAgABgAEBAgAB8AEPAgAC/wIACw== - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 @@ -274,7 +286,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC0 - HQAAAk1TRnQBSQFMAgEBCwEAAeQBAwHkAQMBEgEAAQ0BAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFI + HQAAAk1TRnQBSQFMAgEBCwEAATwBBAE8AQQBEgEAAQ0BAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFI AwABJwMAAQEBAAEYBQAB6AEgGAAD7wMSBjADCQYwAw8DKgMwAxsD0Q8AASEB1gEIASEB1gEIASEB1gEI ASEB1gEIMAAC+AH3AfMB6AHaAfEB0wG2AeEBswGMAdYBnAFxAdIBlAFoAdIBlAFnAdQBmgFvAd8BrQGG AfAB0QGzAfMB5gHVAfcB9gH1RQAD7wM8A58D5gMwA+ADzgNPA9gDtwOPA9EMAAEhAdYBCAEhAdYBCAEh @@ -712,7 +724,7 @@ 829, 56 - 112 + 81 diff --git a/TVRename/Forms/Utilities/RecoverXML.cs b/TVRename/Forms/Utilities/RecoverXML.cs index 7c9514d03..724f2d3a7 100644 --- a/TVRename/Forms/Utilities/RecoverXML.cs +++ b/TVRename/Forms/Utilities/RecoverXML.cs @@ -7,7 +7,7 @@ // using System.Windows.Forms; using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; - +using DirectoryInfo = Alphaleonis.Win32.Filesystem.DirectoryInfo ; namespace TVRename { /// diff --git a/TVRename/Forms/Utilities/RecoverXML.resx b/TVRename/Forms/Utilities/RecoverXML.resx index bcc03471a..bacb4057a 100644 --- a/TVRename/Forms/Utilities/RecoverXML.resx +++ b/TVRename/Forms/Utilities/RecoverXML.resx @@ -112,12 +112,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + AAABAAIAICAQAAAABADoAgAAJgAAABAQEAAAAAQAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAAAC diff --git a/TVRename/Ipc/ActionWriteMetadata.cs b/TVRename/Ipc/ActionWriteMetadata.cs new file mode 100644 index 000000000..43fb0dc78 --- /dev/null +++ b/TVRename/Ipc/ActionWriteMetadata.cs @@ -0,0 +1,42 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using Alphaleonis.Win32.Filesystem; + +namespace TVRename +{ + public abstract class ActionWriteMetadata : ActionDownload + { + protected readonly FileInfo Where; + protected readonly ShowItem SelectedShow; // if for an entire show, rather than specific episode + + protected ActionWriteMetadata(FileInfo where, ShowItem sI) + { + Where = where; + SelectedShow = sI; + } + + public override string Produces => Where.FullName; + + public override string ProgressText => Where.Name; + + public override long SizeOfWork => 10000; + + public override string TargetFolder => Where == null ? null : Where.DirectoryName; + + public override IgnoreItem Ignore => Where == null ? null : new IgnoreItem(Where.FullName); + + public override string ScanListViewGroup => "lvgActionMeta"; + + public override int IconNumber => 7; + + protected override string SeriesName => Episode?.Show?.ShowName ?? SelectedShow.ShowName; + protected override string DestinationFolder => Where.DirectoryName; + protected override string DestinationFile => Where.Name; + } +} diff --git a/TVRename/ItemsAndActions/Action.cs b/TVRename/ItemsAndActions/Action.cs new file mode 100644 index 000000000..96aeaf0c0 --- /dev/null +++ b/TVRename/ItemsAndActions/Action.cs @@ -0,0 +1,45 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +namespace TVRename +{ + public abstract class Action : Item // Something we can do + { + public abstract string Name { get; } // Name of this action, e.g. "Copy", "Move", "Download" + + public bool + Done + { + get; + protected set; + } // All work has been completed for this item, and can be removed from to-do list. set to true on completion, even on error. + + public bool Error { get; protected set; } // Error state, after trying to do work? + public abstract string ProgressText { get; } // shortish text to display to user while task is running + + private double percent; + + public double PercentDone // 0.0 to 100.0 + { + get => Done ? 100.0 : percent; + protected set => percent = value; + } + + public abstract long + SizeOfWork + { + get; + } // for file copy/move, number of bytes in file. for simple tasks, 1, or something proportional to how slow it is to copy files around. + + public abstract bool + Go(ref bool pause, + TVRenameStats stats); // action the action. do not return until done. will be run in a dedicated thread. if pause is set to true, stop working until it goes back to false + + public abstract string Produces { get; } //What does this action produce? typically a filename + } +} diff --git a/TVRename/ItemsAndActions/ActionCopyMoveRename.cs b/TVRename/ItemsAndActions/ActionCopyMoveRename.cs index 812712347..dbbe1b37a 100644 --- a/TVRename/ItemsAndActions/ActionCopyMoveRename.cs +++ b/TVRename/ItemsAndActions/ActionCopyMoveRename.cs @@ -35,6 +35,12 @@ public ActionCopyMoveRename(Op operation, FileInfo from, FileInfo to, ProcessedE UndoItemMissing = undoItem; } + public ActionCopyMoveRename(FileInfo fi, FileInfo existingFile, ProcessedEpisode pep): + this(TVSettings.Instance.LeaveOriginals ? ActionCopyMoveRename.Op.copy : ActionCopyMoveRename.Op.move, fi, + existingFile, + pep, TVSettings.Instance.Tidyup, null) + {} + #region Action Members public override string Name => IsMoveRename() ? "Move" : "Copy"; diff --git a/TVRename/ItemsAndActions/ActionDelete.cs b/TVRename/ItemsAndActions/ActionDelete.cs index ac0513d1c..a1c9db04c 100644 --- a/TVRename/ItemsAndActions/ActionDelete.cs +++ b/TVRename/ItemsAndActions/ActionDelete.cs @@ -1,11 +1,13 @@ -using Alphaleonis.Win32.Filesystem; +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// namespace TVRename { - using System; - using FileInfo = FileInfo; - using DirectoryInfo = DirectoryInfo; - public abstract class ActionDelete : ActionFileOperation { public override string Name => "Delete"; @@ -16,125 +18,4 @@ public abstract class ActionDelete : ActionFileOperation protected override string DestinationFolder => TargetFolder; protected override string DestinationFile => ProgressText; } - public class ActionDeleteFile : ActionDelete - { - private readonly FileInfo toRemove; - - public ActionDeleteFile(FileInfo remove, ProcessedEpisode ep, TidySettings tidyup) - { - Tidyup = tidyup; - PercentDone = 0; - Episode = ep; - toRemove = remove; - } - - public override string ProgressText => toRemove.Name; - public override string Produces => toRemove.FullName; - public override IgnoreItem Ignore => toRemove == null ? null : new IgnoreItem(toRemove.FullName); - public override string TargetFolder => toRemove?.DirectoryName; - - public override bool Go(ref bool pause, TVRenameStats stats) - { - try - { - if (toRemove.Exists) - { - DeleteOrRecycleFile(toRemove); - if (Tidyup != null && Tidyup.DeleteEmpty) - { - Logger.Info($"Testing {toRemove.Directory.FullName } to see whether it should be tidied up"); - DoTidyup(toRemove.Directory); - } - } - } - catch (Exception e) - { - Error = true; - ErrorText = e.Message; - } - Done = true; - return !Error; - } - - public override bool SameAs(Item o) - { - return (o is ActionDeleteFile cmr) && FileHelper.Same(toRemove , cmr.toRemove); - } - - public override int Compare(Item o) - { - if (!(o is ActionDeleteFile cmr) || toRemove.Directory == null || cmr.toRemove.Directory == null ) - return 0; - - return string.Compare(toRemove.FullName , cmr.toRemove.FullName , StringComparison.Ordinal); - } - - public bool SameSource(ActionDeleteFile o) => FileHelper.Same(toRemove , o.toRemove); - } - - public class ActionDeleteDirectory : ActionDelete - { - private readonly DirectoryInfo toRemove; - - public ActionDeleteDirectory(DirectoryInfo remove, ProcessedEpisode ep, TidySettings tidyup) - { - Tidyup = tidyup; - PercentDone = 0; - Episode = ep; - toRemove = remove; - - } - - public override string ProgressText => toRemove.Name; - public override string Produces => toRemove.FullName; - public override IgnoreItem Ignore => toRemove == null ? null : new IgnoreItem(toRemove.FullName); - public override string TargetFolder => toRemove?.Parent.FullName; - - public override bool Go(ref bool pause, TVRenameStats stats) - { - //if the directory is the root download folder do not delete - if (TVSettings.Instance.MonitorFolders && - TVSettings.Instance.DownloadFolders.Contains(toRemove.FullName)) - { - Error = true; - ErrorText = $@"Not removing {toRemove.FullName} as it is a Search Folder"; - return false; - } - - try - { - if ((toRemove.Exists) ) - { - DeleteOrRecycleFolder(toRemove); - if (Tidyup != null && Tidyup.DeleteEmpty) - { - Logger.Info($"Testing {toRemove.Parent.FullName } to see whether it should be tidied up"); - DoTidyup(toRemove.Parent); - } - } - } - catch (Exception e) - { - Error = true; - ErrorText = e.Message; - } - Done = true; - return !Error; - } - - public override bool SameAs(Item o) - { - return (o is ActionDeleteDirectory cmr) && FileHelper.Same(toRemove, cmr.toRemove); - } - - public override int Compare(Item o) - { - if (!(o is ActionDeleteDirectory cmr) || toRemove.Parent.FullName == null || cmr.toRemove.Parent.FullName == null) - return 0; - - return string.Compare(toRemove.FullName, cmr.toRemove.FullName, StringComparison.Ordinal); - } - - public bool SameSource(ActionDeleteDirectory o) => FileHelper.Same(toRemove, o.toRemove); - } } diff --git a/TVRename/ItemsAndActions/ActionDeleteDirectory.cs b/TVRename/ItemsAndActions/ActionDeleteDirectory.cs new file mode 100644 index 000000000..628d02faf --- /dev/null +++ b/TVRename/ItemsAndActions/ActionDeleteDirectory.cs @@ -0,0 +1,78 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using System; +using Alphaleonis.Win32.Filesystem; + +namespace TVRename +{ + public class ActionDeleteDirectory : ActionDelete + { + private readonly DirectoryInfo toRemove; + + public ActionDeleteDirectory(DirectoryInfo remove, ProcessedEpisode ep, TidySettings tidyup) + { + Tidyup = tidyup; + PercentDone = 0; + Episode = ep; + toRemove = remove; + } + + public override string ProgressText => toRemove.Name; + public override string Produces => toRemove.FullName; + public override IgnoreItem Ignore => toRemove == null ? null : new IgnoreItem(toRemove.FullName); + public override string TargetFolder => toRemove?.Parent.FullName; + + public override bool Go(ref bool pause, TVRenameStats stats) + { + //if the directory is the root download folder do not delete + if (TVSettings.Instance.MonitorFolders && + TVSettings.Instance.DownloadFolders.Contains(toRemove.FullName)) + { + Error = true; + ErrorText = $@"Not removing {toRemove.FullName} as it is a Search Folder"; + return false; + } + + try + { + if (toRemove.Exists) + { + DeleteOrRecycleFolder(toRemove); + if (Tidyup != null && Tidyup.DeleteEmpty) + { + Logger.Info($"Testing {toRemove.Parent.FullName } to see whether it should be tidied up"); + DoTidyup(toRemove.Parent); + } + } + } + catch (Exception e) + { + Error = true; + ErrorText = e.Message; + } + Done = true; + return !Error; + } + + public override bool SameAs(Item o) + { + return (o is ActionDeleteDirectory cmr) && FileHelper.Same(toRemove, cmr.toRemove); + } + + public override int Compare(Item o) + { + if (!(o is ActionDeleteDirectory cmr) || toRemove.Parent.FullName == null || cmr.toRemove.Parent.FullName == null) + return 0; + + return string.Compare(toRemove.FullName, cmr.toRemove.FullName, StringComparison.Ordinal); + } + + public bool SameSource(ActionDeleteDirectory o) => FileHelper.Same(toRemove, o.toRemove); + } +} diff --git a/TVRename/ItemsAndActions/ActionDeleteFile.cs b/TVRename/ItemsAndActions/ActionDeleteFile.cs new file mode 100644 index 000000000..38edaaaf6 --- /dev/null +++ b/TVRename/ItemsAndActions/ActionDeleteFile.cs @@ -0,0 +1,69 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using System; +using Alphaleonis.Win32.Filesystem; + +namespace TVRename +{ + public class ActionDeleteFile : ActionDelete + { + private readonly FileInfo toRemove; + + public ActionDeleteFile(FileInfo remove, ProcessedEpisode ep, TidySettings tidyup) + { + Tidyup = tidyup; + PercentDone = 0; + Episode = ep; + toRemove = remove; + } + + public override string ProgressText => toRemove.Name; + public override string Produces => toRemove.FullName; + public override IgnoreItem Ignore => toRemove == null ? null : new IgnoreItem(toRemove.FullName); + public override string TargetFolder => toRemove?.DirectoryName; + + public override bool Go(ref bool pause, TVRenameStats stats) + { + try + { + if (toRemove.Exists) + { + DeleteOrRecycleFile(toRemove); + if (Tidyup != null && Tidyup.DeleteEmpty) + { + Logger.Info($"Testing {toRemove.Directory.FullName } to see whether it should be tidied up"); + DoTidyup(toRemove.Directory); + } + } + } + catch (Exception e) + { + Error = true; + ErrorText = e.Message; + } + Done = true; + return !Error; + } + + public override bool SameAs(Item o) + { + return (o is ActionDeleteFile cmr) && FileHelper.Same(toRemove , cmr.toRemove); + } + + public override int Compare(Item o) + { + if (!(o is ActionDeleteFile cmr) || toRemove.Directory == null || cmr.toRemove.Directory == null ) + return 0; + + return string.Compare(toRemove.FullName , cmr.toRemove.FullName , StringComparison.Ordinal); + } + + public bool SameSource(ActionDeleteFile o) => FileHelper.Same(toRemove , o.toRemove); + } +} diff --git a/TVRename/ItemsAndActions/ActionDownload.cs b/TVRename/ItemsAndActions/ActionDownload.cs new file mode 100644 index 000000000..e9eeccdb3 --- /dev/null +++ b/TVRename/ItemsAndActions/ActionDownload.cs @@ -0,0 +1,14 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +namespace TVRename +{ + public abstract class ActionDownload : Action + { + } +} diff --git a/TVRename/ItemsAndActions/ActionFileMetaData.cs b/TVRename/ItemsAndActions/ActionFileMetaData.cs new file mode 100644 index 000000000..2238aa069 --- /dev/null +++ b/TVRename/ItemsAndActions/ActionFileMetaData.cs @@ -0,0 +1,14 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +namespace TVRename +{ + public abstract class ActionFileMetaData : Action + { + } +} diff --git a/TVRename/ItemsAndActions/ActionFileOperation.cs b/TVRename/ItemsAndActions/ActionFileOperation.cs new file mode 100644 index 000000000..01a711861 --- /dev/null +++ b/TVRename/ItemsAndActions/ActionFileOperation.cs @@ -0,0 +1,128 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using System; +using System.Diagnostics; +using System.Linq; +using Alphaleonis.Win32.Filesystem; + +namespace TVRename +{ + public abstract class ActionFileOperation : Action + { + protected TidySettings Tidyup; + protected static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger(); + + protected void DeleteOrRecycleFile(FileInfo file) + { + if (file == null) return; + if (Tidyup.DeleteEmptyIsRecycle) + { + Logger.Info($"Recycling {file.FullName}"); + Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile(file.FullName, + Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, + Microsoft.VisualBasic.FileIO.RecycleOption.SendToRecycleBin); + } + else + { + Logger.Info($"Deleting {file.FullName}"); + file.Delete(true); + } + } + + protected void DeleteOrRecycleFolder(DirectoryInfo di) + { + if (di == null) return; + if (Tidyup ==null ||Tidyup.DeleteEmptyIsRecycle) + { + Logger.Info($"Recycling {di.FullName}"); + Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory(di.FullName, + Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, + Microsoft.VisualBasic.FileIO.RecycleOption.SendToRecycleBin); + } + else + { + Logger.Info($"Deleting {di.FullName}"); + di.Delete(true, true); + } + } + + protected void DoTidyup(DirectoryInfo di) + { +#if DEBUG + Debug.Assert(Tidyup != null); + Debug.Assert(Tidyup.DeleteEmpty); +#else + if (this.Tidyup == null || !this.Tidyup.DeleteEmpty) + return; +#endif + // See if we should now delete the folder we just moved that file from. + if (di == null) + return; + + //if there are sub-directories then we shouldn't remove this one + DirectoryInfo[] directories = di.GetDirectories(); + foreach (DirectoryInfo subdi in directories) + { + bool okToDelete = Tidyup.EmptyIgnoreWordsArray.Any(word => + subdi.Name.Contains(word, StringComparison.OrdinalIgnoreCase)); + + if (!okToDelete) + return; + } + //we know that each subfolder is OK to delete + + //if the directory is the root download folder do not delete + if (TVSettings.Instance.DownloadFolders.Contains(di.FullName)) + return; + + // Do not delete any monitor folders either + if (TVSettings.Instance.LibraryFolders.Contains(di.FullName)) + return; + + FileInfo[] files = di.GetFiles(); + if (files.Length == 0) + { + // its empty, so just delete it + DeleteOrRecycleFolder(di); + return; + } + + if (Tidyup.EmptyIgnoreExtensions && !Tidyup.EmptyIgnoreWords) + return; // nope + + foreach (FileInfo fi in files) + { + bool okToDelete = Tidyup.EmptyIgnoreExtensions && + Array.FindIndex(Tidyup.EmptyIgnoreExtensionsArray, x => x == fi.Extension) != -1; + + if (okToDelete) + continue; // onto the next file + + // look in the filename + if (Tidyup.EmptyIgnoreWordsArray.Any(word => + fi.Name.Contains(word, StringComparison.OrdinalIgnoreCase))) + okToDelete = true; + + if (!okToDelete) + return; + } + + if (Tidyup.EmptyMaxSizeCheck) + { + // how many MB are we deleting? + long totalBytes = files.Sum(fi => fi.Length); + + if (totalBytes / (1024 * 1024) > Tidyup.EmptyMaxSizeMB) + return; // too much + } + + DeleteOrRecycleFolder(di); + } + } +} diff --git a/TVRename/ItemsAndActions/ActionItem.cs b/TVRename/ItemsAndActions/ActionItem.cs deleted file mode 100644 index 32fddb58f..000000000 --- a/TVRename/ItemsAndActions/ActionItem.cs +++ /dev/null @@ -1,283 +0,0 @@ -// -// Main website for TVRename is http://tvrename.com -// -// Source code available at https://github.com/TV-Rename/tvrename -// -// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md -// - -using System.Collections.Generic; - -namespace TVRename -{ - using System; - using System.Diagnostics; - using System.Linq; - using System.Windows.Forms; - using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; - using DirectoryInfo = Alphaleonis.Win32.Filesystem.DirectoryInfo; - - public abstract class Item // something shown in the list on the Scan tab (not always an Action) - { - public abstract string TargetFolder { get; } // return a list of folders for right-click menu - public abstract string ScanListViewGroup { get; } // which group name for the listview - public abstract int IconNumber { get; } // which icon number to use in "ilIcons" (UI.cs). -1 for none - public abstract IgnoreItem Ignore { get; } // what to add to the ignore list / compare against the ignore list - public ProcessedEpisode Episode { get; protected set; } // associated episode - public abstract int Compare(Item o); // for sorting items in scan list (ActionItemSorter) - public abstract bool SameAs(Item o); // are we the same thing as that other one? - - protected static IgnoreItem GenerateIgnore(string file) - { - return string.IsNullOrEmpty(file) ? null : new IgnoreItem(file); - } - - public ListViewItem ScanListViewItem // to add to Scan ListView - { - get - { - ListViewItem lvi = new ListViewItem {Text = SeriesName}; - - lvi.SubItems.Add(SeasonNumber); - lvi.SubItems.Add(EpisodeNumber); - lvi.SubItems.Add(AirDate); - lvi.SubItems.Add(DestinationFolder); - lvi.SubItems.Add(DestinationFile); - lvi.SubItems.Add(SourceDetails); - - if (InError) - lvi.BackColor = Helpers.WarningColor(); - - lvi.Tag = this; - - return lvi; - } - } - - protected virtual string SeriesName => Episode?.TheSeries?.Name ?? string.Empty; - protected virtual string SeasonNumber => Episode?.AppropriateSeasonNumber.ToString() ?? string.Empty; - protected virtual string EpisodeNumber => Episode?.NumsAsString() ?? string.Empty; - protected virtual string AirDate => Episode?.GetAirDateDT(true).PrettyPrint() ?? string.Empty; - protected abstract string DestinationFolder { get; } - protected abstract string DestinationFile { get; } - protected virtual string SourceDetails => string.Empty; - protected virtual bool InError => false; - } - - public abstract class Action : Item // Something we can do - { - public abstract string Name { get; } // Name of this action, e.g. "Copy", "Move", "Download" - - public bool - Done - { - get; - protected set; - } // All work has been completed for this item, and can be removed from to-do list. set to true on completion, even on error. - - public bool Error { get; protected set; } // Error state, after trying to do work? - public string ErrorText { get; protected set; } // Human-readable error message, for when Error is true - public abstract string ProgressText { get; } // shortish text to display to user while task is running - - private double percent; - - public double PercentDone // 0.0 to 100.0 - { - get => Done ? 100.0 : percent; - protected set => percent = value; - } - - public abstract long - SizeOfWork - { - get; - } // for file copy/move, number of bytes in file. for simple tasks, 1, or something proportional to how slow it is to copy files around. - - public abstract bool - Go(ref bool pause, - TVRenameStats stats); // action the action. do not return until done. will be run in a dedicated thread. if pause is set to true, stop working until it goes back to false - - public abstract string Produces { get; } //What does this action produce? typically a filename - } - - public abstract class ActionDownload : Action - { - } - - public abstract class ActionFileMetaData : Action - { - } - - public abstract class ActionFileOperation : Action - { - protected TidySettings Tidyup; - protected static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger(); - - protected void DeleteOrRecycleFile(FileInfo file) - { - if (file == null) return; - if (Tidyup.DeleteEmptyIsRecycle) - { - Logger.Info($"Recycling {file.FullName}"); - Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile(file.FullName, - Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, - Microsoft.VisualBasic.FileIO.RecycleOption.SendToRecycleBin); - } - else - { - Logger.Info($"Deleting {file.FullName}"); - file.Delete(true); - } - } - - protected void DeleteOrRecycleFolder(DirectoryInfo di) - { - if (di == null) return; - if (Tidyup.DeleteEmptyIsRecycle) - { - Logger.Info($"Recycling {di.FullName}"); - Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory(di.FullName, - Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, - Microsoft.VisualBasic.FileIO.RecycleOption.SendToRecycleBin); - } - else - { - Logger.Info($"Deleting {di.FullName}"); - di.Delete(true, true); - } - } - - protected void DoTidyup(DirectoryInfo di) - { -#if DEBUG - Debug.Assert(Tidyup != null); - Debug.Assert(Tidyup.DeleteEmpty); -#else - if (this.Tidyup == null || !this.Tidyup.DeleteEmpty) - return; -#endif - // See if we should now delete the folder we just moved that file from. - if (di == null) - return; - - //if there are sub-directories then we shouldn't remove this one - DirectoryInfo[] directories = di.GetDirectories(); - foreach (DirectoryInfo subdi in directories) - { - bool okToDelete = Tidyup.EmptyIgnoreWordsArray.Any(word => - subdi.Name.Contains(word, StringComparison.OrdinalIgnoreCase)); - - if (!okToDelete) - return; - } - //we know that each subfolder is OK to delete - - //if the directory is the root download folder do not delete - if (TVSettings.Instance.DownloadFolders.Contains(di.FullName)) - return; - - // Do not delete any monitor folders either - if (TVSettings.Instance.LibraryFolders.Contains(di.FullName)) - return; - - FileInfo[] files = di.GetFiles(); - if (files.Length == 0) - { - // its empty, so just delete it - DeleteOrRecycleFolder(di); - return; - } - - if (Tidyup.EmptyIgnoreExtensions && !Tidyup.EmptyIgnoreWords) - return; // nope - - foreach (FileInfo fi in files) - { - bool okToDelete = Tidyup.EmptyIgnoreExtensions && - Array.FindIndex(Tidyup.EmptyIgnoreExtensionsArray, x => x == fi.Extension) != -1; - - if (okToDelete) - continue; // onto the next file - - // look in the filename - if (Tidyup.EmptyIgnoreWordsArray.Any(word => - fi.Name.Contains(word, StringComparison.OrdinalIgnoreCase))) - okToDelete = true; - - if (!okToDelete) - return; - } - - if (Tidyup.EmptyMaxSizeCheck) - { - // how many MB are we deleting? - long totalBytes = files.Sum(fi => fi.Length); - - if (totalBytes / (1024 * 1024) > Tidyup.EmptyMaxSizeMB) - return; // too much - } - - DeleteOrRecycleFolder(di); - } - } - - public abstract class ActionWriteMetadata : ActionDownload - { - protected readonly FileInfo Where; - protected readonly ShowItem SelectedShow; // if for an entire show, rather than specific episode - - protected ActionWriteMetadata(FileInfo where, ShowItem sI) - { - Where = where; - SelectedShow = sI; - } - - public override string Produces => Where.FullName; - - public override string ProgressText => Where.Name; - - public override long SizeOfWork => 10000; - - public override string TargetFolder => Where == null ? null : Where.DirectoryName; - - public override IgnoreItem Ignore => Where == null ? null : new IgnoreItem(Where.FullName); - - public override string ScanListViewGroup => "lvgActionMeta"; - - public override int IconNumber => 7; - - protected override string SeriesName => Episode?.Show?.ShowName ?? SelectedShow.ShowName; - protected override string DestinationFolder => Where.DirectoryName; - protected override string DestinationFile => Where.Name; - } - - public class ItemList : List - { - public void Add(ItemList slil) - { - if (slil == null) return; - foreach (Item sli in slil) - { - Add(sli); - } - } - - public IEnumerable Actions( ) => this.OfType(); - } - - public class ActionQueue - { - public readonly List Actions; // The contents of this queue - public readonly int ParallelLimit; // Number of tasks in the queue than can be run at once - public readonly string Name; // Name of this queue - public int ActionPosition; // Position in the queue list of the next item to process - - public ActionQueue(string name, int parallelLimit) - { - Name = name; - ParallelLimit = parallelLimit; - Actions = new List(); - ActionPosition = 0; - } - } -} diff --git a/TVRename/ItemsAndActions/ActionItemSorter.cs b/TVRename/ItemsAndActions/ActionItemSorter.cs index c851afa50..1eba5bf4f 100644 --- a/TVRename/ItemsAndActions/ActionItemSorter.cs +++ b/TVRename/ItemsAndActions/ActionItemSorter.cs @@ -26,7 +26,7 @@ private static int TypeNumber(Item a) return 1; if (a is ActionCopyMoveRename) return 2; - if (a is ActionRSS) + if (a is ActionTDownload) return 3; if (a is ActionDownloadImage) return 4; diff --git a/TVRename/ItemsAndActions/ActionMede8erViewXML.cs b/TVRename/ItemsAndActions/ActionMede8erViewXML.cs index 06494b8c3..e7f7eff64 100644 --- a/TVRename/ItemsAndActions/ActionMede8erViewXML.cs +++ b/TVRename/ItemsAndActions/ActionMede8erViewXML.cs @@ -12,6 +12,7 @@ namespace TVRename using Alphaleonis.Win32.Filesystem; using System.Xml; + // ReSharper disable once InconsistentNaming public class ActionMede8erViewXML : ActionWriteMetadata { private readonly int snum; diff --git a/TVRename/ItemsAndActions/ActionMede8erXML.cs b/TVRename/ItemsAndActions/ActionMede8erXML.cs index d9197c8ea..7b0af5dc6 100644 --- a/TVRename/ItemsAndActions/ActionMede8erXML.cs +++ b/TVRename/ItemsAndActions/ActionMede8erXML.cs @@ -14,6 +14,7 @@ namespace TVRename using System.Xml; using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; + // ReSharper disable once InconsistentNaming public class ActionMede8erXML : ActionWriteMetadata { public ActionMede8erXML(FileInfo nfo, ProcessedEpisode pe) : base(nfo, null) diff --git a/TVRename/ItemsAndActions/ActionQueue.cs b/TVRename/ItemsAndActions/ActionQueue.cs new file mode 100644 index 000000000..f4e975870 --- /dev/null +++ b/TVRename/ItemsAndActions/ActionQueue.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; + +namespace TVRename +{ + public class ActionQueue + { + public readonly List Actions; // The contents of this queue + public readonly int ParallelLimit; // Number of tasks in the queue than can be run at once + public readonly string Name; // Name of this queue + public int ActionPosition; // Position in the queue list of the next item to process + + public ActionQueue(string name, int parallelLimit) + { + Name = name; + ParallelLimit = parallelLimit; + Actions = new List(); + ActionPosition = 0; + } + } +} \ No newline at end of file diff --git a/TVRename/ItemsAndActions/ActionRSS.cs b/TVRename/ItemsAndActions/ActionTDownload.cs similarity index 75% rename from TVRename/ItemsAndActions/ActionRSS.cs rename to TVRename/ItemsAndActions/ActionTDownload.cs index 15490bc4a..434e8ad08 100644 --- a/TVRename/ItemsAndActions/ActionRSS.cs +++ b/TVRename/ItemsAndActions/ActionTDownload.cs @@ -1,119 +1,129 @@ -// Main website for TVRename is http://tvrename.com -// -// Source code available at https://github.com/TV-Rename/tvrename -// -// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md -// -namespace TVRename -{ - using System; - using Alphaleonis.Win32.Filesystem; - - // ReSharper disable once InconsistentNaming - public class ActionRSS : ActionDownload - { - // ReSharper disable once InconsistentNaming - public readonly RSSItem RSS; - private readonly string theFileNoExt; - - public ActionRSS(RSSItem rss, string toWhereNoExt, ProcessedEpisode pe) - { - Episode = pe; - RSS = rss; - theFileNoExt = toWhereNoExt; - } - - #region Action Members - - public override string ProgressText => RSS.Title; - public override string Name => "Get Torrent"; - public override long SizeOfWork => 1000000; - public override string Produces => RSS.URL; - - public override bool Go( ref bool pause, TVRenameStats stats) - { - try - { - if (!(TVSettings.Instance.CheckuTorrent || TVSettings.Instance.CheckqBitTorrent)) - { - Error = true; - ErrorText = "No torrent clients enabled to download RSS"; - Done = true; - return false; - } - - if (TVSettings.Instance.CheckuTorrent) - { - byte[] r = new System.Net.WebClient().DownloadData(RSS.URL); - if ((r == null) || (r.Length == 0)) - { - Error = true; - ErrorText = "No data downloaded"; - Done = true; - return false; - } - - string saveTemp = SaveDownloadedData(r, RSS.Title); - uTorrentFinder.StartTorrentDownload(saveTemp, theFileNoExt); - } - - if (TVSettings.Instance.CheckqBitTorrent) - qBitTorrentFinder.StartTorrentDownload(RSS.URL); - - Done = true; - return true; - } - catch (Exception e) - { - ErrorText = e.Message; - Error = true; - Done = true; - return false; - } - } - - private static string SaveDownloadedData(byte[] r,string name) - { - string saveTemp = Path.GetTempPath() + System.IO.Path.DirectorySeparatorChar + TVSettings.Instance.FilenameFriendly(name); - if (new FileInfo(saveTemp).Extension.ToLower() != "torrent") - saveTemp += ".torrent"; - File.WriteAllBytes(saveTemp, r); - return saveTemp; - } - - #endregion - - #region Item Members - - public override bool SameAs(Item o) - { - return (o is ActionRSS rss) && (rss.RSS == RSS); - } - - public override int Compare(Item o) - { - ActionRSS rss = o as ActionRSS; - return rss == null ? 0 : string.Compare(RSS.URL, rss.RSS.URL, StringComparison.Ordinal); - } - - #endregion - - #region Item Members - - public override IgnoreItem Ignore => GenerateIgnore(theFileNoExt); - - protected override string DestinationFolder => TargetFolder; - protected override string DestinationFile => TargetFilename; - protected override string SourceDetails => RSS.Title; - - public override string TargetFolder => string.IsNullOrEmpty(theFileNoExt) ? null : new FileInfo(theFileNoExt).DirectoryName; - - private string TargetFilename => string.IsNullOrEmpty(theFileNoExt) ? null : new FileInfo(theFileNoExt).Name; - - public override string ScanListViewGroup => "lvgActionDownloadRSS"; - - public override int IconNumber => 6; - - #endregion - } -} +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// +namespace TVRename +{ + using System; + using Alphaleonis.Win32.Filesystem; + + // ReSharper disable once InconsistentNaming + public class ActionTDownload : ActionDownload + { + // ReSharper disable once InconsistentNaming + private readonly string theFileNoExt; + public readonly string SourceName; + private readonly string url; + private ProcessedEpisode pe; + + public ActionTDownload(string name,string url, string toWhereNoExt, ProcessedEpisode pe) + { + Episode = pe; + this.SourceName = name; + this.url = url; + theFileNoExt = toWhereNoExt; + } + + public ActionTDownload(RSSItem rss, string theFileNoExt, ProcessedEpisode pe) + { + this.SourceName = rss.Title; + this.url = rss.URL; + this.theFileNoExt = theFileNoExt; + this.pe = pe; + } + + #region Action Members + + public override string ProgressText => SourceName; + public override string Name => "Get Torrent"; + public override long SizeOfWork => 1000000; + public override string Produces => url; + + public override bool Go( ref bool pause, TVRenameStats stats) + { + try + { + if (!(TVSettings.Instance.CheckuTorrent || TVSettings.Instance.CheckqBitTorrent)) + { + Error = true; + ErrorText = "No torrent clients enabled to download RSS"; + Done = true; + return false; + } + + if (TVSettings.Instance.CheckuTorrent) + { + byte[] r = new System.Net.WebClient().DownloadData(url); + if ((r == null) || (r.Length == 0)) + { + Error = true; + ErrorText = "No data downloaded"; + Done = true; + return false; + } + + string saveTemp = SaveDownloadedData(r, SourceName); + uTorrentFinder.StartTorrentDownload(saveTemp, theFileNoExt); + } + + if (TVSettings.Instance.CheckqBitTorrent) + qBitTorrentFinder.StartTorrentDownload(url); + + Done = true; + return true; + } + catch (Exception e) + { + ErrorText = e.Message; + Error = true; + Done = true; + return false; + } + } + + private static string SaveDownloadedData(byte[] r,string name) + { + string saveTemp = Path.GetTempPath() + System.IO.Path.DirectorySeparatorChar + TVSettings.Instance.FilenameFriendly(name); + if (new FileInfo(saveTemp).Extension.ToLower() != "torrent") + saveTemp += ".torrent"; + File.WriteAllBytes(saveTemp, r); + return saveTemp; + } + + #endregion + + #region Item Members + + public override bool SameAs(Item o) + { + return (o is ActionTDownload rss) && (rss.url == url); + } + + public override int Compare(Item o) + { + return !(o is ActionTDownload rss) ? 0 : string.Compare(url, rss.url, StringComparison.Ordinal); + } + + #endregion + + #region Item Members + + public override IgnoreItem Ignore => GenerateIgnore(theFileNoExt); + + protected override string DestinationFolder => TargetFolder; + protected override string DestinationFile => TargetFilename; + protected override string SourceDetails => SourceName; + + public override string TargetFolder => string.IsNullOrEmpty(theFileNoExt) ? null : new FileInfo(theFileNoExt).DirectoryName; + + private string TargetFilename => string.IsNullOrEmpty(theFileNoExt) ? null : new FileInfo(theFileNoExt).Name; + + public override string ScanListViewGroup => "lvgActionDownloadRSS"; + + public override int IconNumber => 6; + + #endregion + } +} diff --git a/TVRename/ItemsAndActions/ActionWriteMetadata.cs b/TVRename/ItemsAndActions/ActionWriteMetadata.cs index ea6557aab..43fb0dc78 100644 --- a/TVRename/ItemsAndActions/ActionWriteMetadata.cs +++ b/TVRename/ItemsAndActions/ActionWriteMetadata.cs @@ -1,7 +1,42 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using Alphaleonis.Win32.Filesystem; + namespace TVRename { - interface ActionWriteMetadata + public abstract class ActionWriteMetadata : ActionDownload { - // empty base interface, just so we can see if an action is one of these or not, for grouping and processing + protected readonly FileInfo Where; + protected readonly ShowItem SelectedShow; // if for an entire show, rather than specific episode + + protected ActionWriteMetadata(FileInfo where, ShowItem sI) + { + Where = where; + SelectedShow = sI; + } + + public override string Produces => Where.FullName; + + public override string ProgressText => Where.Name; + + public override long SizeOfWork => 10000; + + public override string TargetFolder => Where == null ? null : Where.DirectoryName; + + public override IgnoreItem Ignore => Where == null ? null : new IgnoreItem(Where.FullName); + + public override string ScanListViewGroup => "lvgActionMeta"; + + public override int IconNumber => 7; + + protected override string SeriesName => Episode?.Show?.ShowName ?? SelectedShow.ShowName; + protected override string DestinationFolder => Where.DirectoryName; + protected override string DestinationFile => Where.Name; } } diff --git a/TVRename/ItemsAndActions/Item.cs b/TVRename/ItemsAndActions/Item.cs new file mode 100644 index 000000000..dfdd6869d --- /dev/null +++ b/TVRename/ItemsAndActions/Item.cs @@ -0,0 +1,60 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +namespace TVRename +{ + using System.Windows.Forms; + + public abstract class Item // something shown in the list on the Scan tab (not always an Action) + { + public abstract string TargetFolder { get; } // return a list of folders for right-click menu + public abstract string ScanListViewGroup { get; } // which group name for the listview + public abstract int IconNumber { get; } // which icon number to use in "ilIcons" (UI.cs). -1 for none + public abstract IgnoreItem Ignore { get; } // what to add to the ignore list / compare against the ignore list + public ProcessedEpisode Episode { get; protected set; } // associated episode + public abstract int Compare(Item o); // for sorting items in scan list (ActionItemSorter) + public abstract bool SameAs(Item o); // are we the same thing as that other one? + + protected static IgnoreItem GenerateIgnore(string file) + { + return string.IsNullOrEmpty(file) ? null : new IgnoreItem(file); + } + + public ListViewItem ScanListViewItem // to add to Scan ListView + { + get + { + ListViewItem lvi = new ListViewItem {Text = SeriesName}; + + lvi.SubItems.Add(SeasonNumber); + lvi.SubItems.Add(EpisodeNumber); + lvi.SubItems.Add(AirDate); + lvi.SubItems.Add(DestinationFolder); + lvi.SubItems.Add(DestinationFile); + lvi.SubItems.Add(SourceDetails); + + if (InError) + lvi.BackColor = Helpers.WarningColor(); + + lvi.Tag = this; + + return lvi; + } + } + + protected virtual string SeriesName => Episode?.TheSeries?.Name ?? string.Empty; + protected virtual string SeasonNumber => Episode?.AppropriateSeasonNumber.ToString() ?? string.Empty; + protected virtual string EpisodeNumber => Episode?.NumsAsString() ?? string.Empty; + protected virtual string AirDate => Episode?.GetAirDateDT(true).PrettyPrint() ?? string.Empty; + protected abstract string DestinationFolder { get; } + protected abstract string DestinationFile { get; } + protected virtual string SourceDetails => string.Empty; + protected virtual bool InError => false; + public string ErrorText { get; protected set; } // Human-readable error message, for when Error is true + } +} diff --git a/TVRename/ItemsAndActions/ItemDownloading.cs b/TVRename/ItemsAndActions/ItemDownloading.cs index d9f60aef1..2bc345333 100644 --- a/TVRename/ItemsAndActions/ItemDownloading.cs +++ b/TVRename/ItemsAndActions/ItemDownloading.cs @@ -13,7 +13,7 @@ namespace TVRename { public class ItemDownloading : Item { - private readonly IDownloadInformation Entry; + private readonly IDownloadInformation entry; public readonly string DesiredLocationNoExt; public override IgnoreItem Ignore => GenerateIgnore(DesiredLocationNoExt); @@ -22,27 +22,27 @@ public class ItemDownloading : Item protected override string DestinationFolder => FileIdentifier; protected override string DestinationFile => Destination; protected override string SourceDetails => Remaining; - private string FileIdentifier => Entry.FileIdentifier; - private string Destination => Entry.Destination; - private string Remaining => Entry.RemainingText; + private string FileIdentifier => entry.FileIdentifier; + private string Destination => entry.Destination; + private string Remaining => entry.RemainingText; public override int IconNumber { get; } public override string TargetFolder => string.IsNullOrEmpty(Destination) ? null : new FileInfo(Destination).DirectoryName; - public ItemDownloading(IDownloadInformation dl, ProcessedEpisode pe, string desiredLocationNoExt, Finder.DownloadApp tApp) + public ItemDownloading(IDownloadInformation dl, ProcessedEpisode pe, string desiredLocationNoExt, DownloadingFinder.DownloadApp tApp) { Episode = pe; DesiredLocationNoExt = desiredLocationNoExt; - Entry = dl; - IconNumber = (tApp == Finder.DownloadApp.uTorrent) ? 2 : - (tApp == Finder.DownloadApp.SABnzbd) ? 8 : - (tApp == Finder.DownloadApp.qBitTorrent) ? 10 : 0; + entry = dl; + IconNumber = (tApp == DownloadingFinder.DownloadApp.uTorrent) ? 2 : + (tApp == DownloadingFinder.DownloadApp.SABnzbd) ? 8 : + (tApp == DownloadingFinder.DownloadApp.qBitTorrent) ? 10 : 0; } #region Item Members public override bool SameAs(Item o) { - return (o is ItemDownloading torrenting) && Entry == torrenting.Entry; + return (o is ItemDownloading torrenting) && entry == torrenting.entry; } public override int Compare(Item o) diff --git a/TVRename/ItemsAndActions/ItemList.cs b/TVRename/ItemsAndActions/ItemList.cs new file mode 100644 index 000000000..18bf55348 --- /dev/null +++ b/TVRename/ItemsAndActions/ItemList.cs @@ -0,0 +1,31 @@ +// +// Main website for TVRename is http://tvrename.com +// +// Source code available at https://github.com/TV-Rename/tvrename +// +// This code is released under GPLv3 https://github.com/TV-Rename/tvrename/blob/master/LICENSE.md +// + +using System.Collections.Generic; +using System.Linq; + +namespace TVRename +{ + public class ItemList : List + { + public void Add(ItemList slil) + { + if (slil == null) return; + foreach (Item sli in slil) + { + Add(sli); + } + } + + public IEnumerable Actions( ) => this.OfType(); + + public IEnumerable MissingItems() => this.OfType(); + + public IEnumerable CopyMoveItems() => this.OfType(); + } +} diff --git a/TVRename/ItemsAndActions/ItemMissing.cs b/TVRename/ItemsAndActions/ItemMissing.cs index 50912d6ca..526dd2269 100644 --- a/TVRename/ItemsAndActions/ItemMissing.cs +++ b/TVRename/ItemsAndActions/ItemMissing.cs @@ -67,5 +67,10 @@ public override int Compare(Item o) public override int IconNumber => 1; #endregion + + public void AddComment(string p0) + { + ErrorText += p0; + } } } diff --git a/TVRename/Properties/AssemblyInfo.cs b/TVRename/Properties/AssemblyInfo.cs index d23a4905d..f16a67403 100644 --- a/TVRename/Properties/AssemblyInfo.cs +++ b/TVRename/Properties/AssemblyInfo.cs @@ -14,6 +14,8 @@ [assembly: Guid("3b5746c1-a5f7-48c2-a8de-95619489049b")] [assembly: NeutralResourcesLanguageAttribute("")] + [assembly: AssemblyVersion("2.5.3.0")] [assembly: AssemblyFileVersion("2.5.3")] -[assembly: AssemblyInformationalVersion("2.5.3")] // Display version +[assembly: AssemblyInformationalVersion("2.6.5")] // Display version + diff --git a/TVRename/Resources/openFile.png b/TVRename/Resources/openFile.png new file mode 100644 index 000000000..e2dcf5459 Binary files /dev/null and b/TVRename/Resources/openFile.png differ diff --git a/TVRename/Settings/CustomEpisodeName.cs b/TVRename/Settings/CustomEpisodeName.cs index 9574745b9..b6dfd1a88 100644 --- a/TVRename/Settings/CustomEpisodeName.cs +++ b/TVRename/Settings/CustomEpisodeName.cs @@ -62,6 +62,8 @@ public static string OldNStyle(int n) "{ShowName}", "{Season}", "{Season:2}", + "{SeasonNumber}", + "{SeasonNumber:2}", "{Episode}", "{Episode2}", "{EpisodeName}", @@ -117,6 +119,8 @@ private string GetTargetEpisodeName(ShowItem show, Episode ep, TimeZone tz, bool { name = name.ReplaceInsensitive("{Season}", ep.DvdSeasonNumber.ToString()); name = name.ReplaceInsensitive("{Season:2}", ep.DvdSeasonNumber.ToString("00")); + name = name.ReplaceInsensitive("{SeasonNumber}", ep.DvdSeasonIndex.ToString()); + name = name.ReplaceInsensitive("{SeasonNumber:2}", ep.DvdSeasonIndex.ToString("00")); name = name.ReplaceInsensitive("{Episode}", ep.DvdEpNum.ToString("00")); name = name.ReplaceInsensitive("{Episode2}", ep.DvdEpNum.ToString("00")); name = Regex.Replace(name, "{AllEpisodes}", ep.DvdEpNum.ToString("00")); @@ -125,6 +129,8 @@ private string GetTargetEpisodeName(ShowItem show, Episode ep, TimeZone tz, bool { name = name.ReplaceInsensitive("{Season}", ep.AiredSeasonNumber.ToString()); name = name.ReplaceInsensitive("{Season:2}", ep.AiredSeasonNumber.ToString("00")); + name = name.ReplaceInsensitive("{SeasonNumber}", ep.AiredSeasonIndex.ToString()); + name = name.ReplaceInsensitive("{SeasonNumber:2}", ep.AiredSeasonIndex.ToString("00")); name = name.ReplaceInsensitive("{Episode}", ep.AiredEpNum.ToString("00")); name = name.ReplaceInsensitive("{Episode2}", ep.AiredEpNum.ToString("00")); name = Regex.Replace(name, "{AllEpisodes}", ep.AiredEpNum.ToString("00")); @@ -188,6 +194,8 @@ public static string NameForNoExt(ProcessedEpisode pe, string styleString, bool name = name.ReplaceInsensitive("{ShowName}", showname); name = name.ReplaceInsensitive("{Season}", pe.AppropriateSeasonNumber.ToString()); name = name.ReplaceInsensitive("{Season:2}", pe.AppropriateSeasonNumber.ToString("00")); + name = name.ReplaceInsensitive("{SeasonNumber}", pe.AppropriateSeasonIndex.ToString()); + name = name.ReplaceInsensitive("{SeasonNumber:2}", pe.AppropriateSeasonIndex.ToString("00")); if (pe.AppropriateSeason.Episodes.Count >= 100) { name = name.ReplaceInsensitive("{Episode}", pe.AppropriateEpNum.ToString("000")); diff --git a/TVRename/Settings/CustomSeasonName.cs b/TVRename/Settings/CustomSeasonName.cs index 93e7888f3..f1ac2758f 100644 --- a/TVRename/Settings/CustomSeasonName.cs +++ b/TVRename/Settings/CustomSeasonName.cs @@ -40,6 +40,11 @@ public CustomSeasonName() "S{Season}", "S{Season:2}", "{ShowName} - Season {Season:2}", + "Season {SeasonNumber:2}", + "Season {SeasonNumber}", + "S{SeasonNumber}", + "S{SeasonNumber:2}", + "{ShowName} - Season {SeasonNumber:2}", "{StartYear}-{EndYear}" }; @@ -48,6 +53,8 @@ public CustomSeasonName() "{ShowName}", "{Season}", "{Season:2}", + "{SeasonNumber}", + "{SeasonNumber:2}", "{StartYear}", "{EndYear}" }; @@ -82,6 +89,8 @@ private static string NameFor(Season s, string styleString, bool urlEncode) name = name.ReplaceInsensitive("{ShowName}", showname); name = name.ReplaceInsensitive("{Season}", s.SeasonNumber.ToString()); name = name.ReplaceInsensitive("{Season:2}", s.SeasonNumber.ToString("00")); + name = name.ReplaceInsensitive("{SeasonNumber}", s.SeasonIndex.ToString()); + name = name.ReplaceInsensitive("{SeasonNumber:2}", s.SeasonIndex.ToString("00")); name = name.ReplaceInsensitive("{StartYear}", s.MinYear().ToString()); name = name.ReplaceInsensitive("{EndYear}", s.MaxYear().ToString()); diff --git a/TVRename/Settings/ProcessedEpisode.cs b/TVRename/Settings/ProcessedEpisode.cs index 2adefd7d2..93f7d6f22 100644 --- a/TVRename/Settings/ProcessedEpisode.cs +++ b/TVRename/Settings/ProcessedEpisode.cs @@ -71,6 +71,7 @@ public ProcessedEpisode(Episode e, ShowItem si, List episodes) } public int AppropriateSeasonNumber => Show.DvdOrder ? DvdSeasonNumber : AiredSeasonNumber; + public int AppropriateSeasonIndex => Show.DvdOrder ? DvdSeasonIndex : AiredSeasonIndex; public Season AppropriateSeason => Show.DvdOrder ? TheDvdSeason : TheAiredSeason; diff --git a/TVRename/Settings/Searchers.cs b/TVRename/Settings/Searchers.cs index 6f63409d2..52cea4386 100644 --- a/TVRename/Settings/Searchers.cs +++ b/TVRename/Settings/Searchers.cs @@ -61,7 +61,7 @@ public Searchers(XmlReader reader) else { // old-style URL, replace "!" with "{ShowName}+{Season}+{Episode}" - url = url.Replace("!", "{ShowName}+{Season}+{Episode}"); + url = url.Replace("!", "{ShowName}+S{Season:2}E{Episode}"); } Add(reader.GetAttribute("Name"), url); reader.ReadElementContentAsString(); diff --git a/TVRename/Settings/Settings.cs b/TVRename/Settings/Settings.cs index 368c6dc80..661f46f10 100644 --- a/TVRename/Settings/Settings.cs +++ b/TVRename/Settings/Settings.cs @@ -77,6 +77,7 @@ public class ShowStatusColoringTypeList : Dictionary PriorityReplaceTerms.Split(';'); + public string[] AutoAddMovieTermsArray => AutoAddMovieTerms.Split(';'); public string[] AutoAddIgnoreSuffixesArray => AutoAddIgnoreSuffixes.Split(';'); @@ -369,6 +377,7 @@ internal bool IncludeBetaUpdates() public int SampleFileMaxSizeMB = 50; // sample file must be smaller than this to be ignored public bool SearchLocally = true; public bool SearchRSS = false; + public bool SearchJSON = false; public bool ShowEpisodePictures = true; public bool HideWtWSpoilers = false; public bool HideMyShowsSpoilers = false; @@ -379,6 +388,11 @@ internal bool IncludeBetaUpdates() public int StartupTab = 0; public Searchers TheSearchers = new Searchers(); + public string SearchJSONURL = "https://eztv.ag/api/get-torrents?imdb_id="; + public string SearchJSONRootNode = "torrents"; + public string SearchJSONFilenameToken = "filename"; + public string SearchJSONURLToken = "torrent_url"; + public string[] VideoExtensionsArray => VideoExtensionsString.Split(';'); public bool ForceBulkAddToUseSettingsOnly = false; public bool RetainLanguageSpecificSubtitles = true; @@ -434,6 +448,12 @@ public void load(XmlReader reader) BGDownload = reader.ReadElementContentAsBoolean(); else if (reader.Name == "OfflineMode") OfflineMode = reader.ReadElementContentAsBoolean(); + else if (reader.Name == "ReplaceWithBetterQuality") + ReplaceWithBetterQuality = reader.ReadElementContentAsBoolean(); + else if (reader.Name == "ShowCollections") + ShowCollections = reader.ReadElementContentAsBoolean(); + else if (reader.Name == "DeleteShowFromDisk") + DeleteShowFromDisk = reader.ReadElementContentAsBoolean(); else if (reader.Name == "Replacements" && !reader.IsEmptyElement) { Replacements.Clear(); @@ -520,6 +540,14 @@ public void load(XmlReader reader) SpecialsFolderName = reader.ReadElementContentAsString(); else if (reader.Name == "SeasonFolderFormat") SeasonFolderFormat = reader.ReadElementContentAsString(); + else if (reader.Name == "SearchJSONURL") + SearchJSONURL = reader.ReadElementContentAsString(); + else if (reader.Name == "SearchJSONRootNode") + SearchJSONRootNode = reader.ReadElementContentAsString(); + else if (reader.Name == "SearchJSONFilenameToken") + SearchJSONFilenameToken = reader.ReadElementContentAsString(); + else if (reader.Name == "SearchJSONURLToken") + SearchJSONURLToken = reader.ReadElementContentAsString(); else if (reader.Name == "SABAPIKey") SABAPIKey = reader.ReadElementContentAsString(); else if (reader.Name == "CheckSABnzbd") @@ -568,6 +596,8 @@ public void load(XmlReader reader) ResumeDatPath = reader.ReadElementContentAsString(); else if (reader.Name == "SearchRSS") SearchRSS = reader.ReadElementContentAsBoolean(); + else if (reader.Name == "SearchJSON") + SearchJSON = reader.ReadElementContentAsBoolean(); else if (reader.Name == "EpImgs") EpTBNs = reader.ReadElementContentAsBoolean(); else if (reader.Name == "NFOs") //support legacy tag @@ -598,7 +628,7 @@ public void load(XmlReader reader) else if (reader.Name == "RenameCheck") RenameCheck = reader.ReadElementContentAsBoolean(); else if (reader.Name == "PreventMove") - PreventMove = reader.ReadElementContentAsBoolean(); + PreventMove = reader.ReadElementContentAsBoolean(); else if (reader.Name == "CheckuTorrent") CheckuTorrent = reader.ReadElementContentAsBoolean(); else if (reader.Name == "CheckqBitTorrent") @@ -671,18 +701,20 @@ public void load(XmlReader reader) AutoAddMovieTerms = reader.ReadElementContentAsString(); else if (reader.Name == "AutoAddIgnoreSuffixes") AutoAddIgnoreSuffixes = reader.ReadElementContentAsString(); + else if (reader.Name == "PriorityReplaceTerms") + PriorityReplaceTerms = reader.ReadElementContentAsString(); else if (reader.Name == "BetaMode") mode = (BetaMode)reader.ReadElementContentAsInt(); else if (reader.Name == "PercentDirtyUpgrade") upgradeDirtyPercent = reader.ReadElementContentAsFloat(); else if (reader.Name == "BaseSeasonName") - defaultSeasonWord = reader.ReadElementContentAsString( ); + defaultSeasonWord = reader.ReadElementContentAsString(); else if (reader.Name == "SearchSeasonNames") searchSeasonWordsString = reader.ReadElementContentAsString(); else if (reader.Name == "PreferredRSSSearchTerms") preferredRSSSearchTermsString = reader.ReadElementContentAsString(); else if (reader.Name == "KeepTogetherType") - keepTogetherMode = (KeepTogetherModes) reader.ReadElementContentAsInt(); + keepTogetherMode = (KeepTogetherModes)reader.ReadElementContentAsInt(); else if (reader.Name == "KeepTogetherExtensions") keepTogetherExtensionsString = reader.ReadElementContentAsString(); else if (reader.Name == "FNPRegexs" && !reader.IsEmptyElement) @@ -822,6 +854,7 @@ public void load(XmlReader reader) } reader.Read(); } + else reader.ReadOuterXml(); } @@ -829,7 +862,14 @@ public void load(XmlReader reader) if (SeasonFolderFormat == string.Empty) { //this has not been set from the XML, so we should give it an appropriate default value - SeasonFolderFormat = defaultSeasonWord.Trim() +" " + (LeadingZeroOnSeason ? "{Season:2}": "{Season}"); + if (defaultSeasonWord.Length > 1) + { + SeasonFolderFormat = defaultSeasonWord.Trim() + " " + (LeadingZeroOnSeason ? "{Season:2}" : "{Season}"); + } + else + { + SeasonFolderFormat = defaultSeasonWord.Trim() + (LeadingZeroOnSeason ? "{Season:2}" : "{Season}"); + } } } @@ -878,11 +918,14 @@ public void WriteXML(XmlWriter writer) TheSearchers.WriteXml(writer); XmlHelper.WriteElementToXml(writer,"BGDownload",BGDownload); XmlHelper.WriteElementToXml(writer,"OfflineMode",OfflineMode); + XmlHelper.WriteElementToXml(writer,"ShowCollections", ShowCollections); + XmlHelper.WriteElementToXml(writer, "DeleteShowFromDisk", DeleteShowFromDisk); + XmlHelper.WriteElementToXml(writer, "ReplaceWithBetterQuality", ReplaceWithBetterQuality); writer.WriteStartElement("Replacements"); foreach (Replacement R in Replacements) { writer.WriteStartElement("Replace"); - XmlHelper.WriteAttributeToXml(writer,"This",R.This); + XmlHelper.WriteAttributeToXml(writer, "This", R.This); XmlHelper.WriteAttributeToXml(writer, "That", R.That); XmlHelper.WriteAttributeToXml(writer, "CaseInsensitive", R.CaseInsensitive ? "Y" : "N"); writer.WriteEndElement(); //Replace @@ -936,6 +979,7 @@ public void WriteXML(XmlWriter writer) XmlHelper.WriteElementToXml(writer,"uTorrentPath",uTorrentPath); XmlHelper.WriteElementToXml(writer,"ResumeDatPath",ResumeDatPath); XmlHelper.WriteElementToXml(writer,"SearchRSS",SearchRSS); + XmlHelper.WriteElementToXml(writer, "SearchJSON", SearchJSON); XmlHelper.WriteElementToXml(writer,"EpImgs",EpTBNs); XmlHelper.WriteElementToXml(writer,"NFOShows",NFOShows); XmlHelper.WriteElementToXml(writer,"NFOEpisodes", NFOEpisodes); @@ -994,6 +1038,11 @@ public void WriteXML(XmlWriter writer) XmlHelper.WriteElementToXml(writer, "BulkAddCompareNoVideoFolders", BulkAddCompareNoVideoFolders); XmlHelper.WriteElementToXml(writer, "AutoAddMovieTerms", AutoAddMovieTerms); XmlHelper.WriteElementToXml(writer, "AutoAddIgnoreSuffixes", AutoAddIgnoreSuffixes); + XmlHelper.WriteElementToXml(writer, "SearchJSONURL", SearchJSONURL); + XmlHelper.WriteElementToXml(writer, "SearchJSONRootNode", SearchJSONRootNode); + XmlHelper.WriteElementToXml(writer, "SearchJSONFilenameToken", SearchJSONFilenameToken); + XmlHelper.WriteElementToXml(writer, "SearchJSONURLToken", SearchJSONURLToken); + XmlHelper.WriteElementToXml(writer, "PriorityReplaceTerms", PriorityReplaceTerms); writer.WriteStartElement("FNPRegexs"); foreach (FilenameProcessorRE re in FNPRegexs) @@ -1185,14 +1234,14 @@ public bool UsefulExtension(string sn, bool otherExtensionsToo) { foreach (string s in VideoExtensionsArray) { - if (sn.ToLower() == s.ToLower()) + if (String.Equals(sn, s, StringComparison.CurrentCultureIgnoreCase)) return true; } if (otherExtensionsToo) { foreach (string s in OtherExtensionsArray) { - if (sn.ToLower() == s.ToLower()) + if (String.Equals(sn, s, StringComparison.CurrentCultureIgnoreCase)) return true; } } @@ -1284,6 +1333,7 @@ public bool KeepTogetherFilesWithType(string fileExtension) case KeepTogetherModes.All: return true; case KeepTogetherModes.Just: return keepTogetherExtensionsArray.Contains(fileExtension); case KeepTogetherModes.AllBut: return !keepTogetherExtensionsArray.Contains(fileExtension); + } return true; } diff --git a/TVRename/TVRename.csproj b/TVRename/TVRename.csproj index bec75db01..79130ff29 100644 --- a/TVRename/TVRename.csproj +++ b/TVRename/TVRename.csproj @@ -133,8 +133,16 @@ + + + + Form + + + AddEditCollection.cs + Form @@ -160,6 +168,7 @@ LogViewer.cs + @@ -206,11 +215,21 @@ TVRenameSplash.cs + + + + + + + + + + @@ -223,6 +242,7 @@ + @@ -335,10 +355,8 @@ - - @@ -401,6 +419,9 @@ + + AddEditCollection.cs + ActorsGrid.cs Designer diff --git a/TVRename/TVRename/ActionEngine.cs b/TVRename/TVRename/ActionEngine.cs index 31578d1b1..89039c5c8 100644 --- a/TVRename/TVRename/ActionEngine.cs +++ b/TVRename/TVRename/ActionEngine.cs @@ -272,7 +272,7 @@ private static ActionQueue[] ActionProcessorMakeQueues(ItemList theList) if (action is ActionWriteMetadata) // base interface that all metadata actions are derived from queues[2].Actions.Add(action); - else if ((action is ActionDownloadImage) || (action is ActionRSS)) + else if ((action is ActionDownloadImage) || (action is ActionTDownload)) queues[3].Actions.Add(action); else if (action is ActionCopyMoveRename rename) queues[rename.QuickOperation() ? 1 : 0].Actions.Add(rename); diff --git a/TVRename/TVRename/LVResults.cs b/TVRename/TVRename/LVResults.cs index d065fd0a0..95a3c2fbd 100644 --- a/TVRename/TVRename/LVResults.cs +++ b/TVRename/TVRename/LVResults.cs @@ -29,7 +29,7 @@ public enum WhichResults public System.Collections.Generic.List Missing; public System.Collections.Generic.List NFO; public System.Collections.Generic.List PyTivoMeta; - public System.Collections.Generic.List RSS; + public System.Collections.Generic.List RSS; public System.Collections.Generic.List Rename; public LVResults(ListView lv, bool isChecked) // if not checked, then selected items @@ -45,7 +45,7 @@ public LVResults(ListView lv, WhichResults which) public void Go(ListView lv, WhichResults which) { Missing = new System.Collections.Generic.List(); - RSS = new System.Collections.Generic.List(); + RSS = new System.Collections.Generic.List(); CopyMove = new System.Collections.Generic.List(); Rename = new System.Collections.Generic.List(); Download = new System.Collections.Generic.List(); @@ -97,7 +97,7 @@ public void Go(ListView lv, WhichResults which) } else if (action is ActionDownloadImage item) Download.Add(item); - else if (action is ActionRSS rss) + else if (action is ActionTDownload rss) RSS.Add(rss); else if (action is ItemMissing missing) Missing.Add(missing); diff --git a/TVRename/TVRename/PathManager.cs b/TVRename/TVRename/PathManager.cs index e78bd5944..d24a77312 100644 --- a/TVRename/TVRename/PathManager.cs +++ b/TVRename/TVRename/PathManager.cs @@ -11,13 +11,18 @@ public static class PathManager private const string UI_LAYOUT_FILE_NAME = "Layout.xml"; private const string STATISTICS_FILE_NAME = "Statistics.xml"; private const string LANGUAGES_FILE_NAME = "Languages.xml"; + private const string SHOWS_FILE_NAME = "TVRenameShows.xml"; + private const string SHOWS_COLLECTION_FILE_NAME = "TVRenameColls.xml"; + private const string SHOWS_DEFAULT_COLLECTION = "2.1"; private static string UserDefinedBasePath; + private static string SHOWS_COLLECTION = ""; public static FileInfo[] GetPossibleSettingsHistory() { return new DirectoryInfo(System.IO.Path.GetDirectoryName(TVDocSettingsFile.FullName)).GetFiles(SETTINGS_FILE_NAME + "*"); } + public static FileInfo[] GetPossibleTvdbHistory() { return new DirectoryInfo(System.IO.Path.GetDirectoryName(TVDocSettingsFile.FullName)).GetFiles(TVDB_FILE_NAME + "*"); @@ -49,6 +54,40 @@ private static FileInfo GetFileInfo(string path, string file) return new FileInfo(System.IO.Path.Combine(path, file)); } + public static string ShowCollection + { + get + { + return SHOWS_COLLECTION; + } + set + { + if (value != SHOWS_DEFAULT_COLLECTION) + { + SHOWS_COLLECTION = value; + } + else + { + SHOWS_COLLECTION = ""; + } + } + } + + public static FileInfo ShowCollectionFile + { + get + { + if (!string.IsNullOrEmpty(UserDefinedBasePath)) + { + return GetFileInfo(UserDefinedBasePath, SHOWS_COLLECTION_FILE_NAME); + } + else + { + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename"), SHOWS_COLLECTION_FILE_NAME); + } + } + } + public static FileInfo StatisticsFile { get @@ -59,7 +98,7 @@ public static FileInfo StatisticsFile } else { - return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", "2.1"), STATISTICS_FILE_NAME); + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? SHOWS_COLLECTION : SHOWS_DEFAULT_COLLECTION)), STATISTICS_FILE_NAME); } } } @@ -75,7 +114,7 @@ public static FileInfo UILayoutFile } else { - return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", "2.1"), UI_LAYOUT_FILE_NAME); + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? "" : SHOWS_DEFAULT_COLLECTION)), UI_LAYOUT_FILE_NAME); } } } @@ -91,7 +130,7 @@ public static FileInfo TVDBFile } else { - return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", "2.1"), TVDB_FILE_NAME); + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? SHOWS_COLLECTION : SHOWS_DEFAULT_COLLECTION)), TVDB_FILE_NAME); } } } @@ -107,7 +146,7 @@ public static FileInfo TVDocSettingsFile } else { - return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", "2.1"), SETTINGS_FILE_NAME); + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? "" : SHOWS_DEFAULT_COLLECTION)), SETTINGS_FILE_NAME); } } } @@ -122,7 +161,22 @@ public static FileInfo LanguagesFile } else { - return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", "2.1"), LANGUAGES_FILE_NAME); + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? "" : SHOWS_DEFAULT_COLLECTION)), LANGUAGES_FILE_NAME); + } + } + } + + public static FileInfo TVDocShowsFile + { + get + { + if (!string.IsNullOrEmpty(UserDefinedBasePath)) + { + return GetFileInfo(UserDefinedBasePath, SHOWS_FILE_NAME); + } + else + { + return GetFileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TVRename", "TVRename", (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? SHOWS_COLLECTION : SHOWS_DEFAULT_COLLECTION)), (!string.IsNullOrEmpty(SHOWS_COLLECTION) ? SHOWS_FILE_NAME : SETTINGS_FILE_NAME)); } } } diff --git a/TVRename/TVRename/ShowCollection.cs b/TVRename/TVRename/ShowCollection.cs new file mode 100644 index 000000000..0dcbd51f9 --- /dev/null +++ b/TVRename/TVRename/ShowCollection.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using Alphaleonis.Win32.Filesystem; +using System.Text.RegularExpressions; +using System.Threading; +using System.Windows.Forms; +using System.Linq; +using System.Xml; +using Directory = Alphaleonis.Win32.Filesystem.Directory; +using DirectoryInfo = Alphaleonis.Win32.Filesystem.DirectoryInfo; +using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; +using System.Text; +using NodaTime.Extensions; + +namespace TVRename +{ + public class ShowCollection + { + public string Path { get; set; } + public string Name { get; set; } + public string Description { get; set; } + + public ShowCollection (string Pa) + { + Path = Pa; + } + + public ShowCollection (XmlReader reader) + { + LoadXMLCollectionItem(reader); + } + + public void WriteXMLCollectionItem (XmlWriter writer) + { + writer.WriteStartElement("CollectionItem"); + XmlHelper.WriteElementToXml(writer, "Path", Path); + XmlHelper.WriteElementToXml(writer, "Name", Name); + XmlHelper.WriteElementToXml(writer, "Description", Description); + writer.WriteEndElement(); + } + + private void LoadXMLCollectionItem (XmlReader reader) + { + reader.Read(); + while (!reader.EOF) + { + if ((reader.Name == "CollectionItem") && (!reader.IsStartElement())) + { + break; + } + + if (reader.Name == "Path") + { + Path = reader.ReadElementContentAsString(); + } + if (reader.Name == "Name") + { + Name = reader.ReadElementContentAsString(); + } + if (reader.Name == "Description") + { + Description = reader.ReadElementContentAsString(); + } + else + { + reader.ReadOuterXml(); + } + } + } + } +} diff --git a/TVRename/TVRename/TVDoc.cs b/TVRename/TVRename/TVDoc.cs index f12605c25..fa6a3efae 100644 --- a/TVRename/TVRename/TVDoc.cs +++ b/TVRename/TVRename/TVDoc.cs @@ -26,9 +26,18 @@ namespace TVRename { + public enum FileToHandle + { + Collections = 1, + Settings = 2, + Shows = 4, + TvDB = 8 + } + // ReSharper disable once InconsistentNaming public class TVDoc : IDisposable { + public readonly List ShowCollections; private readonly DownloadIdentifiersController downloadIdentifiers; private readonly List finders; public readonly ShowLibrary Library; @@ -49,21 +58,22 @@ public class TVDoc : IDisposable private bool currentlyBusy = false; // This is set to true when scanning and indicates to other objects not to commence a scan of their own private DateTime busySince; - public TVDoc(FileInfo settingsFile, CommandLineArgs args) + public TVDoc(CommandLineArgs args) { Args = args; - Library = new ShowLibrary(); - mStats = new TVRenameStats(); - actionManager = new ActionEngine(mStats); - cacheManager = new CacheUpdater(); + ShowCollections = new List(); + Library = new ShowLibrary(); + mStats = new TVRenameStats(); + actionManager = new ActionEngine(mStats); + cacheManager = new CacheUpdater(); - mDirty = false; - TheActionList = new ItemList(); + mDirty = false; + TheActionList = new ItemList(); - actionCancel = false; + actionCancel = false; - scanProgDlg = null; + scanProgDlg = null; finders = new List //These should be in order { @@ -71,12 +81,28 @@ public TVDoc(FileInfo settingsFile, CommandLineArgs args) new uTorrentFinder(this), new qBitTorrentFinder(this), new SABnzbdFinder(this), + new JSONFinder(this), new RSSFinder(this) //RSS Finder Should Be last as it is the finder if all others fail }; downloadIdentifiers = new DownloadIdentifiersController(); + LoadOk = LoadXMLFile(FileToHandle.Collections, true); - LoadOk = ((settingsFile == null) || LoadXMLSettings(settingsFile)) && TheTVDB.Instance.LoadOk; + if (LoadOk) + { + LoadOk = LoadXMLFile(FileToHandle.TvDB | FileToHandle.Settings | FileToHandle.Shows, true); + } + } + + public void SwitchToCollection (string Collection) + { + PathManager.ShowCollection = Collection; + Library.Clear(); + TheActionList.Clear(); + + TheTVDB.Instance.ClearCache(); + + LoadXMLFile(FileToHandle.TvDB | FileToHandle.Settings | FileToHandle.Shows, false); } public TVRenameStats Stats() @@ -244,28 +270,91 @@ private static List FindEpOnDisk(DirFilesCache dfc, ShowItem si, Episo return ret; } - // ReSharper disable once InconsistentNaming - public void WriteXMLSettings() + public void WriteXMLFile (FileToHandle Files) { - // backup old settings before writing new ones - FileHelper.Rotate(PathManager.TVDocSettingsFile.FullName); - Logger.Info("Saving Settings to {0}", PathManager.TVDocSettingsFile.FullName); - XmlWriterSettings settings = new XmlWriterSettings { Indent = true, NewLineOnAttributes = true }; - using (XmlWriter writer = XmlWriter.Create(PathManager.TVDocSettingsFile.FullName, settings)) + if ( Files.HasFlag(FileToHandle.Collections) ) + { + FileHelper.Rotate(PathManager.ShowCollectionFile.FullName); + Logger.Info("Saving Collections to {0}", PathManager.ShowCollectionFile.FullName); + XmlWriter writer = XmlWriter.Create(PathManager.ShowCollectionFile.FullName, settings); + WriteXMLCollections(writer); + } + if ( Files.HasFlag(FileToHandle.Settings) ) + { + FileHelper.Rotate(PathManager.TVDocSettingsFile.FullName); + Logger.Info("Saving Settings to {0}", PathManager.TVDocSettingsFile.FullName); + XmlWriter writer = XmlWriter.Create(PathManager.TVDocSettingsFile.FullName, settings); + WriteXMLSettings(writer); + } + if ((Files.HasFlag(FileToHandle.Shows)) && (!string.IsNullOrEmpty(PathManager.ShowCollection))) + { + FileHelper.Rotate(PathManager.TVDocShowsFile.FullName); + Logger.Info("Saving Shows to {0}", PathManager.TVDocShowsFile.FullName); + XmlWriter writer = XmlWriter.Create(PathManager.TVDocShowsFile.FullName, settings); + WriteXMLHeader(writer); + WriteXMLShows(writer); + } + + if (Files.HasFlag(FileToHandle.TvDB)) + { + TheTVDB.Instance.SaveCache(); + } + } + + private void WriteXMLCollections(XmlWriter writer) + { + using (writer) { - writer.WriteStartDocument(); - writer.WriteStartElement("TVRename"); + WriteXMLHeader(writer); + + writer.WriteStartElement("Collections"); + foreach (ShowCollection sc in ShowCollections) + { + sc.WriteXMLCollectionItem(writer); + } - XmlHelper.WriteAttributeToXml(writer, "Version", "2.1"); + writer.WriteEndElement(); // Collections + XmlHelper.WriteElementToXml(writer, "Current", (PathManager.ShowCollection == "" ? "2.1" : PathManager.ShowCollection)); + + WriteXMLFooter(writer); + } + } + + // ReSharper disable once InconsistentNaming + private void WriteXMLSettings(XmlWriter writer) + { + using (writer) + { + WriteXMLHeader(writer); TVSettings.Instance.WriteXML(writer); // + if (string.IsNullOrEmpty(PathManager.ShowCollection)) + { + WriteXMLShows(writer); + } + else + { + WriteXMLFooter(writer); + } + } + + TheTVDB.Instance.LanguageList.Save(); + + mDirty = false; + + } + + private void WriteXMLShows(XmlWriter writer) + { + using (writer) + { writer.WriteStartElement("MyShows"); foreach (ShowItem si in Library.Values) si.WriteXmlSettings(writer); @@ -274,10 +363,8 @@ public void WriteXMLSettings() XmlHelper.WriteStringsToXml(TVSettings.Instance.LibraryFolders, writer, "MonitorFolders", "Folder"); XmlHelper.WriteStringsToXml(TVSettings.Instance.IgnoreFolders, writer, "IgnoreFolders", "Folder"); - XmlHelper.WriteStringsToXml(TVSettings.Instance.DownloadFolders, writer, "FinderSearchFolders", - "Folder"); - XmlHelper.WriteStringsToXml(TVSettings.Instance.IgnoredAutoAddHints, writer, "IgnoredAutoAddHints", - "Hint"); + XmlHelper.WriteStringsToXml(TVSettings.Instance.DownloadFolders, writer, "FinderSearchFolders", "Folder"); + XmlHelper.WriteStringsToXml(TVSettings.Instance.IgnoredAutoAddHints, writer, "IgnoredAutoAddHints", "Hint"); writer.WriteStartElement("IgnoreItems"); foreach (IgnoreItem ii in TVSettings.Instance.Ignore) @@ -285,8 +372,7 @@ public void WriteXMLSettings() writer.WriteEndElement(); // IgnoreItems - writer.WriteEndElement(); // tvrename - writer.WriteEndDocument(); + WriteXMLFooter(writer); } mDirty = false; @@ -294,119 +380,380 @@ public void WriteXMLSettings() TheTVDB.Instance.LanguageList.Save(); } - // ReSharper disable once InconsistentNaming - private bool LoadXMLSettings(FileInfo from) + private static void WriteXMLHeader(XmlWriter writer) { - Logger.Info("Loading Settings from {0}", from?.FullName); - if (from == null) - return true; + writer.WriteStartDocument(); + writer.WriteStartElement("TVRename"); - try + XmlHelper.WriteAttributeToXml(writer, "Version", "2.1"); + } + + private static void WriteXMLFooter(XmlWriter writer) + { + writer.WriteEndElement(); // tvrename + writer.WriteEndDocument(); + } + + private bool LoadXMLFile (FileToHandle Files, bool bInit) + { + bool bLoadOk = false; + XmlReaderSettings settings = new XmlReaderSettings + { + IgnoreComments = true, + IgnoreWhitespace = true + }; + + if (Files.HasFlag(FileToHandle.Collections)) + { + bLoadOk = ReadXMLCollections(settings, ShowCollections, LoadErr); + } + if (Files.HasFlag(FileToHandle.TvDB)) + { + bLoadOk = ReadXMLTvDBCache(bInit, Args); + } + if (Files.HasFlag(FileToHandle.Settings)) + { + bLoadOk = ReadXMLSettings(settings, LoadErr); + } + if (Files.HasFlag(FileToHandle.Shows) ) + { + bLoadOk = ReadXMLShows(settings, Library, mStats, LoadErr); + } + + return bLoadOk; + } + + private static bool ReadXMLCollections(XmlReaderSettings settings, List lSc, string Err) + { + bool bLoadOk; + FileInfo showColls = PathManager.ShowCollectionFile; + Logger.Info("Loading Collections from {0}", showColls.FullName); + if (showColls == null) { - XmlReaderSettings settings = new XmlReaderSettings + bLoadOk = true; + } + else + { + try + { + XmlReader reader = XmlReader.Create(showColls.FullName, settings); + bLoadOk = LoadXMLCollections(reader, showColls, lSc, Err); + } + catch (Exception e) { - IgnoreComments = true, - IgnoreWhitespace = true - }; + if (!showColls.Exists) + { + bLoadOk = true; + } + else + { + Logger.Warn(e, "Problem on Startup loading Collection File"); + Err = showColls.Name + " : " + e.Message; + bLoadOk = false; + } + } + } + return bLoadOk; + } - if (!from.Exists) + private static bool ReadXMLTvDBCache (bool bInit, CommandLineArgs args) + { + bool bLoadOk; + FileInfo tvdbFile = PathManager.TVDBFile; + if (tvdbFile == null) + { + bLoadOk = true; + } + else + { + if (bInit) { - return true; // that's ok + TheTVDB.Instance.Setup(tvdbFile, PathManager.TVDBFile, args); } + else + { + TheTVDB.Instance.RelaodCache(tvdbFile, PathManager.TVDBFile); + } + bLoadOk = TheTVDB.Instance.LoadOk; + } + return bLoadOk; + } - using (XmlReader reader = XmlReader.Create(from.FullName, settings)) + private static bool LoadXMLCollections(XmlReader reader, FileInfo from, List lSc, string Err) + { + using (reader) + { + bool bGoodHeader = ReadXmlHeaderFromFile(reader, from, "Collections", Err); + if (bGoodHeader) { - reader.Read(); - if (reader.Name != "xml") + while (!reader.EOF) { - LoadErr = from.Name + " : Not a valid XML file"; - return false; + if (reader.Name == "TVRename" && !reader.IsStartElement()) + { + break; // end of it all + } + + if (reader.Name == "Collections") + { + LoadXMLEveryCollection(reader, lSc); + } + else if (reader.Name == "Current") + { + PathManager.ShowCollection = reader.ReadElementContentAsString(); + } + else + { + reader.ReadOuterXml(); + } + reader.Read(); } + } + } + + return true; + } - reader.Read(); + private static void LoadXMLEveryCollection (XmlReader reader, List Lsc) + { + while (!reader.EOF) + { + reader.Read(); - if (reader.Name != "TVRename") + if ((reader.Name == "Collections") && (!reader.IsStartElement())) + { + break; + } + + if (reader.Name == "CollectionItem") + { + ShowCollection Collection = new ShowCollection(reader); + + Lsc.Add(Collection); + } + else + { + reader.ReadOuterXml(); + } + } + } + + private static bool ReadXMLSettings(XmlReaderSettings settings, string Err) + { + bool bLoadOk; + + FileInfo settingsFile = PathManager.TVDocSettingsFile; + Logger.Info("Loading Settings from {0}", settingsFile.FullName); + if (settingsFile == null) + { + bLoadOk = true; + } + else + { + try + { + XmlReader reader = XmlReader.Create(settingsFile.FullName, settings); + bLoadOk = LoadXMLSettings(reader, settingsFile, Err); + } + catch (Exception e) + { + if (!settingsFile.Exists) { - LoadErr = from.Name + " : Not a TVRename settings file"; - return false; + bLoadOk = true; } - - if (reader.GetAttribute("Version") != "2.1") + else { - LoadErr = from.Name + " : Incompatible version"; - return false; + Logger.Warn(e, "Problem on Startup loading Settings File"); + Err = settingsFile.Name + " : " + e.Message; + bLoadOk = false; } + } + + try + { + TheTVDB.Instance.LanguageList = Languages.Load(); + } + catch (Exception) + { + // not worried if language loading fails as we'll repopulate + } - reader.Read(); // move forward one + } + return bLoadOk; + } + // ReSharper disable once InconsistentNaming + private static bool LoadXMLSettings(XmlReader reader, FileInfo from, string Err) + { + using (reader) + { + bool bGoodHeader = ReadXmlHeaderFromFile(reader, from, "Settings", Err); + if (bGoodHeader) + { while (!reader.EOF) { if (reader.Name == "TVRename" && !reader.IsStartElement()) + { break; // end of it all + } if (reader.Name == "Settings") { TVSettings.Instance.load(reader.ReadSubtree()); reader.Read(); } - else if (reader.Name == "MyShows") + else { - Library.LoadFromXml(reader.ReadSubtree()); - reader.Read(); + reader.ReadOuterXml(); } - else if (reader.Name == "MonitorFolders") - TVSettings.Instance.LibraryFolders = - XmlHelper.ReadStringsFromXml(reader, "MonitorFolders", "Folder"); - else if (reader.Name == "IgnoreFolders") - TVSettings.Instance.IgnoreFolders = - XmlHelper.ReadStringsFromXml(reader, "IgnoreFolders", "Folder"); - else if (reader.Name == "FinderSearchFolders") - TVSettings.Instance.DownloadFolders = - XmlHelper.ReadStringsFromXml(reader, "FinderSearchFolders", "Folder"); - else if (reader.Name == "IgnoredAutoAddHints") - TVSettings.Instance.IgnoredAutoAddHints = - XmlHelper.ReadStringsFromXml(reader, "IgnoredAutoAddHints", "Hint"); - else if (reader.Name == "IgnoreItems") + } + } + } + return true; + } + + private static bool ReadXMLShows(XmlReaderSettings settings, ShowLibrary Sl, TVRenameStats St, string Err) + { + bool bLoadOk; + FileInfo showsFile = PathManager.TVDocShowsFile; + Logger.Info("Loading Shows from {0}", showsFile.FullName); + if (showsFile == null) + { + bLoadOk = true; + } + else + { + try + { + XmlReader reader = XmlReader.Create(showsFile.FullName, settings); + bLoadOk = LoadXMLSHows(reader, showsFile, Sl, Err); + try + { + St = TVRenameStats.Load(); + } + catch (Exception) + { + // not worried if stats loading fails + } + } + catch (Exception e) + { + if (!showsFile.Exists) + { + bLoadOk = true; + } + else + { + Logger.Warn(e, "Problem on Startup loading Shows File"); + Err = showsFile.Name + " : " + e.Message; + bLoadOk = false; + } + } + } + return bLoadOk; + } + + private static bool LoadXMLSHows(XmlReader reader, FileInfo from, ShowLibrary Sl, string Err) + { + using (reader) + { + bool bGoodHeader = ReadXmlHeaderFromFile(reader, from, "Shows", Err); + if (bGoodHeader) + { + while (!reader.EOF) + { + if (reader.Name == "TVRename" && !reader.IsStartElement()) { - XmlReader r2 = reader.ReadSubtree(); - r2.Read(); - r2.Read(); - while (r2.Name == "Ignore") - TVSettings.Instance.Ignore.Add(new IgnoreItem(r2)); + break; // end of it all + } + if (reader.Name == "MyShows") + { + Sl.LoadFromXml(reader.ReadSubtree()); reader.Read(); } - else - reader.ReadOuterXml(); + LoadXMLShowFolderStuff(reader); } } } - catch (Exception e) + + return true; + } + + private static void LoadXMLShowFolderStuff(XmlReader reader) + { + if (reader.Name == "MonitorFolders") { - Logger.Warn(e, "Problem on Startup loading File"); - LoadErr = from.Name + " : " + e.Message; - return false; + TVSettings.Instance.LibraryFolders = + XmlHelper.ReadStringsFromXml(reader, "MonitorFolders", "Folder"); } - - try + else if (reader.Name == "IgnoreFolders") { - mStats = TVRenameStats.Load(); + TVSettings.Instance.IgnoreFolders = + XmlHelper.ReadStringsFromXml(reader, "IgnoreFolders", "Folder"); + } + else if (reader.Name == "FinderSearchFolders") + { + TVSettings.Instance.DownloadFolders = + XmlHelper.ReadStringsFromXml(reader, "FinderSearchFolders", "Folder"); } - catch (Exception) + else if (reader.Name == "IgnoredAutoAddHints") { - // not worried if stats loading fails + TVSettings.Instance.IgnoredAutoAddHints = + XmlHelper.ReadStringsFromXml(reader, "IgnoredAutoAddHints", "Hint"); } + else if (reader.Name == "IgnoreItems") + { + XmlReader r2 = reader.ReadSubtree(); + r2.Read(); + r2.Read(); + while (r2.Name == "Ignore") + { + TVSettings.Instance.Ignore.Add(new IgnoreItem(r2)); + } - try + reader.Read(); + } + else { - TheTVDB.Instance.LanguageList = Languages.Load(); + reader.ReadOuterXml(); } - catch (Exception) + } + + private static bool ReadXmlHeaderFromFile (XmlReader reader, FileInfo from, string contains, string Err) + { + bool bIsValidHeader; + + reader.Read(); + if (reader.Name != "xml") { - // not worried if language loading fails as we'll repopulate + Err = from.Name + " : Not a valid XML file"; + bIsValidHeader = false; + } + else + { + reader.Read(); + if (reader.Name != "TVRename") + { + Err = from.Name + " : Not a TVRename " + contains + " file"; + bIsValidHeader = false; + } + else + { + if (reader.GetAttribute("Version") != "2.1") + { + Err = from.Name + " : Incompatible version"; + bIsValidHeader = false; + } + else + { + reader.Read(); // move forward one + Err = ""; + bIsValidHeader = true; + } + } } - return true; + return bIsValidHeader; } private void OutputActionFiles(TVSettings.ScanType st) @@ -461,17 +808,6 @@ public void WriteUpcoming() } } - private static bool ListHasMissingItems(ItemList l) - { - foreach (Item i in l) - { - if (i is ItemMissing) - return true; - } - - return false; - } - public void Scan(List shows, bool unattended, TVSettings.ScanType st) { try @@ -513,6 +849,7 @@ public void Scan(List shows, bool unattended, TVSettings.ScanType st) catch (Exception e) { Logger.Fatal(e, "Unhandled Exception in ScanWorker"); + } finally { @@ -544,7 +881,7 @@ private void SetupScanUi() bool anyActiveFileFinders = finders.Any(x => x.Active() && x.DisplayType() == Finder.FinderDisplayType.local); bool anyActiveRssFinders = - finders.Any(x => x.Active() && x.DisplayType() == Finder.FinderDisplayType.rss); + finders.Any(x => x.Active() && x.DisplayType() == Finder.FinderDisplayType.search); scanProgDlg = new ScanProgress( TVSettings.Instance.RenameCheck || TVSettings.Instance.MissingCheck, @@ -589,6 +926,49 @@ public void DoAllActions() AllowAutoScan(); } + protected internal void LogShowEpisodeSizes() + { + PreventAutoScan("Find Double Episodes"); + StringBuilder output = new StringBuilder(); + + output.AppendLine(""); + output.AppendLine("##################################################"); + output.AppendLine("File Quailty FINDER - Start"); + output.AppendLine("##################################################"); + Logger.Info(output.ToString()); + + DirFilesCache dfc = new DirFilesCache(); + foreach (ShowItem si in Library.Values) + { + if (si.ShowName != "The Armando Iannucci Shows") continue; + + foreach (KeyValuePair> kvp in si.SeasonEpisodes) + { + foreach (ProcessedEpisode pep in kvp.Value) + { + List files = FindEpOnDisk(dfc, pep); + foreach (FileInfo file in files) + { + int width = file.GetFrameWidth(); + int height = file.GetFrameHeight(); + int length = file.GetFilmLength(); + Logger.Info($"{width,-10} {height,-10} {length,-10} {pep.Show.ShowName,-50} {file.Name}"); + + Logger.Info(file.GetFilmDetails); + } + } + } + } + + output.Clear(); + output.AppendLine("##################################################"); + output.AppendLine("File Quailty FINDER - End"); + output.AppendLine("##################################################"); + + Logger.Info(output.ToString()); + AllowAutoScan(); + } + protected internal List FindDoubleEps() { PreventAutoScan("Find Double Episodes"); @@ -618,7 +998,7 @@ protected internal List FindDoubleEps() //Search through each pair of episodes for the same season foreach (ProcessedEpisode pep in kvp.Value) { - SearchForDuplicates(pep,output,si,kvp.Key,kvp.Value,dfc,returnValue); + SearchForDuplicates(pep, output, si, kvp.Key, kvp.Value, dfc, returnValue); } } } @@ -985,37 +1365,78 @@ private void FindUnusedFilesInDLDirectory(ICollection showList) if (FileHelper.IgnoreFile(fi)) continue; - List matchingShows = new List(); - - foreach (ShowItem si in showList) - { - if (si.GetSimplifiedPossibleShowNames() + List matchingShows = showList.Where(si => si.GetSimplifiedPossibleShowNames() .Any(name => FileHelper.SimplifyAndCheckFilename(fi.Name, name))) - matchingShows.Add(si); - } + .ToList(); - if (matchingShows.Count > 0) + if (matchingShows.Count <= 0) continue; + + bool fileCanBeDeleted = true; + ProcessedEpisode firstMatchingPep = null; + + foreach (ShowItem si in matchingShows) { - bool fileCanBeRemoved = true; + FindSeasEp(fi, out int seasF, out int epF, out int _, si, out FilenameProcessorRE _); + SeriesInfo s = si.TheSeries(); + Episode ep = s.GetEpisode(seasF, epF, si.DvdOrder); + ProcessedEpisode pep = new ProcessedEpisode(ep, si); + firstMatchingPep = pep; + List encumbants = TVDoc.FindEpOnDisk(dfc, pep, false); - foreach (ShowItem si in matchingShows) + if (encumbants.Count == 0) { - if (FileNeeded(fi, si, dfc)) fileCanBeRemoved = false; + //File is needed as there are no + fileCanBeDeleted = false; } - if (fileCanBeRemoved) + foreach (FileInfo existingFile in encumbants) { - ShowItem si = matchingShows[0]; //Choose the first series - FindSeasEp(fi, out int seasF, out int epF, out int _, si, out FilenameProcessorRE _); - SeriesInfo s = si.TheSeries(); - Episode ep = s.GetEpisode(seasF, epF, si.DvdOrder); - ProcessedEpisode pep = new ProcessedEpisode(ep, si); - Logger.Info( - $"Removing {fi.FullName} as it matches {matchingShows[0].ShowName} and no episodes are needed"); + FileHelper.VideoComparison result = FileHelper.BetterQualityFile(existingFile, fi); + if (result == FileHelper.VideoComparison.SecondFileBetter) + { + fileCanBeDeleted = false; - TheActionList.Add(new ActionDeleteFile(fi, pep, TVSettings.Instance.Tidyup)); + if (TVSettings.Instance.ReplaceWithBetterQuality) + { + if (existingFile.Extension != fi.Extension) + { + TheActionList.Add(new ActionDeleteFile(existingFile, pep, null)); + TheActionList.Add(new ActionCopyMoveRename(fi, existingFile.WithExtension(fi.Extension), pep)); + } + else + { + TheActionList.Add(new ActionCopyMoveRename(fi, existingFile, pep)); + } + + + + Logger.Info( + $"Using {fi.FullName} to replace {existingFile.FullName} as it is better quality"); + } + else + { + Logger.Warn( + $"Keeping {fi.FullName} as it is better quality than some of the current files for that show (Auto Replace with better quality file sis turned off)"); + } + } + else if (result == FileHelper.VideoComparison.CantTell || + result == FileHelper.VideoComparison.Similar) + { + fileCanBeDeleted = false; + Logger.Info( + $"Keeping {fi.FullName} as it might be better quality than {existingFile.FullName}"); + } + //the other cases of the files being the same or the existing file being better are not enough to save the file } } + + if (fileCanBeDeleted) + { + Logger.Info( + $"Removing {fi.FullName} as it matches {string.Join(", ", matchingShows.Select(s => s.ShowName))} and no episodes are needed"); + + TheActionList.Add(new ActionDeleteFile(fi, firstMatchingPep, TVSettings.Instance.Tidyup)); + } } } catch (UnauthorizedAccessException ex) @@ -1027,48 +1448,48 @@ private void FindUnusedFilesInDLDirectory(ICollection showList) { foreach (string subDirPath in Directory.GetDirectories(dirPath, "*", System.IO.SearchOption.AllDirectories)) - { - if (!Directory.Exists(subDirPath)) continue; - - DirectoryInfo di = new DirectoryInfo(subDirPath); + { + if (!Directory.Exists(subDirPath)) continue; - List matchingShows = new List(); + DirectoryInfo di = new DirectoryInfo(subDirPath); - foreach (ShowItem si in showList) - { - if (si.GetSimplifiedPossibleShowNames() - .Any(name => FileHelper.SimplifyAndCheckFilename(di.Name, name))) - matchingShows.Add(si); - } + List matchingShows = new List(); - if (matchingShows.Count > 0) - { - bool dirCanBeRemoved = true; + foreach (ShowItem si in showList) + { + if (si.GetSimplifiedPossibleShowNames() + .Any(name => FileHelper.SimplifyAndCheckFilename(di.Name, name))) + matchingShows.Add(si); + } - foreach (ShowItem si in matchingShows) + if (matchingShows.Count > 0) { - if (FileNeeded(di, si, dfc)) + bool dirCanBeRemoved = true; + + foreach (ShowItem si in matchingShows) { - Logger.Info($"Not removing {di.FullName} as it may be needed for {si.ShowName}"); - dirCanBeRemoved = false; + if (FileNeeded(di, si, dfc)) + { + Logger.Info($"Not removing {di.FullName} as it may be needed for {si.ShowName}"); + dirCanBeRemoved = false; + } } - } - if (dirCanBeRemoved) - { - ShowItem si = matchingShows[0]; //Choose the first series - FindSeasEp(di, out int seasF, out int epF, si, out FilenameProcessorRE _); - SeriesInfo s = si.TheSeries(); - Episode ep = s.GetEpisode(seasF, epF, si.DvdOrder); - ProcessedEpisode pep = new ProcessedEpisode(ep, si); - Logger.Info( - $"Removing {di.FullName} as it matches {matchingShows[0].ShowName} and no episodes are needed"); + if (dirCanBeRemoved) + { + ShowItem si = matchingShows[0]; //Choose the first series + FindSeasEp(di, out int seasF, out int epF, si, out FilenameProcessorRE _); + SeriesInfo s = si.TheSeries(); + Episode ep = s.GetEpisode(seasF, epF, si.DvdOrder); + ProcessedEpisode pep = new ProcessedEpisode(ep, si); + Logger.Info( + $"Removing {di.FullName} as it matches {matchingShows[0].ShowName} and no episodes are needed"); - TheActionList.Add(new ActionDeleteDirectory(di, pep, TVSettings.Instance.Tidyup)); + TheActionList.Add(new ActionDeleteDirectory(di, pep, TVSettings.Instance.Tidyup)); + } } } } - } catch (UnauthorizedAccessException ex) { Logger.Warn(ex, $"Could not access subdirectories of {dirPath}"); @@ -1080,7 +1501,7 @@ private static bool FileNeeded(FileInfo fi, ShowItem si, DirFilesCache dfc) { if (FindSeasEp(fi, out int seasF, out int epF, out _, si, out _)) { - return EpisodeNeeded(si, dfc, seasF, epF,fi); + return EpisodeNeeded(si, dfc, seasF, epF, fi); } //We may need the file @@ -1091,14 +1512,14 @@ private static bool FileNeeded(DirectoryInfo di, ShowItem si, DirFilesCache dfc) { if (FindSeasEp(di, out int seasF, out int epF, si, out _)) { - return EpisodeNeeded(si, dfc, seasF, epF,di); + return EpisodeNeeded(si, dfc, seasF, epF, di); } //We may need the file return true; } - private static bool EpisodeNeeded(ShowItem si, DirFilesCache dfc, int seasF, int epF,FileSystemInfo fi) + private static bool EpisodeNeeded(ShowItem si, DirFilesCache dfc, int seasF, int epF, FileSystemInfo fi) { try { @@ -1262,7 +1683,7 @@ private void RenameAndMissingCheck(SetProgressDelegate prog, ICollection> allFolders = si.AllFolderLocations(); if (allFolders.Count == 0) // no folders defined for this show @@ -1323,7 +1744,7 @@ private void RenameAndMissingCheck(ShowItem si, DirFilesCache dfc,bool fullscan) } // base folder: - if (!string.IsNullOrEmpty(si.AutoAddFolderBase) && (si.AutoAddType!= ShowItem.AutomaticFolderType.none)) + if (!string.IsNullOrEmpty(si.AutoAddFolderBase) && (si.AutoAddType != ShowItem.AutomaticFolderType.none)) { // main image for the folder itself TheActionList.Add(downloadIdentifiers.ProcessShow(si)); @@ -1382,14 +1803,14 @@ private void RenameAndMissingCheck(ShowItem si, DirFilesCache dfc,bool fullscan) ProcessedEpisode ep = eps[epIdx]; FileInfo actualFile = fi; - if (renCheck && TVSettings.Instance.FileHasUsefulExtension( fi, true, out string otherExtension)) // == RENAMING CHECK == + if (renCheck && TVSettings.Instance.FileHasUsefulExtension(fi, true, out string otherExtension)) // == RENAMING CHECK == { string newName = TVSettings.Instance.FilenameFriendly( TVSettings.Instance.NamingStyle.NameFor(ep, otherExtension, folder.Length)); if (TVSettings.Instance.RetainLanguageSpecificSubtitles && fi.IsLanguageSpecificSubtitle(out string subtitleExtension) && - actualFile.Name!= newName) + actualFile.Name != newName) { newName = TVSettings.Instance.FilenameFriendly( TVSettings.Instance.NamingStyle.NameFor(ep, subtitleExtension, @@ -1398,11 +1819,11 @@ private void RenameAndMissingCheck(ShowItem si, DirFilesCache dfc,bool fullscan) FileInfo newFile = FileHelper.FileInFolder(folder, newName); // rename updates the filename - if (newName != actualFile.Name) + if (newName != actualFile.Name) { //Check that the file does not already exist //if (FileHelper.FileExistsCaseSensitive(newFile.FullName)) - if (FileHelper.FileExistsCaseSensitive(files,newFile)) + if (FileHelper.FileExistsCaseSensitive(files, newFile)) { Logger.Warn($"Identified that {actualFile.FullName} should be renamed to {newName}, but it already exists."); } @@ -1413,9 +1834,9 @@ private void RenameAndMissingCheck(ShowItem si, DirFilesCache dfc,bool fullscan) //The following section informs the DownloadIdentifers that we already plan to //copy a file inthe appropriate place and they do not need to worry about downloading - //one for that purpse - + //one for that purpose downloadIdentifiers.NotifyComplete(newFile); + localEps[epNum] = newFile; } } @@ -1512,7 +1933,7 @@ private void ScanWorker(object o) { try { - List specific = (List) (o); + List specific = (List)(o); while (!Args.Hide && ((scanProgDlg == null) || (!scanProgDlg.Ready))) Thread.Sleep(10); // wait for thread to create the dialog @@ -1530,77 +1951,61 @@ private void ScanWorker(object o) if (TVSettings.Instance.MissingCheck) { // have a look around for any missing episodes - int activeLocalFinders = 0; - int activeRssFinders = 0; - int activeDownloadingFinders = 0; + (int activeLocalFinders, int activeRssFinders, int activeDownloadingFinders) = GetNumbersOfActiveFinders(); - foreach (Finder f in finders) + foreach (Finder f in finders.Where(f => f.Active())) { - if (!f.Active()) continue; f.ActionList = TheActionList; - - switch (f.DisplayType()) - { - case Finder.FinderDisplayType.local: - activeLocalFinders++; - break; - case Finder.FinderDisplayType.downloading: - activeDownloadingFinders++; - break; - case Finder.FinderDisplayType.rss: - activeRssFinders++; - break; - default: - throw new ArgumentException("Inappropriate displaytype identified " + f.DisplayType()); - } } int currentLocalFinderId = 0; - int currentRssFinderId = 0; + int currentSearchFinderId = 0; int currentDownloadingFinderId = 0; - foreach (Finder f in finders) + foreach (Finder f in finders.Where(f => f.Active())) { if (actionCancel) { return; } - if (f.Active() && ListHasMissingItems(TheActionList)) + if (!TheActionList.MissingItems().Any()) { - int startPos; - int endPos; + continue; + } - switch (f.DisplayType()) - { - case Finder.FinderDisplayType.local: - currentLocalFinderId++; - startPos = 100 * (currentLocalFinderId - 1) / activeLocalFinders; - endPos = 100 * (currentLocalFinderId) / activeLocalFinders; - f.Check(scanProgDlg == null ? noProgress : scanProgDlg.LocalSearchProg, - startPos, endPos); + int startPos; + int endPos; - break; - case Finder.FinderDisplayType.downloading: - currentDownloadingFinderId++; - startPos = 100 * (currentDownloadingFinderId - 1) / activeDownloadingFinders; - endPos = 100 * (currentDownloadingFinderId) / activeDownloadingFinders; - f.Check(scanProgDlg == null ? noProgress : scanProgDlg.DownloadingProg, - startPos, endPos); + switch (f.DisplayType()) + { + case Finder.FinderDisplayType.local: + currentLocalFinderId++; + startPos = 100 * (currentLocalFinderId - 1) / activeLocalFinders; + endPos = 100 * (currentLocalFinderId) / activeLocalFinders; + f.Check(scanProgDlg == null ? noProgress : scanProgDlg.LocalSearchProg, + startPos, endPos); - break; - case Finder.FinderDisplayType.rss: - currentRssFinderId++; - startPos = 100 * (currentRssFinderId - 1) / activeRssFinders; - endPos = 100 * (currentRssFinderId) / activeRssFinders; - f.Check(scanProgDlg == null ? noProgress : scanProgDlg.RSSProg, startPos, - endPos); + break; + case Finder.FinderDisplayType.downloading: + currentDownloadingFinderId++; + startPos = 100 * (currentDownloadingFinderId - 1) / activeDownloadingFinders; + endPos = 100 * (currentDownloadingFinderId) / activeDownloadingFinders; + f.Check(scanProgDlg == null ? noProgress : scanProgDlg.DownloadingProg, + startPos, endPos); - break; - } + break; + case Finder.FinderDisplayType.search: + currentSearchFinderId++; + startPos = 100 * (currentSearchFinderId - 1) / activeRssFinders; + endPos = 100 * (currentSearchFinderId) / activeRssFinders; + f.Check(scanProgDlg == null ? noProgress : scanProgDlg.RSSProg, startPos, + endPos); - RemoveIgnored(); + break; } + + RemoveIgnored(); } } @@ -1621,6 +2026,34 @@ private void ScanWorker(object o) } } + private (int activeLocalFinders, int activeRssFinders, int activeDownloadingFinders) GetNumbersOfActiveFinders() + { + int activeLocalFinders = 0; + int activeRssFinders = 0; + int activeDownloadingFinders = 0; + foreach (Finder f in finders) + { + if (!f.Active()) continue; + + switch (f.DisplayType()) + { + case Finder.FinderDisplayType.local: + activeLocalFinders++; + break; + case Finder.FinderDisplayType.downloading: + activeDownloadingFinders++; + break; + case Finder.FinderDisplayType.search: + activeRssFinders++; + break; + default: + throw new ArgumentException("Inappropriate displaytype identified " + f.DisplayType()); + } + } + + return (activeLocalFinders, activeRssFinders, activeDownloadingFinders); + } + public static bool MatchesSequentialNumber(string filename, ref int seas, ref int ep, ProcessedEpisode pe) { if (pe.OverallNumber == -1) @@ -1697,7 +2130,7 @@ private static bool FindSeasEpDateCheck(FileInfo fi, out int seas, out int ep, o // check for YMD, DMY, and MDY // only check against airdates we expect for the given show SeriesInfo ser = TheTVDB.Instance.GetSeries(si.TvdbCode); - string[] dateFormats = new[] {"yyyy-MM-dd", "dd-MM-yyyy", "MM-dd-yyyy", "yy-MM-dd", "dd-MM-yy", "MM-dd-yy"}; + string[] dateFormats = new[] { "yyyy-MM-dd", "dd-MM-yyyy", "MM-dd-yyyy", "yy-MM-dd", "dd-MM-yy", "MM-dd-yy" }; string filename = fi.Name; // force possible date separators to a dash filename = filename.Replace("/", "-"); @@ -1792,7 +2225,8 @@ private List GetShowsThatHaveDownloads() { if (!Directory.Exists(dirPath)) continue; - try{ + try + { string[] x = Directory.GetFiles(dirPath, "*", System.IO.SearchOption.AllDirectories); Logger.Info($"Processing {x.Length} files for shows that need to be scanned"); @@ -1821,7 +2255,8 @@ private List GetShowsThatHaveDownloads() Logger.Warn(ex, $"Could not access files in {dirPath}"); } - try { + try + { string[] directories = Directory.GetDirectories(dirPath, "*", System.IO.SearchOption.AllDirectories); Logger.Info($"Processing {directories.Length} directories for shows that need to be scanned"); @@ -1858,7 +2293,7 @@ internal void ForceRefresh(List sis) { foreach (ShowItem si in sis) { - TheTVDB.Instance.ForgetShow(si.TvdbCode, true,si.UseCustomLanguage,si.CustomLanguageCode); + TheTVDB.Instance.ForgetShow(si.TvdbCode, true, si.UseCustomLanguage, si.CustomLanguageCode); } } @@ -1917,6 +2352,11 @@ public static bool FindSeasEp(string directory, string filename, out int seas, o return FindSeasEp(directory, filename, out seas, out ep, out maxEp, si, rexps, out FilenameProcessorRE _); } + internal static bool FindSeasEp(string itemName, out int seas, out int ep, out int maxEp, ShowItem show) + { + return FindSeasEp(string.Empty, itemName, out seas, out ep, out maxEp, show, TVSettings.Instance.FNPRegexs, out FilenameProcessorRE _); + } + public static bool FindSeasEp(string directory, string filename, out int seas, out int ep, out int maxEp, ShowItem si, List rexps, out FilenameProcessorRE rex) { @@ -2009,7 +2449,7 @@ public void PreventAutoScan(string v) public void AllowAutoScan() { Logger.Info($"TV Rename free again (busy since {busySince})"); - currentlyBusy =false; + currentlyBusy = false; } public bool AutoScanCanRun() => !currentlyBusy; diff --git a/TVRename/TheTVDB/Episode.cs b/TVRename/TheTVDB/Episode.cs index 6b5259e04..1a38c7690 100644 --- a/TVRename/TheTVDB/Episode.cs +++ b/TVRename/TheTVDB/Episode.cs @@ -420,27 +420,13 @@ public string Name set => mName = System.Web.HttpUtility.HtmlDecode(value); } - public int AiredSeasonNumber - { - get - { - if (TheAiredSeason != null) - return TheAiredSeason.SeasonNumber; + public int AiredSeasonNumber => TheAiredSeason?.SeasonNumber ?? -1; - return -1; - } - } + public int DvdSeasonNumber => TheDvdSeason?.SeasonNumber ?? -1; - public int DvdSeasonNumber - { - get - { - if (TheDvdSeason != null) - return TheDvdSeason.SeasonNumber; + public int AiredSeasonIndex => TheAiredSeason?.SeasonIndex ?? -1; - return -1; - } - } + public int DvdSeasonIndex => TheDvdSeason?.SeasonIndex ?? -1; public bool SameAs(Episode o) { diff --git a/TVRename/TheTVDB/Season.cs b/TVRename/TheTVDB/Season.cs index bde3bd4a1..f866ac707 100644 --- a/TVRename/TheTVDB/Season.cs +++ b/TVRename/TheTVDB/Season.cs @@ -20,17 +20,25 @@ public enum SeasonStatus noEpisodes, } - public Dictionary Episodes; - public int SeasonId; - public int SeasonNumber; - public SeriesInfo TheSeries; + public enum SeasonType + { + dvd, + aired + } + + public readonly Dictionary Episodes; + public readonly int SeasonId; + public readonly int SeasonNumber; + public readonly SeriesInfo TheSeries; + private readonly SeasonType type; - public Season(SeriesInfo theSeries, int number, int seasonid) + public Season(SeriesInfo theSeries, int number, int seasonid, SeasonType t) { TheSeries = theSeries; SeasonNumber = number; SeasonId = seasonid; Episodes = new Dictionary(); + type = t; } // ReSharper disable once InconsistentNaming @@ -122,6 +130,8 @@ internal int MaxYear() private bool HasEpisodes => Episodes != null && Episodes.Count > 0; + public int SeasonIndex => this.TheSeries.GetSeasonIndex(this.SeasonNumber,type); + private bool HasUnairedEpisodes(TimeZone tz) { if (!HasEpisodes) return false; @@ -175,18 +185,11 @@ private bool HasAiredEpisodes(TimeZone tz) } return returnValue; - } - public string GetBannerPath() - { - return TheSeries.GetSeasonBannerPath(SeasonNumber); - } + public string GetBannerPath() => TheSeries.GetSeasonBannerPath(SeasonNumber); - public string GetWideBannerPath() - { - return TheSeries.GetSeasonWideBannerPath(SeasonNumber); - } + public string GetWideBannerPath() => TheSeries.GetSeasonWideBannerPath(SeasonNumber); public void AddUpdateEpisode(Episode newEpisode) { diff --git a/TVRename/TheTVDB/SeriesInfo.cs b/TVRename/TheTVDB/SeriesInfo.cs index d9aa017ec..15a3b91ac 100644 --- a/TVRename/TheTVDB/SeriesInfo.cs +++ b/TVRename/TheTVDB/SeriesInfo.cs @@ -479,7 +479,7 @@ private void LoadJson(JObject bestLanguageR, JObject backupLanguageR) public string GetContentRating() => GetValueAcrossVersions("Rating","rating",""); public string GetSiteRating() => GetValueAcrossVersions("SiteRating", "siteRating", ""); public string GetSiteRatingVotes() => GetValueAcrossVersions("SiteRatingCount", "siteRatingCount", ""); - public string GetImdb() => GetValueAcrossVersions("IMDB_ID", "imdb_id", ""); + public string GetImdb() => GetValueAcrossVersions("IMDB_ID", "imdbId", ""); public string GetYear() => GetValueAcrossVersions("Year", "year", ""); public string GetFirstAired() => GetValueAcrossVersions("FirstAired", "firstAired", ""); public string GetSeriesId() => GetValueAcrossVersions("SeriesID", "seriesId", ""); @@ -565,7 +565,7 @@ public Season GetOrAddAiredSeason(int num, int seasonId) if (AiredSeasons.ContainsKey(num)) return AiredSeasons[num]; - Season s = new Season(this, num, seasonId); + Season s = new Season(this, num, seasonId,Season.SeasonType.aired); AiredSeasons[num] = s; return s; @@ -576,7 +576,7 @@ public Season GetOrAddDvdSeason(int num, int seasonId) if (DvdSeasons.ContainsKey(num)) return DvdSeasons[num]; - Season s = new Season(this, num, seasonId); + Season s = new Season(this, num, seasonId,Season.SeasonType.dvd); DvdSeasons[num] = s; return s; @@ -812,5 +812,25 @@ public void AddActor(Actor actor) { actors.Add(actor); } + + public string GetImdbNumber() + { + return (GetImdb().StartsWith("tt")) ? GetImdb().Substring(2): GetImdb(); + } + + public int GetSeasonIndex(int seasonNumber, Season.SeasonType type) + { + Dictionary appropriateSeasons = type == Season.SeasonType.aired ? AiredSeasons : DvdSeasons; + + List seasonNumbers = new List(); + foreach (KeyValuePair sn in appropriateSeasons) + { + seasonNumbers.Add(sn.Value.SeasonNumber); + } + + seasonNumbers.Sort(); + + return seasonNumbers.IndexOf(seasonNumber); + } } } diff --git a/TVRename/TheTVDB/TheTVDB.cs b/TVRename/TheTVDB/TheTVDB.cs index 2ccdcb741..7dde5d086 100644 --- a/TVRename/TheTVDB/TheTVDB.cs +++ b/TVRename/TheTVDB/TheTVDB.cs @@ -205,6 +205,43 @@ private bool LoadCache(FileInfo loadFrom) } } + public void RelaodCache(FileInfo loadFrom, FileInfo cache) + { + System.Diagnostics.Debug.Assert(cache != null); + cacheFile = cache; + + LastError = ""; + Connected = false; + extraEpisodes.Clear(); + removeEpisodeIds.Clear(); + +// LanguageList = new List { new Language(7, "en", "English", "English") }; + + //assume that the data is up to date (this will be overridden by the value in the XML if we have a prior install) + //If we have no prior install then the app has no shows and is by definition up-to-date + newSrvTime = DateTime.UtcNow.ToUnixTime(); + + srvTime = 0; + + LoadOk = (loadFrom == null) || LoadCache(loadFrom); + + forceReloadOn.Clear(); + } + + public void ClearCache() + { + if (!GetLock("ClearCache")) + return; + + series.Clear(); + extraEpisodes.Clear(); + removeEpisodeIds.Clear(); + Unlock("ClearCache"); + + newSrvTime = DateTime.UtcNow.ToUnixTime(); + } + + public void UpdatesDoneOk() { // call when all downloading and updating is done. updates local Srv_Time with the tentative diff --git a/TVRename/Utility/BT.cs b/TVRename/Utility/BT.cs index d7e183b7f..7e2364f8e 100644 --- a/TVRename/Utility/BT.cs +++ b/TVRename/Utility/BT.cs @@ -676,7 +676,6 @@ private FileInfo FindLocalFileWithHashAt(byte[] findMe, long whereInFile, long p return null; foreach (DirCacheEntry dc in FileCache) - //for (int i = 0; i < FileCache.Cache.Count; i++) { FileInfo fiTemp = dc.TheFile; long flen = dc.Length; diff --git a/TVRename/Utility/Helper/FileHelper.cs b/TVRename/Utility/Helper/FileHelper.cs index 899f97c98..aa27781b7 100644 --- a/TVRename/Utility/Helper/FileHelper.cs +++ b/TVRename/Utility/Helper/FileHelper.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using Alphaleonis.Win32.Filesystem; using Microsoft.WindowsAPICodePack.Shell; @@ -9,6 +11,81 @@ namespace TVRename { public static class FileHelper { + public static int GetFrameWidth(this FileInfo movieFile) + { + using (ShellObject shell = ShellObject.FromParsingName(movieFile.FullName)) + { + IShellProperty prop = shell.Properties.System.Video.FrameWidth; + string returnValue = prop.FormatForDisplay(PropertyDescriptionFormatOptions.None); + return (int.TryParse(returnValue, out int value)) ?value:-1 ; + } + } + + public enum VideoComparison + { + FirstFileBetter, + SecondFileBetter, + Similar, + CantTell, + Same + } + + public static VideoComparison BetterQualityFile(FileInfo encumbantFile, FileInfo newFile) + { + if (!newFile.IsMovieFile()) return VideoComparison.FirstFileBetter; + if (!encumbantFile.IsMovieFile()) return VideoComparison.SecondFileBetter; + + int encumbantLength = encumbantFile.GetFilmLength(); + int newFileLength = newFile.GetFilmLength(); + int encumbantFrameWidth = encumbantFile.GetFrameWidth(); + int newFileFrameWidth = newFile.GetFrameWidth(); + + bool newFileContainsTerm = + TVSettings.Instance.PriorityReplaceTermsArray.Any(term => newFile.Name.Contains(term, StringComparison.OrdinalIgnoreCase)); + + if (encumbantLength == -1) return VideoComparison.CantTell; + if (newFileLength == -1) return VideoComparison.CantTell; + if (encumbantFrameWidth == -1) return VideoComparison.CantTell; + if (newFileFrameWidth == -1) return VideoComparison.CantTell; + + float percentMargin = TVSettings.Instance.replaceMargin; + float marginMultiplier = (percentMargin + 100) / 100; + + bool encumbantFileIsMuchLonger = encumbantLength > newFileLength * marginMultiplier; + bool newFileIsMuchLonger = encumbantLength * marginMultiplier < newFileLength; + + bool newFileIsBetterQuality = encumbantFrameWidth * marginMultiplier < newFileFrameWidth; + bool encumbantFileIsBetterQuality = encumbantFrameWidth > newFileFrameWidth * marginMultiplier; + + if (encumbantFileIsMuchLonger) return VideoComparison.FirstFileBetter; //exting file is longer + if (encumbantFileIsBetterQuality) return VideoComparison.FirstFileBetter; //exting file is better quality + + if (newFileIsBetterQuality) return VideoComparison.SecondFileBetter; + if (newFileIsMuchLonger) return VideoComparison.SecondFileBetter; + + if (newFileContainsTerm) return VideoComparison.SecondFileBetter; + + if (encumbantLength == newFileLength && encumbantFrameWidth == newFileFrameWidth && + newFile.Length == encumbantFile.Length) return VideoComparison.Same; + + return VideoComparison.Similar; + } + + public static int GetFrameHeight(this FileInfo movieFile) + { + using (ShellObject shell = ShellObject.FromParsingName(movieFile.FullName)) + { + IShellProperty prop = shell.Properties.System.Video.FrameHeight; + string returnValue = prop.FormatForDisplay(PropertyDescriptionFormatOptions.None); + return (int.TryParse(returnValue, out int value)) ? value : -1; + } + } + + public static bool IsMovieFile(this FileInfo file) + { + return TVSettings.Instance.FileHasUsefulExtension(file, false, out string _); + } + public static bool IsLanguageSpecificSubtitle(this FileInfo file, out string extension) { foreach (string subExtension in TVSettings.Instance.subtitleExtensionsArray) @@ -27,6 +104,11 @@ public static bool IsLanguageSpecificSubtitle(this FileInfo file, out string ext return false; } + public static FileInfo WithExtension(this FileInfo baseFile, string extension) + { + return new FileInfo(baseFile.RemoveExtension()+extension); + } + public static int GetFilmLength(this FileInfo movieFile) { string duration; @@ -38,6 +120,8 @@ public static int GetFilmLength(this FileInfo movieFile) duration = prop.FormatForDisplay(PropertyDescriptionFormatOptions.None); } + if (string.IsNullOrWhiteSpace(duration)) return -1; + return (3600 * int.Parse(duration.Split(':')[0])) + (60 * int.Parse(duration.Split(':')[1])) + int.Parse(duration.Split(':')[2]); @@ -71,17 +155,20 @@ public static string RemoveExtension(this FileInfo file, bool useFullPath = fals return root.Substring(0, root.Length - file.Extension.Length); } - public static void GetFilmDetails(this FileInfo movieFile) + public static string GetFilmDetails(this FileInfo movieFile) { using (ShellPropertyCollection properties = new ShellPropertyCollection(movieFile.FullName)) { + StringBuilder sb = new StringBuilder(); foreach (IShellProperty prop in properties) { string value = (prop.ValueAsObject == null) ? "" : prop.FormatForDisplay(PropertyDescriptionFormatOptions.None); - Console.WriteLine("{0} = {1}", prop.CanonicalName, value); + sb.AppendLine($"{prop.CanonicalName} = {value}" ); } + + return sb.ToString(); } }