aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Folder.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-20 11:55:22 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-20 11:55:22 -0400
commit0d518ebf170eefc29fd164eabcbd8d4152177fee (patch)
tree618a4b9dde5f75c70f7ee032a2183780dcea3e2d /MediaBrowser.Controller/Entities/Folder.cs
parente18e7c2b6ee2b6b66d50164ba9c2360da78f73d9 (diff)
#712 - group multiple versions
Diffstat (limited to 'MediaBrowser.Controller/Entities/Folder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 45daaba0b..21b34c733 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -446,24 +446,31 @@ namespace MediaBrowser.Controller.Entities
{
BaseItem currentChild;
- if (currentChildren.TryGetValue(child.Id, out currentChild) && IsValidFromResolver(currentChild, child))
+ if (currentChildren.TryGetValue(child.Id, out currentChild))
{
- var currentChildLocationType = currentChild.LocationType;
- if (currentChildLocationType != LocationType.Remote &&
- currentChildLocationType != LocationType.Virtual)
+ if (IsValidFromResolver(currentChild, child))
{
- currentChild.DateModified = child.DateModified;
- }
+ var currentChildLocationType = currentChild.LocationType;
+ if (currentChildLocationType != LocationType.Remote &&
+ currentChildLocationType != LocationType.Virtual)
+ {
+ currentChild.DateModified = child.DateModified;
+ }
- currentChild.IsOffline = false;
+ currentChild.IsOffline = false;
+ validChildren.Add(currentChild);
+ }
+ else
+ {
+ validChildren.Add(child);
+ }
}
else
{
- //brand new item - needs to be added
+ // Brand new item - needs to be added
newItems.Add(child);
+ validChildren.Add(child);
}
-
- validChildren.Add(currentChild);
}
// If any items were added or removed....
@@ -736,7 +743,7 @@ namespace MediaBrowser.Controller.Entities
/// <returns>BaseItem.</returns>
private BaseItem RetrieveChild(Guid child)
{
- var item = LibraryManager.RetrieveItem(child);
+ var item = LibraryManager.GetItemById(child);
if (item != null)
{