jellyfin/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs

48 lines
1.4 KiB
C#
Raw Normal View History

2014-02-08 21:52:52 -07:00
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Entities;
2014-02-08 21:52:52 -07:00
using System.Collections.Generic;
using System.Threading;
2014-01-31 12:55:21 -07:00
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>
2014-01-31 12:55:21 -07:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{MetadataResult{`0}}.</returns>
2014-02-08 21:52:52 -07:00
Task<LocalMetadataResult<TItemType>> GetMetadata(ItemInfo info, CancellationToken cancellationToken);
}
public class ItemInfo
{
public string Path { get; set; }
public bool IsInMixedFolder { get; set; }
2014-01-31 12:55:21 -07:00
}
2014-02-08 21:52:52 -07:00
public class LocalMetadataResult<T>
where T : IHasMetadata
{
public bool HasMetadata { get; set; }
public T Item { get; set; }
public List<LocalImageInfo> Images { get; set; }
public List<ChapterInfo> Chapters { get; set; }
2014-02-08 21:52:52 -07:00
public LocalMetadataResult()
{
Images = new List<LocalImageInfo>();
Chapters = new List<ChapterInfo>();
2014-02-08 21:52:52 -07:00
}
}
2014-01-31 12:55:21 -07:00
}