From c0abd43aac0822e52b1a56bbc4c698e74e6a2df2 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 12 Feb 2020 00:46:46 +0100 Subject: [PATCH] Initializing the link's show' --- Kyoo.Common/Models/PeopleLink.cs | 3 ++- Kyoo/Controllers/Crawler.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Kyoo.Common/Models/PeopleLink.cs b/Kyoo.Common/Models/PeopleLink.cs index b853f74a..c2cc3e1f 100644 --- a/Kyoo.Common/Models/PeopleLink.cs +++ b/Kyoo.Common/Models/PeopleLink.cs @@ -19,9 +19,10 @@ namespace Kyoo.Models public PeopleLink() {} - public PeopleLink(People people, string role, string type) + public PeopleLink(People people, Show show, string role, string type) { People = people; + Show = show; Role = role; Type = type; } diff --git a/Kyoo/Controllers/Crawler.cs b/Kyoo/Controllers/Crawler.cs index 55f4c692..6c74dd93 100644 --- a/Kyoo/Controllers/Crawler.cs +++ b/Kyoo/Controllers/Crawler.cs @@ -124,7 +124,7 @@ namespace Kyoo.Controllers .Select(x => { People existing = _libraryManager.GetPeopleBySlug(x.Slug); - return existing != null ? new PeopleLink(existing, x.Role, x.Type) : x; + return existing != null ? new PeopleLink(existing, show, x.Role, x.Type) : x; }).ToList(); return show; }