mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-01-18 13:33:14 +01:00
little fix
This commit is contained in:
@@ -21,7 +21,7 @@ def write_bouquets(path, bouquets):
|
||||
line.append(srv_line.format(bq.name.replace(" ", "_"), bq.type))
|
||||
write_bouquet(path, bq.name, bq.type, bq.services)
|
||||
|
||||
with open(path + "bouquets.{}".format(bqs.type), "w") as file:
|
||||
with open(path + "bouquets.{}".format(bqs.type), "w", encoding="utf-8") as file:
|
||||
file.writelines(line)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ def write_bouquet(path, name, bq_type, channels):
|
||||
else:
|
||||
bouquet.append("#SERVICE {}\n".format(to_bouquet_id(ch)))
|
||||
|
||||
with open(path + "userbouquet.{}.{}".format(name.replace(" ", "_"), bq_type), "w") as file:
|
||||
with open(path + "userbouquet.{}.{}".format(name.replace(" ", "_"), bq_type), "w", encoding="utf-8") as file:
|
||||
file.writelines(bouquet)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ def to_bouquet_id(ch):
|
||||
|
||||
def get_bouquet(path, name, bq_type):
|
||||
""" Parsing services ids from bouquet file """
|
||||
with open(path + "userbouquet.{}.{}".format(name, bq_type)) as file:
|
||||
with open(path + "userbouquet.{}.{}".format(name, bq_type), encoding="utf-8") as file:
|
||||
chs_list = file.read()
|
||||
services = []
|
||||
srvs = list(filter(None, chs_list.split("\n#SERVICE"))) # filtering ['']
|
||||
|
||||
@@ -589,7 +589,7 @@ class MainAppWindow:
|
||||
services = [Service(*row[:]) for row in services_model]
|
||||
write_services(path, services, profile)
|
||||
# removing bouquet files
|
||||
if profile is profile.ENIGMA_2:
|
||||
if profile is Profile.ENIGMA_2:
|
||||
# blacklist
|
||||
write_blacklist(path, self.__blacklist)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user