Generate M3U playlists from Dispatcharr VOD content (movies + episodes). This repository contains a Dispatcharr plugin module that scans VOD entries and writes one or more M3U playlists pointing at Dispatcharr proxy endpoints (or direct provider URLs). Perfect for use with the Emby webstreams plugin, but can be used with anything that can read m3u files.
Features
- Single atomic M3U write (reduces filesystem wear)
- Optionally separate Movies and TV into two playlists
- Prefer provider direct URLs when enabled
- Celery task support for asynchronous playlist generation
- Automatic scheduled playlist generation with cron expressions
Via Dispatcharr UI (recommended):
- Download the latest release ZIP from the releases page
- Go to Dispatcharr → Plugins page
- Click "Import" and upload the ZIP file
- Restart dispatcharr
- Go to Dispatcharr → Plugins page
- Enable the plugin and configure settings
- Click "Generate M3U" to create your playlists
Manual Installation:
- Create plugin directory in Dispatcharr:
sudo mkdir -p /data/plugins/vod2m3u
- Copy all plugin files into the folder:
sudo cp plugin.py plugin_m3u.py __init__.py tasks.py /data/plugins/vod2m3u/
- Restart Dispatcharr (or reload plugins via UI):
sudo systemctl restart dispatcharr
- Configure settings in the plugin UI and click "Generate M3U" to generate the playlist(s).
The plugin registers a Celery task named vod2m3u.generate_m3u that Dispatcharr's Celery worker can automatically discover and execute.
How it works:
- When you click "Generate M3U" in the plugin UI, it queues a Celery task for background execution
- The task is registered via
tasks.pyand__init__.py, making it discoverable by Dispatcharr's Celery autodiscovery - The plugin falls back to synchronous execution if the task cannot be queued
Task Registration: The plugin includes:
__init__.py- Makes vod2m3u a proper Python packagetasks.py- Imports and exports the Celery task for autodiscoveryplugin_m3u.py- Defines the actual task logic with@shared_task(name="vod2m3u.generate_m3u")
Dispatcharr's Celery instance should automatically discover tasks when the plugin is loaded. No manual Celery worker configuration is needed.
You can generate M3U playlists at any time by clicking the "Generate M3U" button in the plugin settings. This will immediately create the playlist(s) based on your current configuration.
The manual generation works independently of the scheduler - you can use manual generation alone, or combine it with automatic scheduled generation.
The plugin supports automatic scheduled playlist generation using cron expressions. This feature is optional.
Note: The scheduler and manual generation work independently. You can:
- Use manual generation only (click "Generate M3U" when needed)
- Use scheduled generation only (set up a cron schedule)
- Use both (schedule automatic updates AND manually trigger when needed)
- Enable the Scheduler - Check the "Enable Scheduler" option in plugin settings
- Set Schedule - Enter a cron expression (default:
0 3 * * *= daily at 3am UTC) - Save Settings - Click "Save Settings" to save your configuration
- Sync Schedule - Click "Sync Schedule" to create/update the scheduled task
- Verify - Click "View Active Schedule" to confirm the schedule is active
Cron format: minute hour day month day_of_week
Common Examples:
0 3 * * *- 3:00 AM every day (default example)0 */6 * * *- Every 6 hours starting from midnight (12am, 6am, 12pm, 6pm)*/30 * * * *- Every 30 minutes0 0 * * 0- Midnight every Sunday0 2,14 * * *- 2:00 AM and 2:00 PM daily
Field Reference:
| Field | Values | Special |
|---|---|---|
| minute | 0-59 | */5 = every 5 minutes |
| hour | 0-23 | */6 = every 6 hours |
| day | 1-31 | * = every day |
| month | 1-12 | * = every month |
| day_of_week | 0-6 (Sun-Sat) | * = every day |
Special Characters:
*- Every value (any)*/X- Every X unitsX-Y- Range from X to YX,Y,Z- Specific values
🔄 Sync Schedule - Creates or updates the scheduled task with your current settings. Use this after changing schedule settings.
📅 View Active Schedule - Shows the current scheduled task details including cron expression.
🗑️ Remove Schedule - Deletes the scheduled task. The scheduler must be re-synced to resume automatic generation.
Use with the Emby webstreams plugin
- Follow the plugin installation steps above
- Install the Emby webstreams plugin from the Emby plugins catalog (under the "Channels" section) and restart Emby
- Modify your docker-compose.yml and map the
/data/vod2m3upath to a location which is accessible for Emby. For example:
services:
dispatcharr:
image: ghcr.io/dispatcharr/dispatcharr:latest
container_name: dispatcharr
ports:
- 9191:9191
volumes:
- dispatcharr_data:/data
- path_accessible_by_emby:/data/vod2m3u
environment:
- DISPATCHARR_ENV=aio
- REDIS_HOST=localhost
- CELERY_BROKER_URL=redis://localhost:6379/0
- DISPATCHARR_LOG_LEVEL=info
- Open the dispatcharr web-ui, navigate to the plugins page, enable the plugin and configure to your liking, then click "Run" next to "Generate M3U".
- The plugin will take some time to generate the M3U file(s). When the files are available, open your Emby server dashboard and click "Web Streams" under the "Advanced" section
- Click "Add M3U source"
- Enter a name. Playlist location: Local file. Enter the file path for your generated m3u
- Finish configuration with the Emby webstreams plugin however you like.
- When you've finished, you can add a second, third, etc. m3u source with the Emby webstreams plugin (if you want to add tv.m3u and movies.m3u separately). Or, you can use the Emby webstreams plugin to add the same m3u source twice and use it's built-in filtering tool to separate the included streams.
License
- MIT (see LICENSE file)