示例#1
0
        public void TestPopulateEmptyTitle()
        {
            const string emptyTitleVIsan = "00000000E0AA000000000001";

            var vIsan = VIsan.TryParse(emptyTitleVIsan);

            _provider.Populate(vIsan);

            var parent = vIsan.Parent;

            Assert.IsNull(vIsan.Title);
            Assert.IsNull(vIsan.Year);
            Assert.IsNull(vIsan.LengthMin);
            Assert.IsNotNull(parent);
            Assert.AreEqual("Lord Of War", parent.Title);
            Assert.AreEqual(2004, parent.Year);
            Assert.AreEqual(100, parent.LengthMin);
        }
示例#2
0
        private static VIsan GetVISAN(Disc disc)
        {
            var file = disc.FileSystem.Files.MCMF;

            if (file == null)
            {
                return(null);
            }

            var xml = string.Join(" ", File.ReadAllLines(file.FullName));

            if (!ISANContentIdRegex.IsMatch(xml))
            {
                return(null);
            }

            var match     = ISANContentIdRegex.Match(xml);
            var contentId = match.Groups[1].Value;

            return(VIsan.TryParse(contentId));
        }