|
|
@ -24,12 +24,10 @@ namespace Ombi.Mapping.Profiles
|
|
|
|
.ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.score.ToString(CultureInfo.CurrentUICulture)))
|
|
|
|
.ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.score.ToString(CultureInfo.CurrentUICulture)))
|
|
|
|
.ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.show.runtime.ToString()))
|
|
|
|
.ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.show.runtime.ToString()))
|
|
|
|
.ForMember(dest => dest.SeriesId, opts => opts.MapFrom(src => src.show.id))
|
|
|
|
.ForMember(dest => dest.SeriesId, opts => opts.MapFrom(src => src.show.id))
|
|
|
|
.ForMember(dest => dest.SeriesName, opts => opts.MapFrom(src => src.show.name))
|
|
|
|
.ForMember(dest => dest.Title, opts => opts.MapFrom(src => src.show.name))
|
|
|
|
.ForMember(dest => dest.Banner, opts => opts.MapFrom(src => !string.IsNullOrEmpty(src.show.image.medium) ? src.show.image.medium.Replace("http", "https") : string.Empty))
|
|
|
|
.ForMember(dest => dest.Banner, opts => opts.MapFrom(src => !string.IsNullOrEmpty(src.show.image.medium) ? src.show.image.medium.Replace("http", "https") : string.Empty))
|
|
|
|
.ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.show.status));
|
|
|
|
.ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.show.status));
|
|
|
|
|
|
|
|
|
|
|
|
CreateMap<TvMazeCustomSeason, SeasonRequestModel>()
|
|
|
|
|
|
|
|
.ConstructUsing(x => new SeasonRequestModel { Episodes = x.EpisodeNumber, SeasonNumber = x.SeasonNumber });
|
|
|
|
|
|
|
|
CreateMap<TvMazeShow, SearchTvShowViewModel>()
|
|
|
|
CreateMap<TvMazeShow, SearchTvShowViewModel>()
|
|
|
|
.ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.externals.thetvdb))
|
|
|
|
.ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.externals.thetvdb))
|
|
|
|
.ForMember(dest => dest.FirstAired, opts => opts.MapFrom(src => src.premiered))
|
|
|
|
.ForMember(dest => dest.FirstAired, opts => opts.MapFrom(src => src.premiered))
|
|
|
@ -40,7 +38,7 @@ namespace Ombi.Mapping.Profiles
|
|
|
|
.ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.rating.ToString()))
|
|
|
|
.ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.rating.ToString()))
|
|
|
|
.ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.runtime.ToString(CultureInfo.CurrentUICulture)))
|
|
|
|
.ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.runtime.ToString(CultureInfo.CurrentUICulture)))
|
|
|
|
.ForMember(dest => dest.SeriesId, opts => opts.MapFrom(src => src.id))
|
|
|
|
.ForMember(dest => dest.SeriesId, opts => opts.MapFrom(src => src.id))
|
|
|
|
.ForMember(dest => dest.SeriesName, opts => opts.MapFrom(src => src.name))
|
|
|
|
.ForMember(dest => dest.Title, opts => opts.MapFrom(src => src.name))
|
|
|
|
.ForMember(dest => dest.Banner, opts => opts.MapFrom(src => !string.IsNullOrEmpty(src.image.medium) ? src.image.medium.Replace("http", "https") : string.Empty))
|
|
|
|
.ForMember(dest => dest.Banner, opts => opts.MapFrom(src => !string.IsNullOrEmpty(src.image.medium) ? src.image.medium.Replace("http", "https") : string.Empty))
|
|
|
|
.ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.status))
|
|
|
|
.ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.status))
|
|
|
|
.ForMember(dest => dest.SeasonRequests, opts => opts.MapFrom(src => src.Season));
|
|
|
|
.ForMember(dest => dest.SeasonRequests, opts => opts.MapFrom(src => src.Season));
|
|
|
@ -53,7 +51,7 @@ namespace Ombi.Mapping.Profiles
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.SeriesName, opts => opts.MapFrom(src => src.Title))
|
|
|
|
// .ForMember(dest => dest.Title, opts => opts.MapFrom(src => src.Title))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Trailer))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Trailer))
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Homepage));
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Homepage));
|
|
|
@ -66,7 +64,7 @@ namespace Ombi.Mapping.Profiles
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Show.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Show.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Show.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Show.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Show.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Show.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.SeriesName, opts => opts.MapFrom(src => src.Show.Title))
|
|
|
|
// .ForMember(dest => dest.Title, opts => opts.MapFrom(src => src.Show.Title))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Show.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Show.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Show.Trailer))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Show.Trailer))
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Show.Homepage));
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Show.Homepage));
|
|
|
@ -79,7 +77,7 @@ namespace Ombi.Mapping.Profiles
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Show.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Show.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Show.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Show.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Show.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Show.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.SeriesName, opts => opts.MapFrom(src => src.Show.Title))
|
|
|
|
// .ForMember(dest => dest.Title, opts => opts.MapFrom(src => src.Show.Title))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Show.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Show.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Show.Trailer))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Show.Trailer))
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Show.Homepage));
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Show.Homepage));
|
|
|
@ -92,7 +90,7 @@ namespace Ombi.Mapping.Profiles
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Show.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.Show.Overview.RemoveHtml()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Show.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Rating, opts => opts.MapFrom(src => src.Show.Rating.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Show.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.Runtime, opts => opts.MapFrom(src => src.Show.Runtime.ToString()))
|
|
|
|
// .ForMember(dest => dest.SeriesName, opts => opts.MapFrom(src => src.Show.Title))
|
|
|
|
// .ForMember(dest => dest.Title, opts => opts.MapFrom(src => src.Show.Title))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Show.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Status, opts => opts.MapFrom(src => src.Show.Status.DisplayName))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Show.Trailer))
|
|
|
|
// .ForMember(dest => dest.Trailer, opts => opts.MapFrom(src => src.Show.Trailer))
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Show.Homepage));
|
|
|
|
// .ForMember(dest => dest.Homepage, opts => opts.MapFrom(src => src.Show.Homepage));
|
|
|
|