mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 06:00:50 -07:00
#865 rework the backend data. Actually use real models rather than a JSON store.
This commit is contained in:
parent
08e389f590
commit
2bc916998c
55 changed files with 1277 additions and 702 deletions
|
@ -30,7 +30,7 @@ namespace Ombi.Mapping.Profiles
|
|||
.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.Status, opts => opts.MapFrom(src => src.show.status));
|
||||
|
||||
|
||||
CreateMap<TvMazeShow, SearchTvShowViewModel>()
|
||||
.ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.externals.thetvdb))
|
||||
.ForMember(dest => dest.FirstAired, opts => opts.MapFrom(src => src.premiered))
|
||||
|
@ -39,12 +39,15 @@ namespace Ombi.Mapping.Profiles
|
|||
.ForMember(dest => dest.NetworkId, opts => opts.MapFrom(src => src.network.id.ToString()))
|
||||
.ForMember(dest => dest.Overview, opts => opts.MapFrom(src => src.summary.RemoveHtml()))
|
||||
.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.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.Status, opts => opts.MapFrom(src => src.status))
|
||||
.ForMember(dest => dest.SeasonRequests, opts => opts.MapFrom(src => src.Season));
|
||||
.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));
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue