Bazarr: guess_language doesn't detect correct language unless the file is UTF8

Created on 17 Mar 2020  路  9Comments  路  Source: morpheus65535/bazarr

Describe the bug
If the subtitle file is without language code, bazarr is trying to detect it using guess_language function. I found that if the file is not UTF8 (in my case it's cp1251), the function return almost every time wrong language code or UNKNOWN.

Software (please complete the following information):
Bazarr Version: 0.8.4.2
Sonarr Version: 2.0.0.5344
Radarr Version: 0.2.0.1480

Additional context
I tested this on windows 10 with python 3.8 and on freenas with python 3.7.

upcoming features

All 9 comments

Can you provide a problematic subtitles file?

I've made a little modification of bazarr, so now all of my subtitles are detected correctly. I'll post a pull request to see what are changes.

I'm attaching some of the unsupported files as far as I remember .
subs.zip

I think I'm also having the same issue. Bazarr is detecting files with unknown subtitles but fails to mention there are any subtitles.

@mrjackyliang please provide a debug log (emptied first) while doing a disk scan for this specific series/movie.

Here is the debug log. The problem occurs for Season 1 (Episodes 7-18). In Plex, it will show Unknown (SRT), which is OK. Subtitles shouldn't be missing.

bazarr.log

Those episode subtitles track probably don't have a valid language code tag so Bazarr is ignoring them.

Is there a way to allow unknown language subtitles? Not sure how I can fix this myself yet.

Nope. Either you accept that and download external subs for desired languages or you edit your mkv to add the languages tags. Here's a tutotial: https://medium.com/@applehq/editing-mkv-language-tags-from-the-command-line-49e92ca60f4e

Gotcha. The article helps!!

Was this page helpful?
0 / 5 - 0 ratings