예제 #1
0
        private ParsedMovieInfo EnhanceMinimalInfo(ParsedMovieInfo minimalInfo, List <object> helpers)
        {
            minimalInfo.Languages = LanguageParser.ParseLanguages(minimalInfo.SimpleReleaseTitle);
            _logger.Debug("Language(s) parsed: {0}", string.Join(", ", minimalInfo.Languages.ToExtendedString()));

            minimalInfo.Quality = QualityParser.ParseQuality(minimalInfo.SimpleReleaseTitle);

            if (minimalInfo.Edition.IsNullOrWhiteSpace())
            {
                minimalInfo.Edition = Parser.ParseEdition(minimalInfo.SimpleReleaseTitle);
            }

            minimalInfo.ReleaseGroup = Parser.ParseReleaseGroup(minimalInfo.SimpleReleaseTitle);

            minimalInfo.ImdbId = Parser.ParseImdbId(minimalInfo.SimpleReleaseTitle);

            minimalInfo = AugmentMovieInfo(minimalInfo, helpers);

            // After the augmenters have done their job on languages we can do our static method as well.
            minimalInfo.Languages =
                LanguageParser.EnhanceLanguages(minimalInfo.SimpleReleaseTitle, minimalInfo.Languages);

            minimalInfo.Quality.Quality = Quality.FindByInfo(minimalInfo.Quality.Source, minimalInfo.Quality.Resolution,
                                                             minimalInfo.Quality.Modifier);

            minimalInfo.Quality.CustomFormats = ParseCustomFormat(minimalInfo);

            _logger.Debug("Quality parsed: {0}", minimalInfo.Quality);

            return(minimalInfo);
        }