diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 39cccf28a8..9075bdfc6f 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -332,7 +332,7 @@ namespace MediaBrowser.Api.UserLibrary
var userId = user == null ? (Guid?)null : user.Id;
var item = string.IsNullOrEmpty(request.ParentId) ?
- user == null ? (BaseItem)_libraryManager.RootFolder : user.RootFolder :
+ user == null ? _libraryManager.RootFolder : user.RootFolder :
_dtoService.GetItemByDtoId(request.ParentId, userId);
// Default list type = children
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 923673bd83..f7f2346a8e 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -229,7 +229,19 @@ namespace MediaBrowser.Controller.Entities
}
}
- public bool IsUnidentified { get; set; }
+ [IgnoreDataMember]
+ public bool IsUnidentified
+ {
+ get
+ {
+ if (ProviderIds.Any())
+ {
+ return false;
+ }
+
+ return false;
+ }
+ }
///
/// Gets or sets the locked fields.
diff --git a/MediaBrowser.Controller/Entities/IHasMetadata.cs b/MediaBrowser.Controller/Entities/IHasMetadata.cs
index 91f37135f1..095db08157 100644
--- a/MediaBrowser.Controller/Entities/IHasMetadata.cs
+++ b/MediaBrowser.Controller/Entities/IHasMetadata.cs
@@ -49,11 +49,5 @@ namespace MediaBrowser.Controller.Entities
///
/// true if XXXX, false otherwise.
bool BeforeMetadataRefresh();
-
- ///
- /// Gets or sets a value indicating whether this instance is unidentified.
- ///
- /// true if this instance is unidentified; otherwise, false.
- bool IsUnidentified { get; set; }
}
}
diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs
index 9b42820e82..24f4b3b2f1 100644
--- a/MediaBrowser.Providers/Manager/MetadataService.cs
+++ b/MediaBrowser.Providers/Manager/MetadataService.cs
@@ -312,7 +312,6 @@ namespace MediaBrowser.Providers.Manager
// Only one local provider allowed per item
hasLocalMetadata = true;
- item.IsUnidentified = false;
break;
}
@@ -387,9 +386,6 @@ namespace MediaBrowser.Providers.Manager
{
TIdType id = null;
- var unidentifiedCount = 0;
- var identifiedCount = 0;
-
foreach (var provider in providers)
{
var providerName = provider.GetType().Name;
@@ -414,11 +410,9 @@ namespace MediaBrowser.Providers.Manager
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload;
- identifiedCount++;
}
else
{
- unidentifiedCount++;
Logger.Debug("{0} returned no metadata for {1}", providerName, item.Path ?? item.Name);
}
}
@@ -428,20 +422,11 @@ namespace MediaBrowser.Providers.Manager
}
catch (Exception ex)
{
- unidentifiedCount++;
refreshResult.Status = ProviderRefreshStatus.CompletedWithErrors;
refreshResult.ErrorMessage = ex.Message;
Logger.ErrorException("Error in {0}", ex, provider.Name);
}
}
-
- var isUnidentified = unidentifiedCount > 0 && identifiedCount == 0;
-
- if (item.IsUnidentified != isUnidentified)
- {
- item.IsUnidentified = isUnidentified;
- refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
- }
}
private void MergeNewData(TItemType source, TIdType lookupInfo)
diff --git a/MediaBrowser.ServerApplication/LibraryViewer.cs b/MediaBrowser.ServerApplication/LibraryViewer.cs
index 2bf51be4ad..a8eda801b4 100644
--- a/MediaBrowser.ServerApplication/LibraryViewer.cs
+++ b/MediaBrowser.ServerApplication/LibraryViewer.cs
@@ -84,7 +84,8 @@ namespace MediaBrowser.ServerApplication
{
treeView1.Nodes.Clear();
- IEnumerable children = _currentUser.Name == "Physical" ? new[] { _libraryManager.RootFolder } : _libraryManager.RootFolder.GetChildren(_currentUser, true);
+ var isPhysical = _currentUser.Name == "Physical";
+ IEnumerable children = isPhysical ? new[] { _libraryManager.RootFolder } : _libraryManager.RootFolder.GetChildren(_currentUser, true);
children = OrderByName(children, _currentUser);
foreach (Folder folder in children)
@@ -94,9 +95,9 @@ namespace MediaBrowser.ServerApplication
var node = new TreeNode { Tag = currentFolder };
- var subChildren = currentFolder.GetChildren(_currentUser, true);
+ var subChildren = isPhysical ? currentFolder.Children : currentFolder.GetChildren(_currentUser, true);
subChildren = OrderByName(subChildren, _currentUser);
- AddChildren(node, subChildren, _currentUser);
+ AddChildren(node, subChildren, _currentUser, isPhysical);
node.Text = currentFolder.Name + " (" +
node.Nodes.Count + ")";
@@ -110,7 +111,7 @@ namespace MediaBrowser.ServerApplication
/// The parent.
/// The children.
/// The user.
- private void AddChildren(TreeNode parent, IEnumerable children, User user)
+ private void AddChildren(TreeNode parent, IEnumerable children, User user, bool isPhysical)
{
foreach (var item in children)
{
@@ -120,7 +121,9 @@ namespace MediaBrowser.ServerApplication
{
var prefs = _displayPreferencesManager.GetDisplayPreferences(subFolder.DisplayPreferencesId, user.Id, "LibraryExplorer");
- AddChildren(node, OrderBy(subFolder.GetChildren(user, true), user, prefs.SortBy), user);
+ var subChildren = isPhysical ? subFolder.Children : subFolder.GetChildren(_currentUser, true);
+
+ AddChildren(node, OrderBy(subChildren, user, prefs.SortBy), user, isPhysical);
node.Text = item.Name + " (" + node.Nodes.Count + ")";
}
else