diff --git a/scripts/channel_processor.py b/scripts/channel_processor.py index 26b7e3a..c9f632e 100644 --- a/scripts/channel_processor.py +++ b/scripts/channel_processor.py @@ -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