fixes #144 - Marking a boxset as viewed doesn't mark the individual titles of the set as viewed

This commit is contained in:
Luke Pulverenti 2013-04-16 23:37:14 -04:00
parent c3a84d8db5
commit a90e925ec6

View File

@ -831,10 +831,8 @@ namespace MediaBrowser.Controller.Entities
/// <returns>Task.</returns>
public override async Task SetPlayedStatus(User user, bool wasPlayed, IUserDataRepository userManager)
{
await base.SetPlayedStatus(user, wasPlayed, userManager).ConfigureAwait(false);
// Now sweep through recursively and update status
var tasks = GetChildren(user).Select(c => c.SetPlayedStatus(user, wasPlayed, userManager));
// Sweep through recursively and update status
var tasks = GetRecursiveChildren(user).Where(i => !i.IsFolder).Select(c => c.SetPlayedStatus(user, wasPlayed, userManager));
await Task.WhenAll(tasks).ConfigureAwait(false);
}