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