aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/ItemUpdateService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-06-28 00:49:40 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-06-28 00:49:40 -0400
commit8fe7315afab90470833b11db36d426959262ccfb (patch)
tree36bfe8cf3430fabe2da3d06a866725fa7c3fc800 /MediaBrowser.Api/ItemUpdateService.cs
parent56d7f729a0ee17ece472ccbcff10a7ea5374b5ad (diff)
parent7ae83e3c45e9318774e896bc588b35aa33295c32 (diff)
Merge branch 'beta' of https://github.com/MediaBrowser/Emby into beta
Diffstat (limited to 'MediaBrowser.Api/ItemUpdateService.cs')
-rw-r--r--MediaBrowser.Api/ItemUpdateService.cs27
1 files changed, 11 insertions, 16 deletions
diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs
index 79aaccfe8..b944a39b6 100644
--- a/MediaBrowser.Api/ItemUpdateService.cs
+++ b/MediaBrowser.Api/ItemUpdateService.cs
@@ -70,26 +70,21 @@ namespace MediaBrowser.Api
Cultures = _localizationManager.GetCultures().ToList()
};
- var locationType = item.LocationType;
- if (locationType == LocationType.FileSystem ||
- locationType == LocationType.Offline)
+ if (!item.IsVirtualItem && !(item is ICollectionFolder) && !(item is UserView) && !(item is AggregateFolder) && !(item is LiveTvChannel) && !(item is IItemByName))
{
- if (!(item is ICollectionFolder) && !(item is UserView) && !(item is AggregateFolder) && !(item is LiveTvChannel) && !(item is IItemByName))
+ var inheritedContentType = _libraryManager.GetInheritedContentType(item);
+ var configuredContentType = _libraryManager.GetConfiguredContentType(item);
+
+ if (string.IsNullOrWhiteSpace(inheritedContentType) || string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) || !string.IsNullOrWhiteSpace(configuredContentType))
{
- var inheritedContentType = _libraryManager.GetInheritedContentType(item);
- var configuredContentType = _libraryManager.GetConfiguredContentType(item);
+ info.ContentTypeOptions = GetContentTypeOptions(true);
+ info.ContentType = configuredContentType;
- if (string.IsNullOrWhiteSpace(inheritedContentType) || string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) || !string.IsNullOrWhiteSpace(configuredContentType))
+ if (string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
- info.ContentTypeOptions = GetContentTypeOptions(true);
- info.ContentType = configuredContentType;
-
- if (string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
- {
- info.ContentTypeOptions = info.ContentTypeOptions
- .Where(i => string.IsNullOrWhiteSpace(i.Value) || string.Equals(i.Value, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
- .ToList();
- }
+ info.ContentTypeOptions = info.ContentTypeOptions
+ .Where(i => string.IsNullOrWhiteSpace(i.Value) || string.Equals(i.Value, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
+ .ToList();
}
}
}