Compare commits

...
2 Commits
Author SHA1 Message Date
LinFor c00f8dd712 Update CHANGELOG for version 10.9.8.0
Moved significant code from the respected fork by @VD42.
2026-01-15 20:47:34 +03:00
PingWin 56ee78af00 Merged code from @VD42 fork 2026-01-15 20:46:10 +03:00
3 changed files with 31 additions and 4 deletions

No files matched your search

+4
View File
@@ -1,5 +1,9 @@
# Changelog # Changelog
## [10.9.8.0]
Перенесён значимый код из форка уважаемого @VD42
## [10.9.7.0] ## [10.9.7.0]
Fixed pluginId Fixed pluginId
@@ -101,6 +101,8 @@ namespace Jellyfin.Plugin.Kinopoisk
dst.Name = src.GetLocalName(); dst.Name = src.GetLocalName();
dst.OriginalTitle = src.GetOriginalNameIfNotSame(); dst.OriginalTitle = src.GetOriginalNameIfNotSame();
dst.PremiereDate = src.GetPremiereDate(); dst.PremiereDate = src.GetPremiereDate();
if (1900 < src.Year)
dst.ProductionYear = src.Year;
if (!string.IsNullOrWhiteSpace(src.Slogan)) if (!string.IsNullOrWhiteSpace(src.Slogan))
dst.Tagline = src.Slogan; dst.Tagline = src.Slogan;
dst.Overview = src.Description; dst.Overview = src.Description;
@@ -270,10 +272,13 @@ namespace Jellyfin.Plugin.Kinopoisk
return src switch return src switch
{ {
StaffResponseProfessionKey.ACTOR => PersonKind.Actor, StaffResponseProfessionKey.ACTOR => PersonKind.Actor,
StaffResponseProfessionKey.DIRECTOR => PersonKind.Director, StaffResponseProfessionKey.DIRECTOR
or StaffResponseProfessionKey.VOICE_DIRECTOR
or StaffResponseProfessionKey.OPERATOR => PersonKind.Director,
StaffResponseProfessionKey.WRITER => PersonKind.Writer, StaffResponseProfessionKey.WRITER => PersonKind.Writer,
StaffResponseProfessionKey.COMPOSER => PersonKind.Composer, StaffResponseProfessionKey.COMPOSER => PersonKind.Composer,
StaffResponseProfessionKey.PRODUCER or StaffResponseProfessionKey.PRODUCER_USSR => PersonKind.Producer, StaffResponseProfessionKey.PRODUCER
or StaffResponseProfessionKey.PRODUCER_USSR => PersonKind.Producer,
StaffResponseProfessionKey.EDITOR => PersonKind.Editor, StaffResponseProfessionKey.EDITOR => PersonKind.Editor,
StaffResponseProfessionKey.TRANSLATOR => PersonKind.Translator, StaffResponseProfessionKey.TRANSLATOR => PersonKind.Translator,
_ => PersonKind.Unknown, _ => PersonKind.Unknown,
@@ -44,13 +44,15 @@ namespace Jellyfin.Plugin.Kinopoisk.ProviderIdResolvers
var candidates = searchResult.Films.ToArray(); var candidates = searchResult.Films.ToArray();
_logger.LogDebug($"Received {candidates.Length} results, trying to filter and match..."); _logger.LogDebug($"Received {candidates.Length} results, trying to filter and match...");
var candidates_by_year = FilterByYear(info, candidates);
// Check if there are single candidate filtered by year // Check if there are single candidate filtered by year
possibleResult = await TryResolveBySingleCandidateLeft(info, FilterByYear(info, candidates), ct); possibleResult = await TryResolveBySingleCandidateLeft(info, candidates_by_year, ct);
if (possibleResult.IsSuccess) if (possibleResult.IsSuccess)
return possibleResult; return possibleResult;
// Try to resolve by ImdbId match filtered by year // Try to resolve by ImdbId match filtered by year
possibleResult = await TryResolveByImdbMatch(info, FilterByYear(info, candidates), ct); possibleResult = await TryResolveByImdbMatch(info, candidates_by_year, ct);
if (possibleResult.IsSuccess) if (possibleResult.IsSuccess)
return possibleResult; return possibleResult;
@@ -59,6 +61,22 @@ namespace Jellyfin.Plugin.Kinopoisk.ProviderIdResolvers
if (possibleResult.IsSuccess) if (possibleResult.IsSuccess)
return possibleResult; return possibleResult;
// TODO: Maybe check type?
if (0 < candidates_by_year.Count)
{
var kinopoiskId = candidates_by_year.First().FilmId;
_logger.LogDebug($"All other checks failed, use first result by year, setting KinopoiskProviderId to {kinopoiskId} ({info.Name})");
return (true, kinopoiskId);
}
if (0 < candidates.Length)
{
var kinopoiskId = candidates.First().FilmId;
_logger.LogDebug($"All other checks failed, use first result, setting KinopoiskProviderId to {kinopoiskId} ({info.Name})");
return (true, kinopoiskId);
}
_logger.LogDebug($"Suitable result not found"); _logger.LogDebug($"Suitable result not found");
return (false, 0); return (false, 0);
} }