diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-03 23:34:36 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-03 23:34:36 -0400 |
| commit | 3640f620863e4947a07ad6ebbf54ab6427534b38 (patch) | |
| tree | 2b9c58f6e0ea069f282e46cbf081b38229bacb94 /MediaBrowser.Controller/Entities/UserRootFolder.cs | |
| parent | 71351344d7f5a9057fe19b754f5d14d917e79d60 (diff) | |
create collections from movies page
Diffstat (limited to 'MediaBrowser.Controller/Entities/UserRootFolder.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserRootFolder.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs index 0290fa39a..e5a8135c2 100644 --- a/MediaBrowser.Controller/Entities/UserRootFolder.cs +++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs @@ -2,6 +2,8 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace MediaBrowser.Controller.Entities { @@ -32,5 +34,22 @@ namespace MediaBrowser.Controller.Entities return hasChanges; } + + protected override async Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) + { + await base.ValidateChildrenInternal(progress, cancellationToken, recursive, refreshChildMetadata, refreshOptions, directoryService) + .ConfigureAwait(false); + + // Not the best way to handle this, but it solves an issue + // CollectionFolders aren't always getting saved after changes + // This means that grabbing the item by Id may end up returning the old one + // Fix is in two places - make sure the folder gets saved + // And here to remedy it for affected users. + // In theory this can be removed eventually. + foreach (var item in Children) + { + LibraryManager.RegisterItem(item); + } + } } } |
