mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Deep copy instead of Shallow copy
This commit is contained in:
parent
298a7488a3
commit
1d19fe50b4
@ -121,7 +121,18 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||||||
|
|
||||||
if (result is not null)
|
if (result is not null)
|
||||||
{
|
{
|
||||||
episodeResult = result[0];
|
// Forces a deep copy of the first TvEpisode, so we don't modify the original because it's cached
|
||||||
|
episodeResult = new TvEpisode()
|
||||||
|
{
|
||||||
|
Name = result[0].Name,
|
||||||
|
Overview = result[0].Overview,
|
||||||
|
AirDate = result[0].AirDate,
|
||||||
|
VoteAverage = result[0].VoteAverage,
|
||||||
|
ExternalIds = result[0].ExternalIds,
|
||||||
|
Videos = result[0].Videos,
|
||||||
|
Credits = result[0].Credits
|
||||||
|
};
|
||||||
|
|
||||||
if (result.Count > 1)
|
if (result.Count > 1)
|
||||||
{
|
{
|
||||||
var name = new StringBuilder(episodeResult.Name);
|
var name = new StringBuilder(episodeResult.Name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user