commit
4654ee606f
|
@ -1578,8 +1578,36 @@ namespace MediaBrowser.Controller.Entities
|
|||
return !IsPlayed(user);
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public virtual bool SupportsUserDataFromChildren
|
||||
{
|
||||
get
|
||||
{
|
||||
// These are just far too slow.
|
||||
if (this is ICollectionFolder)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this is UserView)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this is UserRootFolder)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, User user)
|
||||
{
|
||||
if (!SupportsUserDataFromChildren)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var recursiveItemCount = 0;
|
||||
var unplayed = 0;
|
||||
|
||||
|
|
|
@ -125,10 +125,15 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||
get { return LocationType == LocationType.Virtual && GetEpisodes().All(i => i.IsMissingEpisode); }
|
||||
}
|
||||
|
||||
private bool GetIsUnaired()
|
||||
{
|
||||
return GetEpisodes().All(i => i.IsUnaired);
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsUnaired
|
||||
{
|
||||
get { return GetEpisodes().All(i => i.IsUnaired); }
|
||||
get { return GetIsUnaired(); }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
|
|
|
@ -499,8 +499,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
{
|
||||
dto.ChildCount = GetChildCount(folder, user);
|
||||
|
||||
// These are just far too slow.
|
||||
if (!(folder is UserRootFolder) && !(folder is UserView) && !(folder is ICollectionFolder))
|
||||
if (!folder.SupportsUserDataFromChildren)
|
||||
{
|
||||
SetSpecialCounts(folder, user, dto, fields, syncProgress);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
private IDbCommand _updateInheritedRatingCommand;
|
||||
private IDbCommand _updateInheritedTagsCommand;
|
||||
|
||||
public const int LatestSchemaVersion = 68;
|
||||
public const int LatestSchemaVersion = 69;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||
|
|
Loading…
Reference in New Issue
Block a user