From cf4014845bfd00687d0f87e2b1071321926ddb80 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 9 Jun 2023 20:59:41 +0800 Subject: [PATCH] tweaks --- TVRename/Forms/BulkAddMovies/BulkAddMovie.cs | 2 +- TVRename/TVRename/BulkAddMovieManager.cs | 7 +------ TVRename/TVRename/PossibleNewMovie.cs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/TVRename/Forms/BulkAddMovies/BulkAddMovie.cs b/TVRename/Forms/BulkAddMovies/BulkAddMovie.cs index f98eb7983..3aa097e0d 100644 --- a/TVRename/Forms/BulkAddMovies/BulkAddMovie.cs +++ b/TVRename/Forms/BulkAddMovies/BulkAddMovie.cs @@ -478,7 +478,7 @@ private void UpdateListItem(PossibleNewMovie? ai, bool makevis) private void bnFolderMonitorDone_Click(object sender, System.EventArgs e) { - int numberToAdd = engine.AddItems.Count(ai => !ai.CodeUnknown); + int numberToAdd = engine.AddItems.Count(ai => ai.CodeKnown); if (numberToAdd > 0) { DialogResult res = MessageBox.Show($"Add {numberToAdd} identified movies to \"My Movies\"?", "Bulk Add Movies", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); diff --git a/TVRename/TVRename/BulkAddMovieManager.cs b/TVRename/TVRename/BulkAddMovieManager.cs index 09f67a0d1..ab6c5b1bb 100644 --- a/TVRename/TVRename/BulkAddMovieManager.cs +++ b/TVRename/TVRename/BulkAddMovieManager.cs @@ -201,13 +201,8 @@ public void AddAllToMyMovies(UI ui) private List AddToLibrary(IEnumerable ais) { List movies = new(); - foreach (PossibleNewMovie ai in ais) + foreach (PossibleNewMovie ai in ais.Where(a=>a.CodeKnown)) { - if (ai.CodeUnknown) - { - continue; - } - // see if there is a matching show item MovieConfiguration? found = mDoc.FilmLibrary.GetMovie(ai); if (found is null) diff --git a/TVRename/TVRename/PossibleNewMovie.cs b/TVRename/TVRename/PossibleNewMovie.cs index 3764cc86a..bf63759c0 100644 --- a/TVRename/TVRename/PossibleNewMovie.cs +++ b/TVRename/TVRename/PossibleNewMovie.cs @@ -29,7 +29,7 @@ public class PossibleNewMovie : ISeriesSpecifier public bool CodeKnown => !CodeUnknown; public bool CodeUnknown => ProviderCode <= 0; - public string CodeString => CodeUnknown ? "" : $"{ProviderCode} ({SourceProvider.PrettyPrint()})"; + public string CodeString => CodeKnown ? $"{ProviderCode} ({SourceProvider.PrettyPrint()})" : ""; public PossibleNewMovie(FileInfo possibleMovieFile, bool andGuess, bool showErrorMsgBox) {