aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Folder.cs
diff options
context:
space:
mode:
authorebr11 Eric Reed spam <ebr11 Eric Reed spam@reedsplace.com>2012-09-20 13:52:56 -0400
committerebr11 Eric Reed spam <ebr11 Eric Reed spam@reedsplace.com>2012-09-20 13:52:56 -0400
commitef07c2e6ab71552b088dc223666a18167ca31182 (patch)
tree172a082ffb71dceda82b626b3e1e62f2027c2abc /MediaBrowser.Controller/Entities/Folder.cs
parente2ae376eef11dbb69c6d5d0ca31b202394452390 (diff)
Move PhysicalLocations to baseitem
Diffstat (limited to 'MediaBrowser.Controller/Entities/Folder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 6cf47c2f2d..07529c80f6 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -32,8 +32,6 @@ namespace MediaBrowser.Controller.Entities
#endregion
- public IEnumerable<string> PhysicalLocations { get; set; }
-
public override bool IsFolder
{
get
@@ -155,7 +153,7 @@ namespace MediaBrowser.Controller.Entities
changedArgs.ItemsAdded.Add(child);
//refresh it
child.RefreshMetadata();
- //Logger.LogInfo("New Item Added to Library: ("+child.GetType().Name+") "+ child.Name + " (" + child.Path + ")");
+ Logger.LogInfo("New Item Added to Library: ("+child.GetType().Name+") "+ child.Name + " (" + child.Path + ")");
//save it in repo...
//and add it to our valid children
@@ -199,6 +197,8 @@ namespace MediaBrowser.Controller.Entities
//now, if anything changed - replace our children
if (changed)
{
+ if (changedArgs.ItemsRemoved != null) foreach (var item in changedArgs.ItemsRemoved) Logger.LogDebugInfo("** " + item.Name + " Removed from library.");
+
lock (childLock)
ActualChildren = validChildren;
//and save children in repo...
@@ -613,7 +613,7 @@ namespace MediaBrowser.Controller.Entities
}
//this should be functionally equivilent to what was here since it is IEnum and works on a thread-safe copy
- return RecursiveChildren.FirstOrDefault(i => i.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ return RecursiveChildren.FirstOrDefault(i => i.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase));
}
}
}