Merge pull request #2230 from MediaBrowser/dev

fix playlist deletion
This commit is contained in:
Luke 2016-10-13 14:44:51 -04:00 committed by GitHub
commit 61030bb109
3 changed files with 20 additions and 11 deletions

View File

@ -81,7 +81,7 @@ namespace MediaBrowser.Api
info.ContentTypeOptions = GetContentTypeOptions(true);
info.ContentType = configuredContentType;
if (string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
if (string.IsNullOrWhiteSpace(inheritedContentType) || 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))

View File

@ -1068,7 +1068,7 @@ namespace MediaBrowser.Controller.Entities
{
var result = new Dictionary<Guid, BaseItem>();
AddChildrenToList(result, true, true, filter);
AddChildrenToList(result, includeLinkedChildren, true, filter);
return result.Values.ToList();
}

View File

@ -59,18 +59,18 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
return null;
}
if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
{
return new Series
{
Path = args.Path,
Name = Path.GetFileName(args.Path)
};
}
var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
{
return new Series
{
Path = args.Path,
Name = Path.GetFileName(args.Path)
};
}
var configuredContentType = _libraryManager.GetConfiguredContentType(args.Path);
if (!string.Equals(configuredContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
@ -83,6 +83,15 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
}
else if (string.IsNullOrWhiteSpace(collectionType))
{
if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
{
return new Series
{
Path = args.Path,
Name = Path.GetFileName(args.Path)
};
}
if (args.Parent.IsRoot)
{
return null;