jellyfin-server/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs

26 lines
889 B
C#
Raw Normal View History

using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.IO;
2014-10-29 22:01:02 +00:00
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
2014-08-12 02:59:51 +00:00
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
2014-10-20 03:04:45 +00:00
namespace MediaBrowser.Server.Implementations.Photos
2014-08-12 02:59:51 +00:00
{
2015-03-13 19:16:34 +00:00
public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>
2014-08-12 02:59:51 +00:00
{
public PhotoAlbumImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths) : base(fileSystem, providerManager, applicationPaths)
2014-10-20 03:04:45 +00:00
{
}
2014-10-29 22:01:02 +00:00
protected override Task<List<BaseItem>> GetItemsWithImages(IHasImages item)
2014-10-20 03:04:45 +00:00
{
2014-10-29 22:01:02 +00:00
var photoAlbum = (PhotoAlbum)item;
2015-01-25 06:34:50 +00:00
var items = GetFinalItems(photoAlbum.GetRecursiveChildren(i => i is Photo).ToList());
2014-10-20 03:04:45 +00:00
2014-10-29 22:01:02 +00:00
return Task.FromResult(items);
2014-10-20 03:04:45 +00:00
}
2014-08-12 02:59:51 +00:00
}
}