mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
update subtitle interface
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Providers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -20,7 +18,7 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
/// Gets the supported media types.
|
||||
/// </summary>
|
||||
/// <value>The supported media types.</value>
|
||||
IEnumerable<SubtitleMediaType> SupportedMediaTypes { get; }
|
||||
IEnumerable<VideoContentType> SupportedMediaTypes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Searches the subtitles.
|
||||
@@ -28,7 +26,7 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
/// <param name="request">The request.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{RemoteSubtitleInfo}}.</returns>
|
||||
Task<IEnumerable<RemoteSubtitleInfo>> SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken);
|
||||
Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the subtitles.
|
||||
@@ -38,38 +36,4 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
/// <returns>Task{SubtitleResponse}.</returns>
|
||||
Task<SubtitleResponse> GetSubtitles(string id, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public enum SubtitleMediaType
|
||||
{
|
||||
Episode = 0,
|
||||
Movie = 1
|
||||
}
|
||||
|
||||
public class SubtitleResponse
|
||||
{
|
||||
public string Language { get; set; }
|
||||
public string Format { get; set; }
|
||||
public Stream Stream { get; set; }
|
||||
}
|
||||
|
||||
public class SubtitleSearchRequest : IHasProviderIds
|
||||
{
|
||||
public string Language { get; set; }
|
||||
|
||||
public SubtitleMediaType 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 Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public SubtitleSearchRequest()
|
||||
{
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
MediaBrowser.Controller/Subtitles/SubtitleResponse.cs
Normal file
11
MediaBrowser.Controller/Subtitles/SubtitleResponse.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.Subtitles
|
||||
{
|
||||
public class SubtitleResponse
|
||||
{
|
||||
public string Language { get; set; }
|
||||
public string Format { get; set; }
|
||||
public Stream Stream { get; set; }
|
||||
}
|
||||
}
|
||||
29
MediaBrowser.Controller/Subtitles/SubtitleSearchRequest.cs
Normal file
29
MediaBrowser.Controller/Subtitles/SubtitleSearchRequest.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Subtitles
|
||||
{
|
||||
public class SubtitleSearchRequest : 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 SubtitleSearchRequest()
|
||||
{
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user