mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 19:08:53 -07:00
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
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, IDirectoryService directoryService)
|
|
{
|
|
var collectionFolder = (CollectionFolder)item;
|
|
|
|
return new LocalImageProvider().GetImages(item, collectionFolder.PhysicalLocations, directoryService);
|
|
}
|
|
}
|
|
}
|