This repo provides a SABnzbd post-processing script for importing Formula 1 releases into a Plex TV library.
The current Python script supports:
playWEBreleases that use TVDB-styleS2026E##numbering- multi-file jobs, so one SAB download can import multiple sessions
- a generated lookup table that maps TVDB episode codes into
Season XXrace folders - safe replacement rules based on preferred resolution, with
1080pas the default preference
This project moved from shell to Python so the importer can handle structured TVDB episode lookups, multi-file jobs, and replacement logic more reliably than a large post-processing shell script.
The script currently understands:
playWEBFormula 1 releases with TVDB-style naming such asFormula1.S2026E19.China.Race.1080p...-playWEB
Unsupported or unwanted items are rejected by the script during post-processing. That means the script can protect your library even if a broad RSS rule lets something through.
If bandwidth matters, you should still use SAB RSS filters to prevent those releases from downloading in the first place.
Place these files together inside your SAB scripts path:
formula1_sabnzbd.pyconfig/formula1_config.tomlconfig/round_schedules.jsonformula_posters/episode/*.pngformula_posters/season/*.png
Example:
/config/scripts/
├── formula1_sabnzbd.py
├── config/
│ ├── formula1_config.toml
│ └── round_schedules.json
└── formula_posters/
├── episode/
│ ├── 01.png
│ └── 12.png
└── season/
├── 01.png
└── 22.png
- Place
formula1_sabnzbd.pyin your SAB script directory. - Make it executable.
- Place the
config/folder next to the script. - Place the
formula_posters/folder somewhere SAB can access it. - Update paths in
config/formula1_config.tomlto match your environment. - Choose
formula1_sabnzbd.pyas the post-processing script for your Formula 1 RSS feed.
If you use Docker, all of these paths must exist inside the SAB container, not just on the host.
The script tracks core race-weekend sessions:
FP1FP2FP3Sprint.QualifyingSprintQualifyingRace
This release-group workflow does not currently target pre-show or post-show extras.
The script prefers the configured preferred_resolution, which defaults to 1080p.
Current default behavior:
- a
1080prelease is preferred over720por2160p - if two releases have the same preferred-status, the larger file wins
Only these explicit resolutions are accepted:
720p1080p2160p
If a filename includes another explicit resolution such as 480p or 576p, it is rejected.
If no resolution token is present, the script treats it as 1080p for ranking.
The script rejects unsupported or unwanted files during post-processing.
Rejected files are not imported into Plex, and they are not saved to a separate unmatched folder.
This is useful when:
- a release name does not match the supported parser
- a release uses an unsupported resolution
- a release is outside the accepted Formula 1 patterns
If you want to avoid downloading those files at all, use SAB RSS filters.
Use SAB RSS filters as a coarse front-end filter, especially if you want to save bandwidth.
Example:
0 : Requires : re: playWEB
1 : Reject : re: part\.1|part\.2
2 : *
The post-processing script remains the final safety layer, but RSS filters are the right place to reduce unwanted downloads before they consume bandwidth.
- enable local media assets or prefer local artwork so copied posters are used
Create a new Plex library with these recommendations:
- library type:
TV Shows - library path: your Formula 1 base folder, for example
/media/pool.media/formula1 - under
Advanced, setScannertoPlex Series Scanner - under
Advanced, setAgenttoPersonal Media Shows
This script is designed around a TV-style Plex library layout, with each race weekend stored as a Season XX folder and each session named like an episode.
If posters or renamed sessions do not appear immediately in Plex, refresh metadata after new imports.
The script expects the base destination directory to already exist.
Example:
/media/pool.media/formula1
The script creates:
- year folders such as
F1 2026 - season folders such as
Season 02 - media files such as
S02E07 - China Grand Prix - Race.mkv - episode posters such as
S02E07 - China Grand Prix - Race.png - season posters such as
season02.png
The script also writes import state outside the Plex-visible folders:
/media/pool.media/formula1/.metadata/
Each round state file tracks:
- expected core sessions
- present sessions
- missing core sessions
- file metadata
Poster copying is optional.
Episode posters
Place episode poster source images in formula_posters/episode/.
These files must be named using the episode number expected by the script.
formula_posters/episode/01.pngformula_posters/episode/02.pngformula_posters/episode/12.png
Season posters
Place season poster source images in formula_posters/season/.
These files must be named using the season number parsed by the script. In this setup, the season number corresponds to the Formula 1 round number.
formula_posters/season/01.pngformula_posters/season/02.pngformula_posters/season/24.png
How the script uses them
When a release is processed, the script parses the TVDB episode code, looks it up in config/round_schedules.json, and determines the target season and per-weekend episode values. It then looks for matching poster files using those numbers.
Example release:
Formula1.S2026E19.China.Race.1080p.F1TV.WEB-DL.AAC2.0.H.264-playWEB
The script will look for:
formula_posters/episode/07.pngformula_posters/season/02.png
Output behavior
If matching images are found, the script copies them into the final Plex media folder automatically.
Episode posters are copied and renamed to match the final media item name.
Season posters are copied as seasonXX.png.
If a matching poster is missing, the media file still imports normally.
Important
- Filenames must match exactly.
- Use
.pngfiles only. - Episode posters must use the script’s mapped episode number, not the event name.
- Season posters must use the parsed season number from the release filename.
If you prefer not to use local poster files, you can manage artwork directly in Plex instead.
Plex documentation for local media assets: https://support.plex.tv/articles/200220717-local-media-assets-tv-shows/
The TVDB episode-to-season lookup lives in:
config/round_schedules.json
By default, build_round_schedule.py can scrape the TVDB season URL from config/formula1_config.toml and rebuild the lookup automatically:
python3 build_round_schedule.py --year 2026You can also build or override a season entry from a simple text file with:
python3 build_round_schedule.py --year 2027 --input season_2027.txtExample input format:
S2026E10 | Australia | FP1 | Australia (Practice 1)
S2026E16 | China | Sprint.Qualifying | China (Sprint Qualifying)
S2026E19 | China | Race | China (Race)
See season_schedule_template.txt for the expected format.