public void Process(IEnumerable<string> args, IWizard wizard) { var unknown = wizard.GetUnknown(); var pending = wizard.GetPendingRenames(); var conflicts = wizard.GetConflicts(); foreach (var file in pending) { var print = string.Format("{0,-35} - {1} {2}x{3:00} {4}", file.Path.TruncateBeginning(35), file.EpisodeMatches.MostProbable.Guess.Show.Name, file.EpisodeMatches.MostProbable.Guess.SeasonNumber, file.EpisodeMatches.MostProbable.Guess.EpisodeNumber, file.EpisodeMatches.MostProbable.Guess.Title); this.Log.WriteLine(print.TruncateEnd(79)); } this.Log.WriteLine(""); foreach (var file in unknown) { this.Log.WriteWarning(string.Format("{0,-35} - {1} matches", file.Path.TruncateBeginning(35), file.EpisodeMatches.Count)); } this.Log.WriteLine(""); foreach (var file in conflicts) { this.Log.WriteWarning(string.Format("{0,-35} - conflict", file.Path.TruncateBeginning(35))); } }
public void Process(IEnumerable<string> args, IWizard wizard) { var unknown = wizard.GetUnknown(); var pending = wizard.GetPendingRenames(); var conflicts = wizard.GetConflicts(); this.Log.WriteLine(string.Format("{0} identified episodes", pending.Count())); this.Log.WriteWarning(string.Format("{0} unknown episodes", unknown.Count())); this.Log.WriteWarning(string.Format("{0} conflicting episodes", conflicts.Count())); }
public void Process(IEnumerable<string> args, IWizard wizard) { var unknown = wizard.GetUnknown(); var pending = wizard.GetPendingRenames(); var conflicts = wizard.GetConflicts(); var tempFile = Path.GetTempFileName(); using (var writer = new StreamWriter(tempFile)) { writer.WriteLine(); writer.WriteLine("------- Successfully identified -------"); writer.WriteLine(); foreach (var file in pending) { var print = string.Format("{0,-80} - {1} {2}x{3:00} {4}", file.Path.TruncateBeginning(80), file.EpisodeMatches.MostProbable.Guess.Show.Name, file.EpisodeMatches.MostProbable.Guess.SeasonNumber, file.EpisodeMatches.MostProbable.Guess.EpisodeNumber, file.EpisodeMatches.MostProbable.Guess.Title); writer.WriteLine(print); } writer.WriteLine(); writer.WriteLine("------- Could not be identified -------"); writer.WriteLine(); foreach (var file in unknown) { writer.WriteLine(string.Format("{0,-80} - {1} matches", file.Path.TruncateBeginning(80), file.EpisodeMatches.Count)); } writer.WriteLine(); writer.WriteLine("------- Conflicting renames -------"); writer.WriteLine(); foreach (var file in conflicts) { writer.WriteLine(string.Format("{0,-80} - conflict", file.Path.TruncateBeginning(80))); } } this.Log.WriteLine("Current fileset dumped to "); this.Log.WriteLine(tempFile); }
public void Process(IEnumerable<string> args, IWizard wizard) { var newPattern = args.SingleOrDefault(); if (newPattern != null) { wizard.SetPattern(new Core.Pattern(newPattern)); } else { var existingPattern = wizard.GetPattern(); this.Log.WriteLine(string.Format("The current pattern is: {0}", existingPattern)); } var example = wizard.GetPendingRenames().FirstOrDefault(); if (example != null) { var name = wizard.GetPattern().GetName(example.EpisodeMatches.MostProbable.Guess); this.Log.WriteLine(string.Format("Ex: {0}", name)); } }