Пример #1
0
        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)));
            }
        }
Пример #2
0
        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()));
        }
Пример #3
0
        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);
        }