Inspired by PATTRMM this simplifed script checks your Sonarr for TV Shows for which a new season is airing within a chosen amount of days and creates .yml files which can be used by Kometa to create a collection and overlays.
- 🔍 Detects upcoming Season: Searches Sonarr for Shows with upcoming seasons
- ▼ Filters out unmonitored: Skips show if season/episode is unmonitored. (optional)
- 🪄 Customizable: Change date format, collection name, overlay positioning, text, ..
- ℹ️ Informs: Lists matched and skipped(unmonitored) TV shows.
- 📝 Creates .yml: Creates a collection and overlay file which can be used with Kometa.
Clone the repository:
git clone https://github.com/netplexflix/New-Season-Soon-for-Kometa.git
cd New-Season-Soon-for-Kometa
Or simply download by pressing the green 'Code' button above and then 'Download Zip'.
- Go to your Kometa install folder, then config.
- Create a subfolder named NSSK.
- Put the files in this subfolder. (
config.yml
,NSSK.py
andrequirements.txt
)
- Ensure you have Python installed (
>=3.8
recommended). - Open a Terminal in the script's directory
Tip
Windows Users:
Go to the NSSK folder (where NSSK.py is). Right mouse click on an empty space in the folder and click Open in Windows Terminal
- Install the required dependencies by pasting the following code:
pip install -r requirements.txt
- Open your Kometa config.yml (config/config.yml, NOT config/NSSK/config.yml)
- Under your TV Show library settings, add the paths to
NSSK_TV_COLLECTION.yml
andNSSK_TV_OVERLAYS.yml
(These files will be created in your NSSK folder when you run the script).
Example:TV Shows: collection_files: - file: P:/Kometa/config/NSSK/NSSK_TV_COLLECTION.yml overlay_files: - file: P:/Kometa/config/NSSK/NSSK_TV_OVERLAYS.yml
Note
If you don't want to create a collection and only overlays you can ofcourse skip adding the collection file to your Kometa config.
Or the other way around..
Edit the config.yml
file in your NSSK folder and edit the settings:
- sonarr_url: Change if needed.
- sonarr_api_key: Can be found in Sonarr under settings => General => Security.
- future_days: How many days into the future the script should look for season premieres.
- skip_unmonitored: Default
true
will skip a show if the upcoming season/episode is unmonitored. - collection_name: The name of the collection.
- sort_title: Collection sort title.
- backdrop: Change backdrop (the colored banner behind the text) size, color and positioning. More info here
- text: Change text color and positioning. More info here
- date_format: The date format to be used on the overlays. e.g.: "yyyy-mm-dd", "mm/dd", "dd/mm", etc.
- use_text: Text to be used on the overlays before the date. e.h.: "NEW SEASON"
Open a Terminal in your script directory and launch the script with:
python NSSK.py
The script will list matched and/or skipped shows and create the .yml files.
The previous configuration will be erased so Kometa will automatically remove overlays for shows that no longer match the criteria.
Tip
Windows users can create a batch file to quickly launch the script.
Type "[path to your python.exe]" "[path to the script]" -r pause"
into a text editor
For example:
"C:\Users\User1\AppData\Local\Programs\Python\Python311\python.exe" "P:\Kometa\config\NSSK\NSSK.py" -r
pause
Save as a .bat file. You can now double click this batch file to directly launch the script.
You can also use this batch file to schedule the script to run.
Is there a docker container?
I made this for my personal use. I don't use docker myself and have no plans atm to learn how to make dockerfiles.
If anyone wants to help make one, please feel free to create a pull request!
If you like this project, please ⭐ star the repository and share it with the community!