Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcooper committed Aug 14, 2024
1 parent ea8b678 commit 17da28c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
13 changes: 12 additions & 1 deletion docs/docs_macros.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import decimal
import sys
from pathlib import Path
import sys
from unittest.mock import Mock


Expand All @@ -14,6 +14,7 @@
TYPE_HINTS_TO_STRING = {
"audio_bitrate": "32kbps through 320kbps",
"ui_modes": "Simple, standard, and/or advanced mode",
"clock": "Off, 12-hour, and 24-hour",
}


Expand Down Expand Up @@ -50,6 +51,16 @@ def get_constance_config_default(name, default):
return f"{default}kbps"
elif name == "UI_MODES":
return "Simple & standard mode"
elif name == "CLOCK":
return "Off"
elif name in (
"UI_MODE_RESET_TIMES",
"REJECT_SILENCE_LENGTH",
"NO_REPEAT_ASSETS_TIME",
"STOPSET_OVERDUE_TIME",
"END_DATE_PRIORITY_WEIGHT_MULTIPLIER",
):
return "0 (feature disabled)"
return repr(default)


Expand Down
4 changes: 2 additions & 2 deletions server/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@
"settings_descriptions": {
"ALLOW_REPEATS_IN_STOPSET": "The randomization algorithm will try its absolute best to avoid duplicates. However, when that's not possible (for example because of a nearly empty rotator), do you want the same asset to repeat (True), or for the rotator to be ignored in a given stop set (False)?",
"BROADCAST_COMPRESSION": "Enable broadcast compression when True, smoothing out dynamic range in audio output.\nNOTE: compression is applied at the time you play an audio asset and performed on-the-fly in the desktop app.",
"CLOCK": "This will enable a clock that displays the current time in the desktop app (12 or 24-hour). On larger screens the date will also display.",
"CLOCK": "This will enable a clock that displays the current time in the desktop app (12- or 24-hour display). On larger screens the date will also display.",
"END_DATE_PRIORITY_WEIGHT_MULTIPLIER": "Multiply an asset's weight by this number if it has an end date and the end date is in the next 24 hours (one day). Set to 0 to disable this feature.",
"NO_REPEAT_ASSETS_TIME": "The time (in seconds) required to elapse for the Desktop app to attempt to not repeat any assets. Set to 0 to disable and allow potential repetition in the randomization algorithm. If there are not enough assets in a rotator to respect this setting, it will be ignored.",
"ONE_CLIENT_LOGIN_PER_ACCOUNT": "Only allow one desktop client to be connected per account.",
"STATION_NAME": "The name of your station.",
"STOPSET_OVERDUE_TIME": "The time (in seconds) after the WAIT_INTERVAL after which an \"overdue\" message will flash. Set to 0 disable.",
"STOPSET_PRELOAD_COUNT": "Number of stopsets to preload in the UI. 2 or 3 are good values for this, since new data could make preloaded ones stale.",
"UI_MODES": "Restrict what user interface modes are available to the desktop app.",
"UI_MODE_RESET_TIMES": "Reset UI mode to the simplest enabled mode according to this setting. Enter a list of times (HH:MM format) with each time on a single line. Set to 0 disable. The below example would reset the UI mode at midnight, 6am, noon, and 6pm:\n\n00:00\n06:00\n12:00\n18:00",
"UI_MODE_RESET_TIMES": "Reset UI mode to the simplest enabled mode according to this setting. Enter a list of times (in 24-hour HH:MM format) with each time on a single line. Set to 0 disable. The below example would reset the UI mode at midnight, 6am, noon, and 6pm:\n\n00:00\n06:00\n12:00\n18:00",
"WAIT_INTERVAL": "Time to wait between stop sets (in seconds). Set to 0 to disable the wait interval entirely.",
"WAIT_INTERVAL_SUBTRACTS_FROM_STOPSET_PLAYTIME": "Wait time subtracts the playtime of a stop set in minutes when True. When enabled Tomato will provide more even results, ie the number of stop sets played per hour will be more consistent at the possible expense of an individual DJs air time.",
"WAIT_INTERVAL_SUBTRACTS_FROM_STOPSET_PLAYTIME_MIN_LENGTH": "When WAIT_INTERVAL_SUBTRACTS_FROM_STOPSET_PLAYTIME is set to True, wait intervals are of variable length. A very long stopset might naively result in a negative wait interval. This setting avoids that by setting minimum wait interval length (in seconds).",
Expand Down
6 changes: 3 additions & 3 deletions server/tomato/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ def validate_reset_times(values):
"UI_MODE_RESET_TIMES": (
"0",
mark_safe(
"Reset UI mode to the simplest enabled mode according to this setting. Enter a list of times"
" (<code>HH:MM</code> format) with each time on a single line. <strong>Set to 0 disable</strong>. The below"
" example would reset the UI mode at midnight, 6am, noon, and"
"Reset UI mode to the simplest enabled mode according to this setting. Enter a list of times (in 24-hour"
" <code>HH:MM</code> format) with each time on a single line. <strong>Set to 0 disable</strong>."
" The below example would reset the UI mode at midnight, 6am, noon, and"
" 6pm:<br><br><code>00:00<br>06:00<br>12:00<br>18:00</code>"
),
"reset_times",
Expand Down

0 comments on commit 17da28c

Please sign in to comment.