You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Server.Impleme.../Photos/PhotoAlbumImageProvider.cs

45 lines
1.3 KiB

9 years ago
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
9 years ago
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Linq;
9 years ago
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Photos
{
9 years ago
//public class PhotoAlbumImageProvider : IDynamicImageProvider
//{
9 years ago
// public IEnumerable<ImageType> GetSupportedImages(IHasImages item)
// {
9 years ago
// return new List<ImageType> { ImageType.Primary };
// }
9 years ago
// public Task<DynamicImageResponse> GetImage(IHasImages item, ImageType type, CancellationToken cancellationToken)
// {
9 years ago
// var album = (PhotoAlbum)item;
9 years ago
// var image = album.Children
// .OfType<Photo>()
// .Select(i => i.GetImagePath(type))
// .FirstOrDefault(i => !string.IsNullOrEmpty(i));
// return Task.FromResult(new DynamicImageResponse
// {
// Path = image,
// HasImage = !string.IsNullOrEmpty(image)
// });
// }
// public string Name
// {
// get { return "Image Extractor"; }
// }
// public bool Supports(IHasImages item)
// {
// return item is PhotoAlbum;
// }
//}
}