当前位置: 首页>>代码示例>>C#>>正文


C# Title.AddDisk方法代码示例

本文整理汇总了C#中Title.AddDisk方法的典型用法代码示例。如果您正苦于以下问题:C# Title.AddDisk方法的具体用法?C# Title.AddDisk怎么用?C# Title.AddDisk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Title的用法示例。


在下文中一共展示了Title.AddDisk方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConvertOMLSDKTitleToTitle

        public static Title ConvertOMLSDKTitleToTitle(OMLSDKTitle omlsdktitle)
        {
            Title _title = new Title();

            if (omlsdktitle != null)
            {
                _title.NameTrimmed = CopyString(omlsdktitle.Name);
                _title.OriginalNameTrimmed = CopyString(omlsdktitle.OriginalName);
                _title.SortNameTrimmed = CopyString(omlsdktitle.SortName);
                _title.Synopsis = CopyString(omlsdktitle.Synopsis);
                _title.ProductionYear = omlsdktitle.ProductionYear;
                _title.ReleaseDate = omlsdktitle.ReleaseDate;
                _title.DateAdded = omlsdktitle.DateAdded;
                _title.Runtime = omlsdktitle.Runtime;
                _title.StudioTrimmed = CopyString(omlsdktitle.Studio);
                _title.UPCTrimmed = CopyString(omlsdktitle.UPC);
                _title.WatchedCount = omlsdktitle.WatchedCount;
                _title.UserStarRating = omlsdktitle.UserStarRating;

                _title.EpisodeNumber = omlsdktitle.EpisodeNumber;
                _title.SeasonNumber = omlsdktitle.SeasonNumber;

                _title.AspectRatioTrimmed = CopyString(omlsdktitle.AspectRatio);
                _title.VideoDetails = CopyString(omlsdktitle.VideoDetails);
                _title.VideoResolutionTrimmed = CopyString(omlsdktitle.VideoResolution);
                _title.VideoStandardTrimmed = CopyString(omlsdktitle.VideoStandard);
                //_title.VideoFormat = (VideoFormat)Enum.Parse(typeof(VideoFormat), omlsdktitle.VideoFormat.ToString());

                _title.FrontCoverPath = CopyString(omlsdktitle.FrontCoverPath);
                _title.BackCoverPath = CopyString(omlsdktitle.BackCoverPath);

                _title.CountryOfOriginTrimmed = CopyString(omlsdktitle.CountryOfOrigin);

                _title.MetadataSourceIDTrimmed = CopyString(omlsdktitle.MetadataSourceID);
                _title.MetadataSourceNameTrimmed = CopyString(omlsdktitle.MetadataSourceName);
                _title.ImporterSourceTrimmed = CopyString(omlsdktitle.ImporterSource);

                _title.OfficialWebsiteURLTrimmed = CopyString(omlsdktitle.OfficialWebsiteURL);
                _title.ParentalRatingTrimmed = CopyString(omlsdktitle.ParentalRating);
                _title.ParentalRatingReasonTrimmed = CopyString(omlsdktitle.ParentalRatingReason);

                #region Disks
                foreach (OMLSDKDisk omlsdkdisk in omlsdktitle.Disks)
                {
                    Disk disk = new Disk();
                    disk.Name = omlsdkdisk.Name;
                    disk.Path = omlsdkdisk.Path;
                    disk.Format = (VideoFormat)Enum.Parse(typeof(VideoFormat), omlsdkdisk.Format.ToString());
                    disk.ExtraOptions = omlsdkdisk.ExtraOptions;
                    _title.AddDisk(disk);
                }
                #endregion

                #region Extra Features
                _title.ExtraFeatures = omlsdktitle.ExtraFeatures;
                #endregion

                #region Trailers
                foreach (string Trailer in omlsdktitle.Trailers)
                {
                    _title.AddTrailer(Trailer);
                }
                #endregion

                #region Genres
                if (omlsdktitle.Genres != null)
                {
                    foreach (string genre in omlsdktitle.Genres)
                    {
                        _title.AddGenre(genre);
                    }
                }
                #endregion

                #region Actring Roles
                if (omlsdktitle.ActingRoles != null)
                {
                    foreach (OMLSDKRole role in omlsdktitle.ActingRoles)
                    {
                        _title.AddActingRole(role.PersonName, role.RoleName);
                    }
                }
                #endregion

                #region Non Acting Roles
                if (omlsdktitle.NonActingRoles != null)
                {
                    foreach (OMLSDKRole role in omlsdktitle.NonActingRoles)
                    {
                        _title.AddNonActingRole(role.PersonName, role.RoleName);
                    }
                }
                #endregion

                #region Directors
                if (omlsdktitle.Directors != null)
                {
                    foreach (OMLSDKPerson person in omlsdktitle.Directors)
                    {
                        _title.AddDirector(ConvertOMLSDKPersonToPerson(person));
//.........这里部分代码省略.........
开发者ID:peeboo,项目名称:open-media-library,代码行数:101,代码来源:SDKUtilities.cs


注:本文中的Title.AddDisk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。