mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 17:24:46 +03:00
more sync movement
This commit is contained in:
@@ -15,8 +15,10 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
/// <summary>
|
||||
/// Class BoxSet
|
||||
/// </summary>
|
||||
public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IMetadataContainer
|
||||
public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IMetadataContainer, IHasShares
|
||||
{
|
||||
public List<Share> Shares { get; set; }
|
||||
|
||||
public BoxSet()
|
||||
{
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
@@ -25,6 +27,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
|
||||
DisplayOrder = ItemSortBy.PremiereDate;
|
||||
Keywords = new List<string>();
|
||||
Shares = new List<Share>();
|
||||
}
|
||||
|
||||
protected override bool FilterLinkedChildrenPerUser
|
||||
@@ -160,5 +163,20 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
if (base.IsVisible(user))
|
||||
{
|
||||
var userId = user.Id.ToString("N");
|
||||
|
||||
return Shares.Any(i => string.Equals(userId, i.UserId, StringComparison.OrdinalIgnoreCase)) ||
|
||||
|
||||
// Need to support this for boxsets created prior to the creation of Shares
|
||||
Shares.Count == 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user