2012-08-19 13:38:31 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
2012-08-19 08:58:35 -07:00
|
|
|
|
using MediaBrowser.Controller.Events;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
|
|
|
{
|
2012-08-19 13:38:31 -07:00
|
|
|
|
public abstract class BaseMetadataProvider : IDisposable
|
2012-08-19 08:58:35 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the provider needs any startup routines, add them here
|
|
|
|
|
/// </summary>
|
|
|
|
|
public virtual void Init()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-19 13:38:31 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Disposes anything created during Init
|
|
|
|
|
/// </summary>
|
|
|
|
|
public virtual void Dispose()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract bool Supports(BaseEntity item);
|
|
|
|
|
|
|
|
|
|
public virtual bool RequiresInternet
|
2012-08-19 08:58:35 -07:00
|
|
|
|
{
|
2012-08-19 13:38:31 -07:00
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2012-08-19 08:58:35 -07:00
|
|
|
|
}
|
|
|
|
|
|
2012-08-19 13:38:31 -07:00
|
|
|
|
public abstract Task Fetch(BaseEntity item, ItemResolveEventArgs args);
|
2012-08-19 08:58:35 -07:00
|
|
|
|
}
|
|
|
|
|
}
|