Skip to content

Commit

Permalink
In ImportChannels ensure that files are not deleted twice
Browse files Browse the repository at this point in the history
As this had no added value. Also a cosmetic correction regarding a
commented outed debug line.
  • Loading branch information
Littlesat committed Sep 9, 2024
1 parent fa44ed7 commit 69a69f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/python/Components/ImportChannels.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def ImportGetFilelist(self, remote=False, *files):
# check the contents for more bouquet files
if content:
for line in content:
# print ("[Import Channels] %s" % line)
# print ("[Import Channels] %s" % line)
# check if it contains another bouquet reference, first tv type then radio type
r = re.match('#SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "(.*)" ORDER BY bouquet', line) or re.match('#SERVICE 1:7:2:0:0:0:0:0:0:0:FROM BOUQUET "(.*)" ORDER BY bouquet', line)
if r:
Expand Down Expand Up @@ -147,7 +147,7 @@ def threaded_function(self):
return

print("[Import Channels] Enumarate and Removing old local files...")
for file in self.ImportGetFilelist(False, 'bouquets.tv', 'bouquets.radio'):
for file in set(self.ImportGetFilelist(False, 'bouquets.tv', 'bouquets.radio')):
# print("- Removing %s..." % file)
try:
os.remove(os.path.join(e2path, file))
Expand Down

0 comments on commit 69a69f4

Please sign in to comment.