private void FillExamples() { if (eps is null) { return; } lvTest.Items.Clear(); foreach (ProcessedEpisode pe in eps) { ListViewItem lvi = new ListViewItem(); string fn = TVSettings.Instance.FilenameFriendly(cn.NameFor(pe)); lvi.Text = fn; bool ok = FinderHelper.FindSeasEp(new FileInfo(fn + ".avi"), out int seas, out int ep, out int maxEp, pe.Show); bool ok1 = ok && seas == pe.AppropriateSeasonNumber; bool ok2 = ok && ep == pe.AppropriateEpNum; string pre1 = ok1 ? "" : "* "; string pre2 = ok2 ? "" : "* "; lvi.SubItems.Add(pre1 + (seas != -1 ? seas.ToString() : "")); lvi.SubItems.Add(pre2 + (ep != -1 ? ep.ToString() : "") + (maxEp != -1 ? "-" + maxEp : "")); lvi.Tag = pe; if (!ok || !ok1 || !ok2) { lvi.BackColor = Helpers.WarningColor(); } lvTest.Items.Add(lvi); } }
private void FillPreview() { IEnumerable <ProcessedEpisode> pel = ProcessedEpisodes(); lbEpsPreview.BeginUpdate(); lbEpsPreview.Items.Clear(); foreach (ProcessedEpisode pe in pel) { lbEpsPreview.Items.Add(nameStyle.NameFor(pe)); } lbEpsPreview.EndUpdate(); }
private void FillPreview() { List <ProcessedEpisode> pel = new List <ProcessedEpisode>(); if (mOriginalEps != null) { foreach (ProcessedEpisode pe in mOriginalEps) { pel.Add(new ProcessedEpisode(pe)); } ShowLibrary.ApplyRules(pel, workingRuleSet, show); } lbEpsPreview.BeginUpdate(); lbEpsPreview.Items.Clear(); foreach (ProcessedEpisode pe in pel) { lbEpsPreview.Items.Add(nameStyle.NameFor(pe)); } lbEpsPreview.EndUpdate(); }