2014-02-08 20:02:35 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-08 22:38:02 +00:00
|
|
|
|
public List<LocalImageInfo> GetImages(IHasImages item, DirectoryService directoryService)
|
2014-02-08 20:02:35 +00:00
|
|
|
|
{
|
|
|
|
|
var collectionFolder = (CollectionFolder)item;
|
|
|
|
|
|
2014-02-08 22:38:02 +00:00
|
|
|
|
return new LocalImageProvider().GetImages(item, collectionFolder.PhysicalLocations, directoryService);
|
2014-02-08 20:02:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|