mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
calculate item by name counts on the fly
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
@@ -10,11 +9,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
public class Studio : BaseItem, IItemByName
|
||||
{
|
||||
public Studio()
|
||||
{
|
||||
UserItemCountList = new List<ItemByNameCounts>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user data key.
|
||||
/// </summary>
|
||||
@@ -24,9 +18,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
return "Studio-" + Name;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public List<ItemByNameCounts> UserItemCountList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
@@ -51,5 +42,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(i => i.Studios.Contains(Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user