Apply review suggestion
This commit is contained in:
parent
e4078f984a
commit
1a14902da8
|
@ -194,7 +194,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <exception cref="InvalidOperationException">Unable to add + item.Name.</exception>
|
/// <exception cref="InvalidOperationException">Unable to add + item.Name.</exception>
|
||||||
public virtual void AddChild(BaseItem item)
|
public void AddChild(BaseItem item)
|
||||||
{
|
{
|
||||||
item.SetParent(this);
|
item.SetParent(this);
|
||||||
|
|
||||||
|
|
|
@ -265,20 +265,5 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
|
|
||||||
return hasChanges;
|
return hasChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override void AddChild(BaseItem item)
|
|
||||||
{
|
|
||||||
if (item is Episode episode)
|
|
||||||
{
|
|
||||||
episode.SeriesPresentationUniqueKey = SeriesPresentationUniqueKey;
|
|
||||||
episode.SeriesId = SeriesId;
|
|
||||||
episode.SeriesName = SeriesName;
|
|
||||||
episode.SeasonId = Id;
|
|
||||||
episode.SeasonName = Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
base.AddChild(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,18 +499,5 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override void AddChild(BaseItem item)
|
|
||||||
{
|
|
||||||
if (item is IHasSeries typedItem)
|
|
||||||
{
|
|
||||||
typedItem.SeriesId = Id;
|
|
||||||
typedItem.SeriesName = Name;
|
|
||||||
typedItem.SeriesPresentationUniqueKey = PresentationUniqueKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
base.AddChild(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,6 +241,9 @@ namespace MediaBrowser.Providers.TV
|
||||||
series.Id + (seasonNumber ?? -1).ToString(CultureInfo.InvariantCulture) + seasonName,
|
series.Id + (seasonNumber ?? -1).ToString(CultureInfo.InvariantCulture) + seasonName,
|
||||||
typeof(Season)),
|
typeof(Season)),
|
||||||
IsVirtualItem = false,
|
IsVirtualItem = false,
|
||||||
|
SeriesId = series.Id,
|
||||||
|
SeriesName = series.Name,
|
||||||
|
SeriesPresentationUniqueKey = series.GetPresentationUniqueKey()
|
||||||
};
|
};
|
||||||
|
|
||||||
series.AddChild(season);
|
series.AddChild(season);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user