2015-05-13 16:43:34 +02:00
|
|
|
|
using MediaBrowser.Common.Configuration;
|
|
|
|
|
using MediaBrowser.Controller.Drawing;
|
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-10-29 23:01:02 +01:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-08-12 04:59:51 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
2016-11-03 08:14:14 +01:00
|
|
|
|
using Emby.Server.Implementations.Images;
|
2016-10-25 21:02:04 +02:00
|
|
|
|
using MediaBrowser.Model.IO;
|
2015-10-28 17:42:04 +01:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2014-08-12 04:59:51 +02:00
|
|
|
|
|
2016-11-03 08:14:14 +01:00
|
|
|
|
namespace Emby.Server.Implementations.Photos
|
2014-08-12 04:59:51 +02:00
|
|
|
|
{
|
2015-05-13 16:43:34 +02:00
|
|
|
|
public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>
|
2015-05-10 23:56:13 +02:00
|
|
|
|
{
|
2015-05-13 16:43:34 +02:00
|
|
|
|
public PhotoAlbumImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor)
|
|
|
|
|
: base(fileSystem, providerManager, applicationPaths, imageProcessor)
|
2015-05-10 23:56:13 +02:00
|
|
|
|
{
|
|
|
|
|
}
|
2014-10-20 05:04:45 +02:00
|
|
|
|
|
2017-08-07 23:06:13 +02:00
|
|
|
|
protected override List<BaseItem> GetItemsWithImages(IHasMetadata item)
|
2015-05-10 23:56:13 +02:00
|
|
|
|
{
|
2015-05-13 16:43:34 +02:00
|
|
|
|
var photoAlbum = (PhotoAlbum)item;
|
2017-08-09 21:56:38 +02:00
|
|
|
|
var items = GetFinalItems(photoAlbum.Children);
|
2014-10-20 05:04:45 +02:00
|
|
|
|
|
2017-05-26 08:48:54 +02:00
|
|
|
|
return items;
|
2015-05-10 23:56:13 +02:00
|
|
|
|
}
|
2015-10-26 06:29:32 +01:00
|
|
|
|
|
2017-08-07 23:06:13 +02:00
|
|
|
|
protected override string CreateImage(IHasMetadata item, List<BaseItem> itemsWithImages, string outputPathWithoutExtension, ImageType imageType, int imageIndex)
|
2015-10-26 06:29:32 +01:00
|
|
|
|
{
|
2015-11-14 17:58:01 +01:00
|
|
|
|
return CreateSingleImage(itemsWithImages, outputPathWithoutExtension, ImageType.Primary);
|
2015-10-26 06:29:32 +01:00
|
|
|
|
}
|
2015-05-10 23:56:13 +02:00
|
|
|
|
}
|
2014-08-12 04:59:51 +02:00
|
|
|
|
}
|