summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-04-07 19:39:11 -0400
committermorpheus65535 <[email protected]>2021-04-07 19:39:11 -0400
commitd2b7dba3bf36501cf4eccb2af3d1889542bc02a2 (patch)
tree5a4033bd5fea3cc3bd993c1b15de67a706e0a7aa
parent29f73a6c09c561aedd468f69e441e1a575cb756c (diff)
downloadbazarr-d2b7dba3bf36501cf4eccb2af3d1889542bc02a2.tar.gz
bazarr-d2b7dba3bf36501cf4eccb2af3d1889542bc02a2.zip
Fixed package_info parsing to deal with single line text with `\n` separator
-rw-r--r--bazarr/init.py8
1 files 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', '')