add some features to video libraries
This commit is contained in:
parent
772dba319f
commit
b16d55a284
|
@ -566,19 +566,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return GetResult(collections, parent, query);
|
return GetResult(collections, parent, query);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<QueryResult<BaseItem>> GetPhotosView(Folder queryParent, User user, InternalItemsQuery query)
|
|
||||||
{
|
|
||||||
if (query.Recursive)
|
|
||||||
{
|
|
||||||
var mediaTypes = new[] { MediaType.Video, MediaType.Photo };
|
|
||||||
var items = GetRecursiveChildren(queryParent, user, new[] { CollectionType.Photos, string.Empty }, i => (i is PhotoAlbum || mediaTypes.Contains(i.MediaType ?? string.Empty, StringComparer.OrdinalIgnoreCase)) && FilterItem(i, query));
|
|
||||||
|
|
||||||
return PostFilterAndSort(items, queryParent, null, query);
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetResult(queryParent.GetChildren(user, true), queryParent, query);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task<QueryResult<BaseItem>> GetTvView(Folder parent, User user, InternalItemsQuery query)
|
private async Task<QueryResult<BaseItem>> GetTvView(Folder parent, User user, InternalItemsQuery query)
|
||||||
{
|
{
|
||||||
if (query.Recursive)
|
if (query.Recursive)
|
||||||
|
|
|
@ -77,16 +77,12 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
||||||
return ResolveVideos<MusicVideo>(parent, files, directoryService, false);
|
return ResolveVideos<MusicVideo>(parent, files, directoryService, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return ResolveVideos<Video>(parent, files, directoryService, false);
|
return ResolveVideos<Video>(parent, files, directoryService, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
//return ResolveVideos<Video>(parent, files, directoryService, collectionType, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(collectionType))
|
if (string.IsNullOrEmpty(collectionType))
|
||||||
{
|
{
|
||||||
// Owned items should just use the plain video type
|
// Owned items should just use the plain video type
|
||||||
|
@ -250,11 +246,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
||||||
item = ResolveVideo<Movie>(args, true);
|
item = ResolveVideo<Movie>(args, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) ||
|
||||||
{
|
string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
|
||||||
item = ResolveVideo<Video>(args, false);
|
|
||||||
}
|
|
||||||
else if (string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
{
|
||||||
item = ResolveVideo<Video>(args, false);
|
item = ResolveVideo<Video>(args, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user