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

26 lines
843 B
C#
Raw Normal View History

2014-10-29 22:01:02 +00:00
using MediaBrowser.Common.IO;
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
{
2014-10-29 22:01:02 +00:00
public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>, ICustomMetadataProvider<PhotoAlbum>
2014-08-12 02:59:51 +00:00
{
2014-10-29 22:01:02 +00:00
public PhotoAlbumImageProvider(IFileSystem fileSystem, IProviderManager providerManager)
: base(fileSystem, providerManager)
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
}
}