lamedb fix

This commit is contained in:
Dmitriy Yefremov
2017-11-10 15:37:02 +03:00
parent 68e10afba6
commit fc84e25298
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ def write_bouquet(path, name, bq_type, channels):
data_type = 19
bouquet.append("#SERVICE {}:0:{}:{}:0:0:0:\n".format(1, data_type, ch.fav_id))
with open(path + "_userbouquet.{}.{}".format(name, bq_type), "w") as file:
with open(path + "userbouquet.{}.{}".format(name, bq_type), "w") as file:
file.writelines(bouquet)

View File

@@ -35,12 +35,12 @@ def write_channels(path, channels):
tr_set.add(tr_id)
# Services
flags = "," + ch.flags_cas if ch.flags_cas else ""
services_lines.append("{}\n{}\np:{}{}".format(ch.data_id, ch.service, ch.package, flags))
services_lines.append("{}\n{}\np:{}{}\n".format(ch.data_id, ch.service, ch.package, flags))
tr_lines.sort()
lines.extend(tr_lines)
lines.extend(services_lines)
lines.append("\nend\nFile was created in DemonEditor.\n....Enjoy watching!....\n")
lines.append("end\nFile was created in DemonEditor.\n....Enjoy watching!....\n")
with open(path + "lamedb", "w") as file:
file.writelines(lines)