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;
|
|
|
|
|
var items = GetFinalItems(photoAlbum.RecursiveChildren.Where(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
|
|
|
|
}
|
|
|
|
|
}
|