Fixed some actor professions parsing
This commit is contained in:
1 parent
5ca4bf0eaa
commit
5b54b95443
14 files changed
+1360
-5
No files matched your search
@@ -39,6 +39,7 @@ namespace Jellyfin.Plugin.Kinopoisk.ApiModel
|
||||
public string FilmLength { get; set; }
|
||||
public string Slogan { get; set; }
|
||||
public string Description { get; set; }
|
||||
public FilmType Type { get; set; }
|
||||
public string RatingMpaa { get; set; }
|
||||
public int? RatingAgeLimits { get; set; }
|
||||
public DateTime? PremiereRu { get; set; }
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Jellyfin.Plugin.Kinopoisk.ApiModel
|
||||
{
|
||||
public enum FilmType
|
||||
{
|
||||
[EnumMember(Value = "UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[EnumMember(Value = "FILM")]
|
||||
Film,
|
||||
|
||||
[EnumMember(Value = "TV_SHOW")]
|
||||
TvShow
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace Jellyfin.Plugin.Kinopoisk.ApiModel
|
||||
public int FilmId { get; set; }
|
||||
public string NameRu { get; set; }
|
||||
public string NameEn { get; set; }
|
||||
public FilmType Type { get; set; }
|
||||
public string Year { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string FilmLength { get; set; }
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.7.0" />
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.7.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
|
||||
<PackageReference Include="Macross.Json.Extensions" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
@@ -18,13 +19,14 @@ namespace Jellyfin.Plugin.Kinopoisk
|
||||
private readonly ILogger _logger;
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly string _apiToken;
|
||||
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.GetOptions();
|
||||
private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web);
|
||||
|
||||
public KinopoiskApiProxy(ILogger logger, IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
this._logger = logger;
|
||||
this._httpClientFactory = httpClientFactory;
|
||||
this._apiToken = Plugin.Instance.Configuration.ApiToken;
|
||||
this._jsonOptions.Converters.Add(new JsonStringEnumMemberConverter());
|
||||
}
|
||||
|
||||
public async Task<SearchResult> SearchByKeyword(string keyword, int page = 1, CancellationToken? cancellationToken = null)
|
||||
|
||||
Reference in new issue
Block a user