-
-
Notifications
You must be signed in to change notification settings - Fork 132
Main Server Configuration
FieldStation42 exposes a set of configuration values that affect the entire system. By default, these are built-in, but you can override any or all of them by creating a file at confs/main_config.json.
{
"channel_socket": "runtime/channel.socket",
"status_socket": "runtime/play_status.socket",
"day_parts": {
"morning": {"start_hour": 6, "end_hour": 10},
"daytime": {"start_hour": 10, "end_hour": 18},
"prime": {"start_hour": 18, "end_hour": 23},
"late": {"start_hour": 23, "end_hour": 2},
"overnight": {"start_hour": 2, "end_hour": 6}
},
"date_time_format": "%Y-%m-%dT%H:%M:%S",
"time_format": "%H:%M",
"db_path": "runtime/fs42_fluid.db",
"start_mpv": true,
"normalize_titles": true
}You can override just the settings you want. For example, to change the location of the communication files:
{
"channel_socket": "/tmp/channel.socket",
"status_socket": "/tmp/play_status.socket"
}Or to use a 12-hour clock format:
{
"time_format": "%I:%M %p"
}Day parts are used in scheduling to restrict content to certain times of day. You can add, remove, or rename day parts—just avoid overlapping times to prevent undefined behavior.
Example with custom day parts:
{
"day_parts": {
"earlymorning": {"start_hour": 4, "end_hour": 7},
"morning": {"start_hour": 7, "end_hour": 10},
"daytime": {"start_hour": 10, "end_hour": 17},
"fringe": {"start_hour": 17, "end_hour": 20},
"prime": {"start_hour": 20, "end_hour": 23},
"late": {"start_hour": 23, "end_hour": 2},
"overnight": {"start_hour": 2, "end_hour": 6}
}
}Sometimes it's helpful to start MPV manually for debugging. Start MPV in a terminal:
mpv --input-ipc-server=/tmp/mpvsocket --idle --force-windowThen set this in confs/main_config.json:
{
"start_mpv": false
}Start field_player.py as usual. It will attach to the running MPV instance, and you can see MPV's output in your terminal for troubleshooting.