Seasonal Shift
A small CLI tool to shift season and episode numbers of TV episode files based on configurable offsets.
This is useful when episodes are downloaded with incorrect season numbering and need to be renamed and moved to the correct season folders.
The tool:
- Renames episode files
- Moves them to the correct season directory
- Shows a preview before applying changes
- Detects rename collisions
- Supports undoing the latest change
- Cleans up empty folders
Features
- Configurable season and episode offsets
- Preview changes before applying
- Collision detection
- Duplicate destination detection
- Undo support
- Automatic cleanup of empty season folders
- Uses XDG directories for config and state
- Written with Typer, Rich, and Pydantic
Installation
Install with pip:
pip install seasonal-shift
Configuration
By default the tool reads the config from:
~/.config/seasonal-shift/config.yaml
(or $XDG_CONFIG_HOME/seasonal-shift/config.yaml)
Example configuration:
shows:
- name: Breaking Bad
path: /media/shows/Breaking Bad
seasons:
1:
season_offset: 2
episode_offset: 0
2:
season_offset: 2
episode_offset: 0
Meaning:
Season 1 → Season 3
Season 2 → Season 4
Episode numbering can also be shifted.
Directory Structure
Expected show layout:
Show Name/
Season 1/
Show Name - S01E01 - Episode Title.mkv
Season 2/
Show Name - S02E01 - Episode Title.mkv
Files must already follow a SxxExx naming pattern.
Usage
Preview and apply changes
seasonal-shift run
The tool will:
- Show a preview of planned renames
- Ask for confirmation
- Rename and move files
- Save an undo file
Use a custom config
seasonal-shift run --config my-config.yaml
Undo the latest change
seasonal-shift undo
Undo files are stored in:
~/.local/state/seasonal-shift/
You can also undo a specific operation:
seasonal-shift undo undo-20260310-032201.json
Run diagnostics
seasonal-shift doctor
This checks:
- Config validity
- Show paths
- Episode detection
- Potential rename collisions
No changes are made.
Example Preview
Breaking Bad
------------
Season 1 → 3
Breaking Bad - S01E01 - Pilot.mkv
→ Breaking Bad - S03E01 - Pilot.mkv
Breaking Bad - S01E02 - Cat's in the Bag.mkv
→ Breaking Bad - S03E02 - Cat's in the Bag.mkv
Undo System
Every run creates an undo file:
~/.local/state/seasonal-shift/undo-YYYYMMDD-HHMMSS.json
This allows reverting renames even after files are moved.
Requirements
- Python 3.11+
- typer
- rich
- pydantic
- pyyaml
License
MIT License.
Metadata
Release files for seasonal-shift 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seasonal_shift-1.4.0.tar.gz | 12.5 kB | Without provenance | Details for seasonal_shift-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seasonal_shift-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for seasonal_shift-1.4.0-py3-none-any.whl |
Total release size: 29.1 kB
Release files / seasonal_shift-1.4.0.tar.gz
| Download URL | seasonal_shift-1.4.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68e911f133c87d6878a4fda1c3a321108e0ca78e983f38d387edb3f89f0a36ba
|
|
BLAKE2b-256 checksum How to use checksums |
6f83fed1ab3646e4953c3fee55fda0a315b9dc6f31708f91450f7b143a14063a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.4 Linux/7.0.3-arch1-1
|
Release files / seasonal_shift-1.4.0-py3-none-any.whl
| Download URL | seasonal_shift-1.4.0-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0d5580971a8a2a362cc7bc3a9a8cfb318ea2c260cc74aec27a8422e2d9608a8
|
|
BLAKE2b-256 checksum How to use checksums |
d1c9cc4f3c072c7f7e19a1161a7515e3a034bfca7fe3daf9e6136b72a01f76ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.4 Linux/7.0.3-arch1-1
|
Security for seasonal-shift 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.