From d2b7dba3bf36501cf4eccb2af3d1889542bc02a2 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Wed, 7 Apr 2021 19:39:11 -0400 Subject: [PATCH] Fixed package_info parsing to deal with single line text with `\n` separator --- bazarr/init.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bazarr/init.py b/bazarr/init.py index cfe85c4a6..1e9d4303b 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -99,11 +99,13 @@ if isinstance(settings.general.enabled_providers, str) and not settings.general. package_info_file = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'package_info') if os.path.isfile(package_info_file): try: + splitted_lines = [] package_info = {} with open(package_info_file) as file: - for line in file.readlines(): - if line == '\n': - break + lines = file.readlines() + for line in lines: + splitted_lines += line.split(r'\n') + for line in splitted_lines: splitted_line = line.split('=') if len(splitted_line) == 2: package_info[splitted_line[0].lower()] = splitted_line[1].replace('\n', '')