Update scripts/channel_processor.py
All checks were successful
Generate M3U Playlist / build (push) Successful in 1m32s
All checks were successful
Generate M3U Playlist / build (push) Successful in 1m32s
This commit is contained in:
parent
335bbbcbeb
commit
0dd4333a3a
1 changed files with 15 additions and 0 deletions
|
@ -368,6 +368,21 @@ class ChannelProcessor:
|
|||
os.remove(self.config.import_file)
|
||||
self.logger.info("Cleaned up import file")
|
||||
|
||||
# CRITICAL: Save the imported channels to channels.txt
|
||||
if imported_channels:
|
||||
self.logger.info(f"Saving {len(imported_channels)} imported channels to file...")
|
||||
|
||||
# We need to import FileManager here to avoid circular imports
|
||||
from file_manager import FileManager
|
||||
file_manager = FileManager(self.config)
|
||||
|
||||
# Append the new channels to the file
|
||||
success = file_manager.append_channels(imported_channels)
|
||||
if success:
|
||||
self.logger.info(f"✅ Successfully saved {len(imported_channels)} channels to {self.config.channels_file}")
|
||||
else:
|
||||
self.logger.error(f"❌ Failed to save imported channels to file")
|
||||
|
||||
self.logger.info(f"Successfully imported {len(imported_channels)} channels")
|
||||
return imported_channels
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue