beginning remote subtitle downloading

This commit is contained in:
Luke Pulverenti
2014-05-06 22:28:19 -04:00
parent e1dd361c7b
commit 0d025f7fb6
49 changed files with 1035 additions and 299 deletions

View File

@@ -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

View File

@@ -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[] { };
}
}
}

View File

@@ -159,7 +159,7 @@
public string DeviceId { get; set; }
}
public class SubtitleOptions
public class SubtitleDownloadOptions
{
/// <summary>
/// Gets or sets the item identifier.

View File

@@ -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" />

View 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; }
}
}

View File

@@ -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,