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