fix playlist deletion

pull/702/head
Luke Pulverenti 8 years ago
parent 2095170eed
commit b9c430059a

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

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

@ -59,6 +59,9 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
return null; return null;
} }
var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
if (args.ContainsFileSystemEntryByName("tvshow.nfo")) if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
{ {
return new Series return new Series
@ -68,9 +71,6 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
}; };
} }
var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
var configuredContentType = _libraryManager.GetConfiguredContentType(args.Path); var configuredContentType = _libraryManager.GetConfiguredContentType(args.Path);
if (!string.Equals(configuredContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) if (!string.Equals(configuredContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{ {
@ -83,6 +83,15 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
} }
else if (string.IsNullOrWhiteSpace(collectionType)) 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) if (args.Parent.IsRoot)
{ {
return null; return null;

Loading…
Cancel
Save