Esempio n. 1
0
        public static NzbDrone.Core.Tv.Series ToModel(this SeriesResource resource, NzbDrone.Core.Tv.Series series)
        {
            var updatedSeries = resource.ToModel();

            series.ApplyChanges(updatedSeries);

            return(series);
        }
Esempio n. 2
0
        public static NzbDrone.Core.Tv.Series ToModel(this SeriesResource resource)
        {
            if (resource == null)
            {
                return(null);
            }

            return(new NzbDrone.Core.Tv.Series
            {
                Id = resource.Id,

                Title = resource.Title,
                //AlternateTitles
                SortTitle = resource.SortTitle,

                //TotalEpisodeCount
                //EpisodeCount
                //EpisodeFileCount
                //SizeOnDisk
                Status = resource.Status,
                Overview = resource.Overview,
                //NextAiring
                //PreviousAiring
                Network = resource.Network,
                AirTime = resource.AirTime,
                Images = resource.Images,

                Seasons = resource.Seasons.ToModel(),
                Year = resource.Year,

                Path = resource.Path,
                QualityProfileId = resource.QualityProfileId,
                LanguageProfileId = resource.LanguageProfileId,

                SeasonFolder = resource.SeasonFolder,
                Monitored = resource.Monitored,

                UseSceneNumbering = resource.UseSceneNumbering,
                Runtime = resource.Runtime,
                TvdbId = resource.TvdbId,
                TvRageId = resource.TvRageId,
                TvMazeId = resource.TvMazeId,
                FirstAired = resource.FirstAired,
                LastInfoSync = resource.LastInfoSync,
                SeriesType = resource.SeriesType,
                CleanTitle = resource.CleanTitle,
                ImdbId = resource.ImdbId,
                TitleSlug = resource.TitleSlug,
                RootFolderPath = resource.RootFolderPath,
                Certification = resource.Certification,
                Genres = resource.Genres,
                Tags = resource.Tags,
                Added = resource.Added,
                AddOptions = resource.AddOptions,
                Ratings = resource.Ratings
            });
        }