mirror of https://github.com/morpheus65535/bazarr
Force UTF8 encoding for saved subtitles
This commit is contained in:
parent
327abd6a0f
commit
a6197a09f2
|
@ -17,7 +17,7 @@ def download_subtitle(path, language, hi, providers):
|
||||||
try:
|
try:
|
||||||
best_subtitle = best_subtitles[video][0]
|
best_subtitle = best_subtitles[video][0]
|
||||||
|
|
||||||
result = save_subtitles(video, [best_subtitle])
|
result = save_subtitles(video, [best_subtitle], encoding='utf-8')
|
||||||
downloaded_provider = str(result[0]).strip('<>').split(' ')[0][:-8]
|
downloaded_provider = str(result[0]).strip('<>').split(' ')[0][:-8]
|
||||||
downloaded_language = pycountry.languages.lookup(str(str(result[0]).strip('<>').split(' ')[2].strip('[]'))).name
|
downloaded_language = pycountry.languages.lookup(str(str(result[0]).strip('<>').split(' ')[2].strip('[]'))).name
|
||||||
message = downloaded_language + " subtitles downloaded from " + downloaded_provider + "."
|
message = downloaded_language + " subtitles downloaded from " + downloaded_provider + "."
|
||||||
|
|
Loading…
Reference in New Issue