E2DuplicateChannelsManager by iet5
The plugin detects duplicate channels and removes them safely while protecting every service reference linked to a Picon file. It supports the lamedb and lamedb5 channel databases, as well as userbouquet files.
Languages and Encoding
The plugin interface follows the Enigma2 language selected on the receiver.
It safely supports Arabic channel names and all international text using Unicode and UTF-8 on both Python 2 and Python 3.
The plugin includes many languages, such as Arabic, English, French, German, Spanish, Italian, Turkish, Persian, Russian, and others.
New languages can also be added through standard .po and .mo translation files without modifying the plugin code.
The plugin has been tested on the Merlin Dreambox image and the open-source OpenATV image.
How Duplicate Channels Are Detected
The plugin groups channels with matching names and determines which service references should be kept according to the following rules:
- Each service reference is checked to determine whether it has an associated Picon file.
- Any service reference linked to a Picon is considered protected and will not be removed automatically.
- Only duplicate service references that are not linked to a Picon are removed.
- Removed references inside bouquet files are replaced with the service reference that has been kept.
- If none of the references has a Picon, the first reference found in the channel database is kept.
- If all references are linked to Picons, the entire group remains protected and no reference is removed.
Channel-name comparison ignores differences in letter case, spaces, and simple separators without incorrectly merging channels that have genuinely different names.
What Does the Plugin Do?
After confirming the cleanup operation, the plugin performs the following actions:
- Replaces duplicate channel references inside userbouquet files.
- Removes the selected references from lamedb and lamedb5.
- Removes completely identical entries inside the same bouquet.
- Verifies that the selected references were successfully removed after saving.
- Automatically restores the backup if an error occurs.
- Synchronizes the channel database with the Enigma2 memory database when supported by the installed image.
The plugin does not delete, move, rename, copy, or modify Picon files in any way.
Manual Scan and Review
From the main screen, select:
Scan and review duplicates
You can then select a specific satellite or scan all satellites.
The review screen displays:
- Channel name.
- Total number of service references.
- Number of references that will be removed.
- Number of references protected by Picons.
- The reason for keeping the selected reference: Picon or First.
Control Buttons
- OK: Select or deselect the current group.
- Blue: Select or deselect all displayed groups.
- Yellow: Change the satellite and perform a new scan.
- Green: Open the final preview screen.
The preview screen displays:
- KEEP: The service reference that will remain.
- REMOVE: The service reference that will be deleted.
From the preview screen, press the green button to create a backup and start the cleanup operation, or press the red button to cancel.
A reference marked as KEEP, or a reference linked to a Picon, cannot be deleted.
Automatic Cleanup
The plugin runs quietly after Enigma2 starts and monitors changes to:
- lamedb
- lamedb5
- userbouquet files
When a change is detected, the plugin waits until the files become stable and then scans for duplicate channels.
If removable duplicate references are found, the plugin creates a backup before performing the cleanup.
The plugin does not perform a complete scan on every startup unless the channel files have changed.
Automatic cleanup can also be started immediately by selecting:
Run automatic cleanup now
Backup and Restore
The plugin creates a complete backup before every modification or update operation.
The backup includes:
- Channel databases.
- Bouquet files.
- Related list files.
- Operation information.
Backups are saved to the first available location from the following paths:
/media/hdd
/media/usb
/data /tmp
The plugin keeps the latest 12 backups inside each backup folder.
From the main menu, you can:
- Create a manual backup.
- Restore a previous backup.
- Select a different backup folder.
Before restoring a backup, the plugin first creates a safety backup of the current configuration.
If the cleanup operation fails, an automatic Rollback is performed using the backup created before the operation.
Synchronization and Operation Log
The blue button on the main screen can be used to select:
Sync files
This synchronizes the channel files with the Enigma2 channel database stored in memory. It is especially useful after making changes or restoring a backup.
The operation log can also be opened by selecting:
View operation log
The log file is saved at:
/tmp/E2DuplicateChannelsManager.log
Each log entry contains the date and time of the operation.
The plugin keeps only the latest 24 hours of log entries and automatically removes older lines.
Automatic Update Check at Startup
The plugin checks for a newer version when Enigma2 starts without blocking or slowing down the user interface.
When a new version is available, it can be downloaded and installed directly after receiving confirmation from the user.
Before updating:
- A backup of the plugin files is created.
- The package structure and version number are verified.
- If the update fails, the currently installed version remains unchanged.
- After a successful update, the Enigma2 graphical interface must be restarted.
The automatic update check can be enabled or disabled from:
Menu / Options
Compatibility and Interface
The plugin uses its own internal Skin and does not depend on external screens, images, renderers, or converters from the system Skin.
It also:
- Supports Python 2.7 and Python 3.x, including syntax compatibility with Python 3.14.5.
- Automatically detects DreamOS, Dreambox, and open-source images such as OpenATV, OpenPLi, OpenViX, OpenHDF, and OE-Alliance.
- Supports both dpkg and opkg package managers
Important Notice
Two channels may have the same name while providing different services, using different frequencies, or broadcasting in different quality levels.
For this reason, it is always recommended to review the final preview screen before confirming deletion, especially when some service references are linked to Picon files.
wget -qO- "https://raw.githubusercontent.com/Saiedf/E2DuplicateChannelsManager/main/installer_duplicatechannelsmanager_auto. sh" | /bin/sh







Reply With Quote