mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
fix web playback
This commit is contained in:
parent
280ab32ec1
commit
003886a476
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Api.Playback
|
||||
{
|
||||
[Route("/Items/{Id}/PlaybackInfo", "GET", Summary = "Gets live playback media info for an item")]
|
||||
[Route("/Items/{Id}/MediaInfo", "GET", Summary = "Gets live playback media info for an item")]
|
||||
public class GetLiveMediaInfo : IReturn<LiveMediaInfoResult>
|
||||
{
|
||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
|
@ -1673,7 +1673,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
throw new ArgumentNullException("viewType");
|
||||
}
|
||||
|
||||
var id = GetNewItemId("30_namedview_" + name + user.Id.ToString("N") + (parentId ?? string.Empty), typeof(UserView));
|
||||
var id = GetNewItemId("31_namedview_" + name + user.Id.ToString("N") + (parentId ?? string.Empty), typeof(UserView));
|
||||
|
||||
var path = Path.Combine(ConfigurationManager.ApplicationPaths.InternalMetadataPath, "views", id.ToString("N"));
|
||||
|
||||
|
@ -52,8 +52,6 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
.OfType<Folder>()
|
||||
.ToList();
|
||||
|
||||
var list = new List<Folder>();
|
||||
|
||||
var excludeFolderIds = user.Configuration.ExcludeFoldersFromGrouping.Select(i => new Guid(i)).ToList();
|
||||
|
||||
var standaloneFolders = folders
|
||||
@ -65,7 +63,21 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
.OfType<ICollectionFolder>()
|
||||
.ToList();
|
||||
|
||||
list.AddRange(standaloneFolders);
|
||||
var list = new List<Folder>();
|
||||
|
||||
if (_config.Configuration.EnableUserSpecificUserViews)
|
||||
{
|
||||
foreach (var folder in standaloneFolders)
|
||||
{
|
||||
var collectionFolder = folder as ICollectionFolder;
|
||||
var folderViewType = collectionFolder == null ? null : collectionFolder.CollectionType;
|
||||
list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.AddRange(standaloneFolders);
|
||||
}
|
||||
|
||||
if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) ||
|
||||
foldersWithViewTypes.Any(i => string.IsNullOrWhiteSpace(i.CollectionType)))
|
||||
@ -169,6 +181,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
return _libraryManager.GetNamedView(user, name, type, sortName, cancellationToken);
|
||||
}
|
||||
|
||||
public Task<UserView> GetUserView(Guid parentId, string name, string type, string sortName, User user, CancellationToken cancellationToken)
|
||||
{
|
||||
return _libraryManager.GetNamedView(user, name, parentId.ToString("N"), type, sortName, cancellationToken);
|
||||
}
|
||||
|
||||
public List<Tuple<BaseItem, List<BaseItem>>> GetLatestItems(LatestItemsQuery request)
|
||||
{
|
||||
var user = _userManager.GetUserById(request.UserId);
|
||||
|
Loading…
Reference in New Issue
Block a user