mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Apply review suggestion
This commit is contained in:
parent
e4078f984a
commit
1a14902da8
@ -194,7 +194,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <exception cref="InvalidOperationException">Unable to add + item.Name.</exception>
|
||||
public virtual void AddChild(BaseItem item)
|
||||
public void AddChild(BaseItem item)
|
||||
{
|
||||
item.SetParent(this);
|
||||
|
||||
|
@ -265,20 +265,5 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/// <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,
|
||||
typeof(Season)),
|
||||
IsVirtualItem = false,
|
||||
SeriesId = series.Id,
|
||||
SeriesName = series.Name,
|
||||
SeriesPresentationUniqueKey = series.GetPresentationUniqueKey()
|
||||
};
|
||||
|
||||
series.AddChild(season);
|
||||
|
Loading…
Reference in New Issue
Block a user