コード例 #1
0
        private void Insert(Profiler.DVD profile)
        {
            InsertDVD(profile);

            _dvdHash.Add(profile.ID, _currentDVDEntity);

            InsertAudio(profile.AudioList);

            InsertCast(profile.CastList);
            InsertCountriesOfOrigin(profile.CountryOfOriginList);
            InsertCrew(profile.CrewList);
            InsertDiscs(profile.DiscList);
            InsertDVDId(profile);
            InsertEvents(profile.EventList);
            InsertExclusions(profile.Exclusions);
            InsertFeatures(profile.Features);
            InsertFormat(profile.Format, profile.MediaTypes);
            InsertGenres(profile.GenreList);
            InsertLinks(profile.MyLinks?.UserLinkList);
            InsertLoanInfo(profile.LoanInfo);
            InsertLock(profile.Locks);
            InsertMediaCompanies(profile.MediaCompanyList);
            InsertMediaTypes(profile.MediaTypes);
            InsertPluginData(profile.PluginCustomData);
            InsertPurchase(profile.PurchaseInfo);
            InsertRegions(profile.RegionList);
            InsertReview(profile.Review);
            InsertStudios(profile.StudioList);
            InsertSubtitles(profile.SubtitleList);
            InsertTags(profile.TagList);
        }
コード例 #2
0
        private void InsertBoxSetChildren(Profiler.DVD parentProfile)
        {
            var childIds = parentProfile.BoxSet?.ContentList;

            if (childIds == null)
            {
                return;
            }

            var valid = childIds.Where(IsNotEmpty).Where(id => _dvdHash.ContainsKey(id)).ToList();

            IncreaseMax(valid.Count);

            foreach (var childId in valid)
            {
                var entity = new Entity.tParentDVDxChildDVD()
                {
                    tParentDVD = _dvdHash[parentProfile.ID],
                    tChildDVD  = _dvdHash[childId],
                };

                _context.tParentDVDxChildDVD.Add(entity);

                IncreaseCurrent();
            }
        }
コード例 #3
0
        private void InsertDVD(Profiler.DVD profile)
        {
            _currentDVDEntity = new Entity.tDVD()
            {
                DVDId            = profile.ID,
                CaseSlipCover    = profile.CaseSlipCoverSpecified ? profile.CaseSlipCover : (bool?)null,
                CollectionNumber = profile.CollectionNumber,
                DistTrait        = profile.Edition,
                EasterEggs       = profile.EasterEggs,
                LastEdited       = profile.LastEditedSpecified ? profile.LastEdited : (DateTime?)null,
                Notes            = profile.Notes,
                OriginalTitle    = profile.OriginalTitle,
                Overview         = profile.Overview,
                ProductionYear   = profile.ProductionYear != 0 ? profile.ProductionYear : (int?)null,
                Rating           = profile.Rating,
                Released         = profile.ReleasedSpecified ? profile.Released : (DateTime?)null,
                RunningTime      = profile.RunningTime != 0 ? profile.RunningTime : (int?)null,
                SortTitle        = profile.SortTitle,
                SRPDenomination  = profile.SRP?.Value != 0 ? profile.SRP.DenominationType : null,
                SRPValue         = profile.SRP?.Value != 0 ? (decimal)profile.SRP.Value : (decimal?)null,
                tCaseType        = !string.IsNullOrEmpty(profile.CaseType) ? _baseData.CaseType[profile.CaseType] : null,
                tCollectionType  = _baseData.CollectionType[profile.CollectionType],
                Title            = profile.Title,
                UPC          = profile.UPC,
                WishPriority = profile.WishPriority,
            };

            _context.tDVD.Add(_currentDVDEntity);

            IncreaseCurrent();
        }
コード例 #4
0
        private void InsertDVDId(Profiler.DVD profile)
        {
            IncreaseMax();

            var entity = new Entity.tDVDId()
            {
                tDVD       = _currentDVDEntity,
                IdBase     = profile.ID_Base,
                tDVDIdType = _baseData.DVDIdType[profile.ID_Type],
                tLocality  = _baseData.Locality[new LocalityKey(profile)],
                VariantNum = (short)profile.ID_VariantNum,
            };

            _context.tDVDId.Add(entity);

            IncreaseCurrent();
        }
コード例 #5
0
 public LocalityKey(Profiler.DVD profile)
 {
     Id          = profile.ID_LocalityID;
     Description = profile.ID_LocalityDesc;
 }