Damn son. So many changes... Fixed alot of stuff around tv episodes with the new DB model #865

This commit is contained in:
tidusjar 2017-06-28 23:15:01 +01:00
parent 1a7f81b16c
commit 0875b5f665
40 changed files with 340 additions and 874 deletions

View file

@ -7,6 +7,7 @@ using Ombi.Core.Models.Search;
using Ombi.Helpers;
using TraktApiSharp.Objects.Get.Shows;
using TraktApiSharp.Objects.Get.Shows.Common;
using Ombi.Store.Repository.Requests;
//using TraktApiSharp.Objects.Get.Shows;
//using TraktApiSharp.Objects.Get.Shows.Common;
@ -51,23 +52,22 @@ namespace Ombi.Mapping.Profiles
CreateMap<TvMazeCustomSeason, SeasonRequestModel>()
.ConstructUsing(x =>
{
var season = new SeasonRequestModel
{
SeasonNumber = x.SeasonNumber
};
foreach (var ep in x.EpisodeNumber)
{
season.Episodes.Add(new EpisodesRequested
{
EpisodeNumber = ep,
});
}
return season;
});
//CreateMap<TvMazeCustomSeason, SeasonRequests>()
// .ConstructUsing(x =>
// {
// var season = new SeasonRequests
// {
// SeasonNumber = x.SeasonNumber
// };
// foreach (var ep in x.EpisodeNumber)
// {
// season.Episodes.Add(new EpisodeRequests
// {
// EpisodeNumber = ep,
// });
// }
// return season;
// });