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.
45 lines
1.2 KiB
45 lines
1.2 KiB
using MediaBrowser.Controller.Entities;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
{
|
|
public interface ILocalMetadataProvider : IMetadataProvider
|
|
{
|
|
}
|
|
|
|
public interface ILocalMetadataProvider<TItemType> : IMetadataProvider<TItemType>, ILocalMetadataProvider
|
|
where TItemType : IHasMetadata
|
|
{
|
|
/// <summary>
|
|
/// Gets the metadata.
|
|
/// </summary>
|
|
/// <param name="info">The information.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{MetadataResult{`0}}.</returns>
|
|
Task<LocalMetadataResult<TItemType>> GetMetadata(ItemInfo info, CancellationToken cancellationToken);
|
|
}
|
|
|
|
public class ItemInfo
|
|
{
|
|
public string Path { get; set; }
|
|
|
|
public bool IsInMixedFolder { get; set; }
|
|
}
|
|
|
|
public class LocalMetadataResult<T>
|
|
where T : IHasMetadata
|
|
{
|
|
public bool HasMetadata { get; set; }
|
|
public T Item { get; set; }
|
|
|
|
public List<LocalImageInfo> Images { get; set; }
|
|
|
|
public LocalMetadataResult()
|
|
{
|
|
Images = new List<LocalImageInfo>();
|
|
}
|
|
}
|
|
}
|