Esempio n. 1
0
        private void ParseAnnotated(DirectoryInfo dir)
        {
            if (ScoreRegex.IsMatch(dir.Name))
            {
                Match mYear;
                if (!YearRegex.TryGetMatch(dir.Name, out mYear))
                {
                    Error($"No year match found for {dir.Name}");
                    return;
                }
                Year = mYear.Groups[1].Value;

//                Year = MatchInt(YearRegex, true);
                Match mTime;
                if (!TimeRegex.TryGetMatch(dir.Name, out mTime))
                {
                    Error($"No year match found for {dir.Name}");
                    return;
                }
                RunTime = mTime.Value;
//                RunTime = TimeRegex.Match(Name).Value;

                ParseRatings();
                Regex  spaceReg = new Regex(@"\s+");
                string tmpTitle =
                    Name.ReplaceWithString(Year).ReplaceWithString(RunTime);
                tmpTitle = tmpTitle.ReplaceWithString(OtherRegex.Match(tmpTitle).Value);
                Title    = spaceReg.ReplaceWithString(tmpTitle, " ");
                return;
            }
            ParseStd(dir);
            GetMetaWithoutScore(dir);
        }
Esempio n. 2
0
        private void ParseRatings()
        {
            var match = OtherRegex.Match(Name);

            Imdb     = GetDouble(match, "imdb");
            RtFresh  = GetInt(match, "rtfresh");
            RtRating = GetDouble(match, "rtrating");
            GetMeta();
            //Todo fix meta critic ratings here.

            //            MetaCritic = GetDouble(match, "meta");
        }