Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Jun 9, 2023
1 parent 9ded233 commit cf40148
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion TVRename/Forms/BulkAddMovies/BulkAddMovie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 1 addition & 6 deletions TVRename/TVRename/BulkAddMovieManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,8 @@ public void AddAllToMyMovies(UI ui)
private List<MovieConfiguration> AddToLibrary(IEnumerable<PossibleNewMovie> ais)
{
List<MovieConfiguration> 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)
Expand Down
2 changes: 1 addition & 1 deletion TVRename/TVRename/PossibleNewMovie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PossibleNewMovie : ISeriesSpecifier
public bool CodeKnown => !CodeUnknown;
public bool CodeUnknown => ProviderCode <= 0;

public string CodeString => CodeUnknown ? "<Unknown>" : $"{ProviderCode} ({SourceProvider.PrettyPrint()})";
public string CodeString => CodeKnown ? $"{ProviderCode} ({SourceProvider.PrettyPrint()})" : "<Unknown>";

public PossibleNewMovie(FileInfo possibleMovieFile, bool andGuess, bool showErrorMsgBox)
{
Expand Down

0 comments on commit cf40148

Please sign in to comment.