using MediaBrowser.Controller.Entities;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Providers
{
public interface IProviderManager
{
///
/// Downloads the and save image.
///
/// The item.
/// The source.
/// Name of the target.
/// if set to true [save locally].
/// The resource pool.
/// The cancellation token.
/// Task{System.String}.
/// item
Task DownloadAndSaveImage(BaseItem item, string source, string targetName, bool saveLocally, SemaphoreSlim resourcePool, CancellationToken cancellationToken);
Task SaveImage(BaseItem item, Stream source, string targetName, bool saveLocally, CancellationToken cancellationToken);
///
/// Saves to library filesystem.
///
/// The item.
/// The path.
/// The data to save.
/// The cancellation token.
/// Task.
///
Task SaveToLibraryFilesystem(BaseItem item, string path, Stream dataToSave, CancellationToken cancellationToken);
///
/// Executes the metadata providers.
///
/// The item.
/// The cancellation token.
/// if set to true [force].
/// if set to true [allow slow providers].
/// Task{System.Boolean}.
Task ExecuteMetadataProviders(BaseItem item, CancellationToken cancellationToken, bool force = false, bool allowSlowProviders = true);
///
/// Adds the metadata providers.
///
/// The providers.
void AddMetadataProviders(IEnumerable providers);
///
/// Gets the save path.
///
/// The item.
/// Name of the target file.
/// if set to true [save locally].
/// System.String.
string GetSavePath(BaseItem item, string targetFileName, bool saveLocally);
}
}