---
title: External EPG Support & AI Auto-Match
description: Learn how to manage external EPG sources, force updates, and use AI to automatically match channels.
---

# External EPG Support

Xtream AI Streaming Panel allows you to integrate external EPG (Electronic Program Guide) sources, expanding your channel guide beyond the default system EPG.

It is fully compatible with standard EPG file formats:
*   **XMLTV (`.xml`)**
*   **Compressed XMLTV (`.xml.gz`)**

## Managing EPG Sources

You can manage your EPG sources by navigating to the **EPG** section in the admin panel. Here you can add new sources, monitor their status, and force updates.

### Adding a New Source

1.  Click on the **Add EPG Source** button.
2.  **EPG Name:** Enter a friendly name to identify this source (e.g., "Sports EPG").
3.  **Source URL:** Enter the direct URL to the `.xml` or `.xml.gz` file.
4.  **Days to Keep:** Select how many days of past guide data you want to retain (1-30 days).
5.  Click **Save EPG Source**.

The system will verify the URL and queue it for downloading and parsing.

### Source Statuses

The dashboard provides real-time feedback on the state of your EPG sources:

*   **Scanning:** The system is currently downloading and parsing the EPG file.
*   **Ready:** The EPG data has been successfully processed and is ready to use.
*   **Offline:** The source URL is unreachable or returned an error.
*   **Pending Update:** An update has been requested and will run on the next cron cycle.

### Actions

For each source, you can perform the following actions:

*   **Force Update:** Manually triggers a re-download of the EPG file. Useful if you know the source has been updated recently.
*   **Edit:** Modify the name, URL, or retention period.
*   **Delete:** Removes the source and all associated program data from the database.

---

## Configuring Channels

Once you have added your external sources, you can assign them to your streams.

### EPG Source Filtering

Within the channel edit page (under the "EPG" tab), you can now search and filter EPG sources with greater precision:

*   **All Sources:** Displays matches from the free Xtream AI EPG combined with *all* your added external EPG sources.
*   **Xtream AI Only:** Filters results to show *only* the free EPG provided by Xtream AI.
*   **Admin EPG Only:** Shows *only* the external EPG sources you have added manually.

This allows you to prioritize high-quality external data or fallback to the system EPG as needed.

## Auto Match EPG with AI

Assigning EPGs to hundreds of channels manually can be tedious. Xtream AI simplifies this with **AI Auto-Match**.

### How to use it

1.  Go to the channel list or mass edit tools.
2.  Enable the **Auto Match EPG** switch.
3.  The system uses intelligent matching algorithms to find the best EPG data for each channel based on its name and metadata.

There is no longer a need to edit channels individually to add EPG; the AI handles the search and assignment process automatically, saving hours of configuration time.
