Permalink
Browse files

Fix Episode Data not Being Updated

  • Loading branch information...
da3dsoul committed Mar 22, 2018
1 parent 6101364 commit b6a5303f69ba29fa095e0ee727cfb8050e076951
Showing with 8 additions and 0 deletions.
  1. +8 −0 Shoko.Server/Extensions/ModelDatabase.cs
@@ -69,6 +69,14 @@ public static void CreateAnimeEpisode(this AniDB_Episode episode, ISession sessi
animeEp.AnimeSeriesID = animeSeriesID;
RepoFactory.AnimeEpisode.Save(animeEp);
}
else
{
if (existingEp.AnimeSeriesID != animeSeriesID) existingEp.AnimeSeriesID = animeSeriesID;
existingEp.PlexContract = null;
RepoFactory.AnimeEpisode.Save(existingEp);
foreach (var episodeUser in RepoFactory.AnimeEpisode_User.GetByEpisodeID(existingEp.AnimeEpisodeID))
RepoFactory.AnimeEpisode_User.SaveWithOpenTransaction(session, episodeUser);
}
}

public static MovieDB_Movie GetMovieDB_Movie(this CrossRef_AniDB_Other cross)

0 comments on commit b6a5303

Please sign in to comment.