Closed miguelarce79 closed 2 years ago
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
Hi,
i enable the debug logging, when i run the subtitle manual subtitle search, there is no messages in the log. when i run the download missing subtitles task, i get this repeated message all the time the task is running.
[2021-09-24 10:07:34.940 -05:00] [ERR] Invalid response: BadRequest - ""
[2021-09-24 10:07:35.040 -05:00] [ERR] Invalid response: BadRequest - ""
[2021-09-24 10:07:35.530 -05:00] [ERR] Invalid response: BadRequest - ""
[2021-09-24 10:07:35.630 -05:00] [ERR] Invalid response: BadRequest - ""
[2021-09-24 10:07:36.145 -05:00] [ERR] Invalid response: BadRequest - ""
in my opensubtitles account download history i can see that only english subtitles are downloaded.
no other languages, french, german, spanish, etc. gets downloaded.
i uninstalled the plugin, re-install it and now i get results for other languages like french, german, russian
but not for spanish or other "exotic" languages.
i took a dive into the logs and find this lines
this one finds results
[2021-09-24 10:33:02.057 -05:00] [INF] Start processing HTTP request "GET" https://api.opensubtitles.com/api/v1/subtitles?imdb_id=112573&languages=en&moviehash=aa658b7fe6ec8959&type=movie&page=0
[2021-09-24 10:33:02.057 -05:00] [INF] Sending HTTP request "GET" https://api.opensubtitles.com/api/v1/subtitles?imdb_id=112573&languages=en&moviehash=aa658b7fe6ec8959&type=movie&page=0
this one fails
[2021-09-24 10:33:29.882 -05:00] [INF] Start processing HTTP request "GET" https://api.opensubtitles.com/api/v1/subtitles?imdb_id=112573&languages=es-mx&moviehash=aa658b7fe6ec8959&type=movie&page=0
[2021-09-24 10:33:29.882 -05:00] [INF] Sending HTTP request "GET" https://api.opensubtitles.com/api/v1/subtitles?imdb_id=112573 &languages=es-mx&moviehash=aa658b7fe6ec8959&type=movie&page=0
I went on to query the API about languages and got this list.
GET /api/v1/infos/languages
{ "data": [ { "language_code": "se", "language_name": "Northern Sami" }, { "language_code": "pm", "language_name": "Portuguese (MZ)" }, { "language_code": "ze", "language_name": "Chinese bilingual" }, { "language_code": "zh-TW", "language_name": "Chinese (traditional)" }, { "language_code": "me", "language_name": "Montenegrin" }, { "language_code": "pt-BR", "language_name": "Portuguese (Brazilian)" }, { "language_code": "ro", "language_name": "Romanian" }, { "language_code": "vi", "language_name": "Vietnamese" }, { "language_code": "uz", "language_name": "Uzbek" }, { "language_code": "ur", "language_name": "Urdu" }, { "language_code": "uk", "language_name": "Ukrainian" }, { "language_code": "tr", "language_name": "Turkish" }, { "language_code": "th", "language_name": "Thai" }, { "language_code": "tl", "language_name": "Tagalog" }, { "language_code": "te", "language_name": "Telugu" }, { "language_code": "ta", "language_name": "Tamil" }, { "language_code": "sy", "language_name": "Syriac" }, { "language_code": "sv", "language_name": "Swedish" }, { "language_code": "sw", "language_name": "Swahili" }, {* "language_code": "es", * "language_name": "Spanish" }, { "language_code": "sl", "language_name": "Slovenian" }, { "language_code": "sk", "language_name": "Slovak" }, { "language_code": "si", "language_name": "Sinhalese" }, { "language_code": "sr", "language_name": "Serbian" }, { "language_code": "ru", "language_name": "Russian" }, { "language_code": "pt-PT", "language_name": "Portuguese" }, { "language_code": "pl", "language_name": "Polish" }, { "language_code": "fa", "language_name": "Persian" }, { "language_code": "oc", "language_name": "Occitan" }, { "language_code": "no", "language_name": "Norwegian" }, { "language_code": "mn", "language_name": "Mongolian" }, { "language_code": "ma", "language_name": "Manipuri" }, { "language_code": "ms", "language_name": "Malay" }, { "language_code": "ml", "language_name": "Malayalam" }, { "language_code": "mk", "language_name": "Macedonian" }, { "language_code": "lb", "language_name": "Luxembourgish" }, { "language_code": "lt", "language_name": "Lithuanian" }, { "language_code": "lv", "language_name": "Latvian" }, { "language_code": "ko", "language_name": "Korean" }, { "language_code": "km", "language_name": "Khmer" }, { "language_code": "kk", "language_name": "Kazakh" }, { "language_code": "ja", "language_name": "Japanese" }, { "language_code": "it", "language_name": "Italian" }, { "language_code": "id", "language_name": "Indonesian" }, { "language_code": "is", "language_name": "Icelandic" }, { "language_code": "hu", "language_name": "Hungarian" }, { "language_code": "hr", "language_name": "Croatian" }, { "language_code": "hi", "language_name": "Hindi" }, { "language_code": "he", "language_name": "Hebrew" }, { "language_code": "el", "language_name": "Greek" }, { "language_code": "gl", "language_name": "Galician" }, { "language_code": "de", "language_name": "German" }, { "language_code": "ka", "language_name": "Georgian" }, { "language_code": "fr", "language_name": "French" }, { "language_code": "fi", "language_name": "Finnish" }, { "language_code": "et", "language_name": "Estonian" }, { "language_code": "eo", "language_name": "Esperanto" }, { "language_code": "en", "language_name": "English" }, { "language_code": "nl", "language_name": "Dutch" }, { "language_code": "da", "language_name": "Danish" }, { "language_code": "cs", "language_name": "Czech" }, { "language_code": "zh-CN", "language_name": "Chinese (simplified)" }, { "language_code": "ca", "language_name": "Catalan" }, { "language_code": "my", "language_name": "Burmese" }, { "language_code": "bg", "language_name": "Bulgarian" }, { "language_code": "br", "language_name": "Breton" }, { "language_code": "bs", "language_name": "Bosnian" }, { "language_code": "bn", "language_name": "Bengali" }, { "language_code": "be", "language_name": "Belarusian" }, { "language_code": "eu", "language_name": "Basque" }, { "language_code": "at", "language_name": "Asturian" }, { "language_code": "hy", "language_name": "Armenian" }, { "language_code": "an", "language_name": "Aragonese" }, { "language_code": "ar", "language_name": "Arabic" }, { "language_code": "sq", "language_name": "Albanian" }, { "language_code": "af", "language_name": "Afrikaans" } ]
}
So i think the hole issue with some languages is that Jellyfin is sending a wrong lenguaje code, "es-MX" its spanish (México) but
opensubtitles is expecting only "es" for spanish.
hope this helps solve this issue.
best regards.
El vie, 24 sept 2021 a las 8:42, MBR-0001 @.***>) escribió:
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
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jellyfin/jellyfin-plugin-opensubtitles/issues/65#issuecomment-926634447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONNL6KJLFHDCUHJ5IXPNJDUDR53BANCNFSM5ESZ4IMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Miguel Arce IT Madison International School, Mérida.
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)
Yes, I did.
El El sáb, 25 de septiembre de 2021 a la(s) 8:26, MBR-0001 < @.***> escribió:
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
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jellyfin/jellyfin-plugin-opensubtitles/issues/65#issuecomment-927120963, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONNL6MDJDI6XQIVYAGHTLTUDXEZHANCNFSM5ESZ4IMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Miguel Arce IT Madison International School, Mérida.
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, ReadOnlySpan
1 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.