mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
update subtitle interface
This commit is contained in:
19
MediaBrowser.Controller/Chapters/ChapterResponse.cs
Normal file
19
MediaBrowser.Controller/Chapters/ChapterResponse.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using MediaBrowser.Model.Chapters;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Chapters
|
||||
{
|
||||
public class ChapterResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the chapters.
|
||||
/// </summary>
|
||||
/// <value>The chapters.</value>
|
||||
public List<RemoteChapterInfo> Chapters { get; set; }
|
||||
|
||||
public ChapterResponse()
|
||||
{
|
||||
Chapters = new List<RemoteChapterInfo>();
|
||||
}
|
||||
}
|
||||
}
|
||||
29
MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs
Normal file
29
MediaBrowser.Controller/Chapters/ChapterSearchRequest.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Chapters
|
||||
{
|
||||
public class ChapterSearchRequest : IHasProviderIds
|
||||
{
|
||||
public string Language { get; set; }
|
||||
|
||||
public VideoContentType ContentType { get; set; }
|
||||
|
||||
public string MediaPath { get; set; }
|
||||
public string SeriesName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? IndexNumber { get; set; }
|
||||
public int? IndexNumberEnd { get; set; }
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
public int? ProductionYear { get; set; }
|
||||
public long? RuntimeTicks { get; set; }
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public ChapterSearchRequest()
|
||||
{
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
39
MediaBrowser.Controller/Chapters/IChapterProvider.cs
Normal file
39
MediaBrowser.Controller/Chapters/IChapterProvider.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Chapters;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Chapters
|
||||
{
|
||||
public interface IChapterProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the supported media types.
|
||||
/// </summary>
|
||||
/// <value>The supported media types.</value>
|
||||
IEnumerable<VideoContentType> SupportedMediaTypes { get; }
|
||||
|
||||
/// <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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user