jellyfin-server/MediaBrowser.Controller/FileOrganization/IFileOrganizationService.cs
softworkz 3a868e28b3 Auto-Organize: Added feature to remember/persist series matching in manual organization dialog #2
When a filename cannot be auto-matched to an existing series name, the
organization must be performed manually.
Unfortunately not just once, but again and again for each episode coming
in.
This change proposes a simple but solid method to optionally persist the
matching condition from within the manual organization dialog.
This approach will make Emby "learn" how to organize files in the future
without user interaction.
2016-02-05 05:21:25 +01:00

86 lines
2.9 KiB
C#

using MediaBrowser.Model.FileOrganization;
using MediaBrowser.Model.Querying;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.FileOrganization
{
public interface IFileOrganizationService
{
/// <summary>
/// Processes the new files.
/// </summary>
void BeginProcessNewFiles();
/// <summary>
/// Deletes the original file.
/// </summary>
/// <param name="resultId">The result identifier.</param>
/// <returns>Task.</returns>
Task DeleteOriginalFile(string resultId);
/// <summary>
/// Clears the log.
/// </summary>
/// <returns>Task.</returns>
Task ClearLog();
/// <summary>
/// Performs the organization.
/// </summary>
/// <param name="resultId">The result identifier.</param>
/// <returns>Task.</returns>
Task PerformOrganization(string resultId);
/// <summary>
/// Performs the episode organization.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Task.</returns>
Task PerformEpisodeOrganization(EpisodeFileOrganizationRequest request);
/// <summary>
/// Gets the results.
/// </summary>
/// <param name="query">The query.</param>
/// <returns>IEnumerable{FileOrganizationResult}.</returns>
QueryResult<FileOrganizationResult> GetResults(FileOrganizationResultQuery query);
/// <summary>
/// Gets the result.
/// </summary>
/// <param name="id">The identifier.</param>
/// <returns>FileOrganizationResult.</returns>
FileOrganizationResult GetResult(string id);
/// <summary>
/// Gets the result by source path.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>FileOrganizationResult.</returns>
FileOrganizationResult GetResultBySourcePath(string path);
/// <summary>
/// Saves the result.
/// </summary>
/// <param name="result">The result.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task SaveResult(FileOrganizationResult result, CancellationToken cancellationToken);
/// <summary>
/// Returns a list of smart match entries
/// </summary>
/// <param name="query">The query.</param>
/// <returns>IEnumerable{SmartMatchInfo}.</returns>
QueryResult<SmartMatchInfo> GetSmartMatchInfos(FileOrganizationResultQuery query);
/// <summary>
/// Deletes a smart match entry.
/// </summary>
/// <param name="Id">Item Id.</param>
/// <param name="matchString">The match string to delete.</param>
void DeleteSmartMatchEntry(string Id, string matchString);
}
}