mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-18 08:06:35 +00:00
beginning remote subtitle downloading
This commit is contained in:
@@ -760,7 +760,7 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string GetSubtitleUrl(SubtitleOptions options);
|
||||
string GetSubtitleUrl(SubtitleDownloadOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an image url that can be used to download an image from the api
|
||||
|
||||
@@ -221,6 +221,8 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public NotificationOptions NotificationOptions { get; set; }
|
||||
|
||||
public SubtitleOptions SubtitleOptions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
||||
/// </summary>
|
||||
@@ -284,6 +286,8 @@ namespace MediaBrowser.Model.Configuration
|
||||
UICulture = "en-us";
|
||||
|
||||
NotificationOptions = new NotificationOptions();
|
||||
|
||||
SubtitleOptions = new SubtitleOptions();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,4 +315,17 @@ namespace MediaBrowser.Model.Configuration
|
||||
public string From { get; set; }
|
||||
public string To { get; set; }
|
||||
}
|
||||
|
||||
public class SubtitleOptions
|
||||
{
|
||||
public bool RequireExternalSubtitles { get; set; }
|
||||
public string[] SubtitleDownloadLanguages { get; set; }
|
||||
public bool DownloadMovieSubtitles { get; set; }
|
||||
public bool DownloadEpisodeSubtitles { get; set; }
|
||||
|
||||
public SubtitleOptions()
|
||||
{
|
||||
SubtitleDownloadLanguages = new string[] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
public string DeviceId { get; set; }
|
||||
}
|
||||
|
||||
public class SubtitleOptions
|
||||
public class SubtitleDownloadOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the item identifier.
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
<Compile Include="Notifications\NotificationsSummary.cs" />
|
||||
<Compile Include="Providers\RemoteImageResult.cs" />
|
||||
<Compile Include="Providers\RemoteSearchResult.cs" />
|
||||
<Compile Include="Providers\RemoteSubtitleInfo.cs" />
|
||||
<Compile Include="Querying\ArtistsQuery.cs" />
|
||||
<Compile Include="Querying\EpisodeQuery.cs" />
|
||||
<Compile Include="Querying\ItemCountsQuery.cs" />
|
||||
|
||||
19
MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs
Normal file
19
MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Providers
|
||||
{
|
||||
public class RemoteSubtitleInfo
|
||||
{
|
||||
public string Language { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string ProviderName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Format { get; set; }
|
||||
public string Author { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public DateTime? DateCreated { get; set; }
|
||||
public float? CommunityRating { get; set; }
|
||||
public int? DownloadCount { get; set; }
|
||||
public bool? IsHashMatch { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ namespace MediaBrowser.Model.Querying
|
||||
/// </summary>
|
||||
IsFavorite = 5,
|
||||
/// <summary>
|
||||
/// The is recently added
|
||||
/// </summary>
|
||||
IsRecentlyAdded = 6,
|
||||
/// <summary>
|
||||
/// The item is resumable
|
||||
/// </summary>
|
||||
IsResumable = 7,
|
||||
|
||||
Reference in New Issue
Block a user