private void AskUserAboutShow([NotNull] PossibleNewTvShow folder, IDialogParent owner) { if (folder.CodeKnown) { return; } BulkAddSeriesManager.GuessShowItem(folder, MDoc.TvLibrary, true); if (folder.CodeKnown) { return; } BulkAddEditShow ed = new BulkAddEditShow(folder); owner.ShowChildDialog(ed); DialogResult x = ed.DialogResult; int code = ed.Code; ed.Dispose(); if (x != DialogResult.OK || code == -1) { return; } folder.SetId(code, TVDoc.ProviderType.TheTVDB); }
private void AskUserAboutShow([NotNull] PossibleNewTvShow folder, IDialogParent owner) { if (folder.CodeKnown) { return; } BulkAddSeriesManager.GuessShowItem(folder, MDoc.TvLibrary, true); if (folder.CodeKnown) { return; } FolderMonitorEdit ed = new FolderMonitorEdit(folder); owner.ShowChildDialog(ed); DialogResult x = ed.DialogResult; int code = ed.Code; ed.Dispose(); if (x != DialogResult.OK || code == -1) { return; } folder.TVDBCode = code; }
private void bnFullAuto_Click(object _, System.EventArgs e) { if (engine.AddItems.Count == 0) { return; } CancellationTokenSource cts = new CancellationTokenSource(); TokenSource = cts; FmpUpto = "Identifying shows"; FmpPercent = 0; Thread fmpshower = new Thread(FmpShower) { Name = "Bulk Add Shows Progress (Full Auto)" }; fmpshower.Start(); while (progressDialog is null || !progressDialog.Ready) { Thread.Sleep(10); } int n = 0; int n2 = engine.AddItems.Count; foreach (PossibleNewTvShow ai in engine.AddItems) { FmpPercent = 100 * n++ / n2; if (cts.IsCancellationRequested) { break; } if (ai.CodeKnown) { continue; } BulkAddSeriesManager.GuessShowItem(ai, mDoc.TvLibrary, true); // update our display UpdateListItem(ai, true); lvFMNewShows.Update(); Update(); } cts.Cancel(); }