2014-06-29 23:04:50 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-02-08 15:02:35 -05:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
|
|
2014-06-29 23:04:50 -04:00
|
|
|
|
namespace MediaBrowser.LocalMetadata.Images
|
2014-02-08 15:02:35 -05:00
|
|
|
|
{
|
|
|
|
|
public class CollectionFolderLocalImageProvider : ILocalImageFileProvider, IHasOrder
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "Collection Folder Images"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasImages item)
|
|
|
|
|
{
|
2014-02-10 15:11:46 -05:00
|
|
|
|
return item is CollectionFolder && item.SupportsLocalMetadata;
|
2014-02-08 15:02:35 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int Order
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
// Run after LocalImageProvider
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-10 13:39:41 -05:00
|
|
|
|
public List<LocalImageInfo> GetImages(IHasImages item, IDirectoryService directoryService)
|
2014-02-08 15:02:35 -05:00
|
|
|
|
{
|
|
|
|
|
var collectionFolder = (CollectionFolder)item;
|
|
|
|
|
|
2014-02-08 17:38:02 -05:00
|
|
|
|
return new LocalImageProvider().GetImages(item, collectionFolder.PhysicalLocations, directoryService);
|
2014-02-08 15:02:35 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|