aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Chapters
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-09 15:16:14 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-09 15:16:14 -0400
commit945e84327087c9e81371c7b4f940a19a0c083586 (patch)
tree0c4f4c2d4c048c3baf4acfe45a7caf8ff9fe931b /MediaBrowser.Controller/Chapters
parentba336372512e6366517a67e8b12677333266d032 (diff)
add new chapter provider feature
Diffstat (limited to 'MediaBrowser.Controller/Chapters')
-rw-r--r--MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs2
-rw-r--r--MediaBrowser.Controller/Chapters/IChapterManager.cs57
2 files changed, 59 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs b/MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs
index 9a53d68ea..982dc35bb 100644
--- a/MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs
+++ b/MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs
@@ -21,6 +21,8 @@ namespace MediaBrowser.Controller.Chapters
public long? RuntimeTicks { get; set; }
public Dictionary<string, string> ProviderIds { get; set; }
+ public bool SearchAllProviders { get; set; }
+
public ChapterSearchRequest()
{
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
diff --git a/MediaBrowser.Controller/Chapters/IChapterManager.cs b/MediaBrowser.Controller/Chapters/IChapterManager.cs
new file mode 100644
index 000000000..df230bf7e
--- /dev/null
+++ b/MediaBrowser.Controller/Chapters/IChapterManager.cs
@@ -0,0 +1,57 @@
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Chapters;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Controller.Chapters
+{
+ /// <summary>
+ /// Interface IChapterManager
+ /// </summary>
+ public interface IChapterManager
+ {
+ /// <summary>
+ /// Adds the parts.
+ /// </summary>
+ /// <param name="chapterProviders">The chapter providers.</param>
+ void AddParts(IEnumerable<IChapterProvider> chapterProviders);
+
+ /// <summary>
+ /// Searches the specified video.
+ /// </summary>
+ /// <param name="video">The video.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
+ Task<IEnumerable<RemoteChapterResult>> Search(Video video, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Searches the specified request.
+ /// </summary>
+ /// <param name="request">The request.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
+ Task<IEnumerable<RemoteChapterResult>> Search(ChapterSearchRequest request, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the chapters.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{ChapterResponse}.</returns>
+ Task<ChapterResponse> GetChapters(string id, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the providers.
+ /// </summary>
+ /// <param name="itemId">The item identifier.</param>
+ /// <returns>IEnumerable{ChapterProviderInfo}.</returns>
+ IEnumerable<ChapterProviderInfo> GetProviders(string itemId);
+
+ /// <summary>
+ /// Gets the providers.
+ /// </summary>
+ /// <returns>IEnumerable{ChapterProviderInfo}.</returns>
+ IEnumerable<ChapterProviderInfo> GetProviders();
+ }
+}