예제 #1
0
        private void InsertMediaTypes(Profiler.MediaTypes mediaTypes)
        {
            if (mediaTypes == null)
            {
                return;
            }

            if (mediaTypes.DVD)
            {
                InsertMediaType("DVD");
            }

            if (mediaTypes.BluRay)
            {
                InsertMediaType("Blu-ray");
            }

            if (mediaTypes.HDDVD)
            {
                InsertMediaType("HD-DVD");
            }

            if (mediaTypes.UltraHD)
            {
                InsertMediaType("Ultra HD");
            }

            if (!string.IsNullOrEmpty(mediaTypes.CustomMediaType))
            {
                InsertMediaType(mediaTypes.CustomMediaType);
            }
        }
예제 #2
0
        private void InsertFormat(Profiler.Format format, Profiler.MediaTypes mediaTypes)
        {
            if (format == null)
            {
                return;
            }

            IncreaseMax();

            var entity = new Entity.tFormat()
            {
                tDVD           = _currentDVDEntity,
                AspectRatio    = format.AspectRatio,
                BlackAndWhite  = format.Color?.BlackAndWhite ?? false,
                C16X9          = format.Enhanced16X9,
                C2D            = format.Dimensions?.Dim2D ?? false,
                C3DAnaglyph    = format.Dimensions?.Dim3DAnaglyph ?? false,
                C3DBluRay      = format.Dimensions?.Dim3DBluRay ?? false,
                Color          = format.Color?.Color ?? false,
                Colorized      = format.Color?.Colorized ?? false,
                DolbyVision    = format.DynamicRange?.DRDolbyVision,
                DualLayered    = format.DualLayered,
                DualSided      = format.DualSided,
                FullFrame      = format.FullFrame,
                HDR10          = format.DynamicRange?.DRHDR10,
                LetterBox      = format.LetterBox,
                Mixed          = format.Color?.Mixed ?? false,
                PanAndScan     = format.PanAndScan,
                tVideoStandard = !IsHDFormat(mediaTypes) ? _baseData.VideoStandard[format.VideoStandard] : null,
            };

            _context.tFormat.Add(entity);

            IncreaseCurrent();
        }
예제 #3
0
        private void FillMediaTypeHash(Profiler.MediaTypes mediaTypes)
        {
            if (mediaTypes == null)
            {
                return;
            }

            if (mediaTypes.DVD)
            {
                MediaType.Add("DVD");
            }

            if (mediaTypes.BluRay)
            {
                MediaType.Add("Blu-ray");
            }

            if (mediaTypes.HDDVD)
            {
                MediaType.Add("HD-DVD");
            }

            if (mediaTypes.UltraHD)
            {
                MediaType.Add("Ultra HD");
            }

            if (!string.IsNullOrEmpty(mediaTypes.CustomMediaType))
            {
                MediaType.Add(mediaTypes.CustomMediaType);
            }
        }
예제 #4
0
 private static bool IsHDFormat(Profiler.MediaTypes mediaTypes) => (mediaTypes != null) && (mediaTypes.BluRay || mediaTypes.HDDVD || mediaTypes.UltraHD);