# Bbergle-zap2xml

Bbergle-zap2xml is a self-hosted media servers app. Zap2Xml is an automated TV guide (EPG) generator that downloads your chosen Zap2it/Gracenote listings grid and converts it into XMLTV format for media servers such as Plex and Jellyfin. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/2169/bbergle-zap2xml

## Description

Zap2Xml is an automated TV guide (EPG) generator that downloads your chosen Zap2it/Gracenote listings grid and converts it into XMLTV format for media servers such as Plex and Jellyfin.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

45/100 (Fair), based on 4 of 5 factors.
- Maintained: 24 (last commit 485 days ago)
- Popular: 43 (135 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Security check: 100 (no serious findings, CI, tests)

## Links

- Docker Hub: https://hub.docker.com/r/spencerlandis/zap2xml
- GitHub: https://github.com/jef/zap2xml
- Unraid: https://ca.unraid.net/apps/bbergle-zap2xml-0ueum3z0h1czx7?q=bbergle-zap2xml

## Common questions

### How do I select the channel lineup and preferred content?

Set LINEUP_ID, COUNTRY, POSTAL_CODE, and PREF as environment variables. PREF can include m, p, or h to show music, pay-per-view, or HD content.

### How many days of listings can zap2xml request?

TIMESPAN controls the window in hours and can be set up to 360 hours, which is 15 days. The default is 6 hours.

### How do I keep the generated XMLTV file in Docker?

Set OUTPUT_FILE to a path inside the container and mount a host directory at that location. The example uses /xmltv/xmltv.xml with a host mount at /xmltv.

### How can zap2xml run automatically on a schedule?

Docker can use SLEEP_TIME to wait before the next run, with a default of 21600 seconds. Native installs should use a task scheduler.

### Why might older zap2xml scripts fail because of Zap2It?

A forum thread notes that zap2it moved to a gracenote domain. It also provides a sed command to update zap2xml.pl.

---
Source: Our Local Host (https://ourlocalhost.com/app/2169/bbergle-zap2xml), the self-hosted and open-source app directory.
