Subtitle Search only works with English lenguaje.
miguelarce79 opened this issue · comments
Versión: 10.7.7
Linux
Arquitectura: X64
Plugin version: 11.0.0.0
Opensubtitles Account: VIP, 1000 subtitles per day.
Background task does download subtitles, until it reaches the limit.
sometimes i get this error:
[2021-09-22 21:09:21.246 -05:00] [ERR] Error downloading subtitles from "Open Subtitles"
System.Text.Json.JsonException: Failed to parse JSON:
---> System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options) at OpenSubtitlesHandler.Models.ApiResponse
1..ctor(String response, HttpStatusCode statusCode)
--- End of inner exception stack trace ---
at OpenSubtitlesHandler.Models.ApiResponse1..ctor(String response, HttpStatusCode statusCode) at OpenSubtitlesHandler.OpenSubtitles.SearchSubtitlesAsync(Dictionary
2 options, String apiKey, CancellationToken cancellationToken)
at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
In any Movie, if i perform a manual search for subtitles, i get no results with any languaje except english.
i do have "exact match" activated and results shown that exact matches exist for my file, but only for english searches.
can you enable debug logging (https://jellyfin.org/docs/general/administration/troubleshooting.html#debug-logging) and then try searching again and posting logs?
I tried searching for subtitles for a random movie and it found them in almost any language so there's a small chance opensubtitles errors for specific movies/episodes
yeah it looks like jellyfin is not using correct language codes, as for debugging, did you restart jellyfin after changing logging settings? It should log something like this for every search request
[DBG] [116] Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader: Search query: {"languages": "es-mx", "moviehash": "f54715b2ba766a27", "type": "movie", "imdb_id": "8579674"}
, that should help detect which request causes a BadRequest
EDIT: it looks like OpenSubtitles changed something in their API which is causing BadRequest during automated subtitle task (in case perfect match is enabled)