RadioBOSS Christmas Weight Manager
Installation and Setup Guide
==================================

1. Install Python
-----------------
Download and install Python 3.8 or newer:
https://www.python.org/downloads/

During installation, make sure to select "Add Python to PATH" if this option is available.

No additional Python libraries are required.

2. Prepare your Christmas music
-------------------------------
- Open RadioBOSS Music Library.
- Select all Christmas tracks.
- Open Track Properties.
- Set the annual availability period, for example, from December 1 to January 6.
- Save the changes.

This ensures that Christmas tracks are available only during the selected period.

3. Prepare Playlist Generator presets
-------------------------------------
Create your Christmas music libraries and add them to the appropriate Playlist Generator presets.

The script automatically identifies the specified music libraries and updates their weights. Playlist Generator category names do not matter.

4. Prepare the script files
---------------------------
Keep both files in the same folder:
- christmas_weight.py
- christmas_weight.bat

Do not separate these files.

5. Configure the Python script
------------------------------
Open christmas_weight.py using Notepad++ or Visual Studio Code.

- Notepad++: https://notepad-plus-plus.org/
- Visual Studio Code: https://code.visualstudio.com/

Find the following section:

================= USER SETTINGS =================

Before running the script, configure the following settings:

- PRESETS_FOLDER – the full path to your RadioBOSS Playlist Generator presets folder.
- LOG_FOLDER – an existing folder where log files will be saved.
- MUSIC_LIBRARIES – the exact names of your Christmas music libraries, not the Playlist Generator category names.
- SEASON_START / SEASON_END – the annual weight-control period.
- ADVENT_1 to ADVENT_4 – the desired weight for each Advent period.
- AFTER_CHRISTMAS – weight from December 29 to December 31.
- NEW_YEAR – weight from January 1 to January 6.
- MANUAL_WEIGHT – leave set to None for automatic seasonal weight control, or enter a custom weight value (1–100) to override all predefined seasonal weights within the configured season. Set it back to None to resume automatic seasonal weight control.

Save the file after making your changes.

6. Configure RadioBOSS Scheduler
--------------------------------
1. Open RadioBOSS Scheduler and add a new event.
2. Click Wizard and select "Start a program".
3. Select christmas_weight.bat (not the Python file).
4. Set Time to 23:30:00.
5. Enable Date, set the start date and select "Every year". November 26 is recommended for the default Advent calendar.
6. Enable "Days of the week" and select all seven days.
7. Enable "End date/time", set the end date to January 6 and select "Every year".
8. Make sure "Enabled event" is checked.
9. Save the event.

7. How it works
---------------
RadioBOSS runs the BAT file every evening at 23:30. The Python script checks the date of the following day and automatically applies the appropriate seasonal weight.

Advent dates are calculated automatically each year, including the transition from December to January. There is no need to manually update the Advent dates every year.

The script updates the weights in advance so that the new values are ready for playlist generation for the following broadcast day.

Only the weights of the specified Christmas music libraries are modified. All other preset settings remain unchanged.

A log file is created only when changes are made or an error occurs.

Important notes
---------------
- Back up your Playlist Generator presets before using this tool.
- Weight is relative, not a percentage.
- Supported weight values are 1–100.
- The script does not disable Christmas tracks after the season because RadioBOSS does not support a weight value of 0. Instead, this is handled by setting the annual track availability dates in Music Library → Track Properties, ensuring that Christmas tracks are not selected outside the specified period.
- Manual execution also prepares the following calendar day.
- No changes are made outside the configured weight-control season.

This is a free community tool provided as is. No individual installation or configuration support is provided.
