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.Providers/Folders/CollectionFolderImageProvid...

38 lines
1.0 KiB

using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Providers.All;
using System.Collections.Generic;
namespace MediaBrowser.Providers.Folders
{
public class CollectionFolderLocalImageProvider : ILocalImageFileProvider, IHasOrder
{
public string Name
{
get { return "Collection Folder Images"; }
}
public bool Supports(IHasImages item)
{
return item is CollectionFolder && item.LocationType == LocationType.FileSystem;
}
public int Order
{
get
{
// Run after LocalImageProvider
return 1;
}
}
public List<LocalImageInfo> GetImages(IHasImages item, DirectoryService directoryService)
{
var collectionFolder = (CollectionFolder)item;
return new LocalImageProvider().GetImages(item, collectionFolder.PhysicalLocations, directoryService);
}
}
}