{# Calculate counts for display #} {% set num_valid = analysis.valid_new | length %} {% set num_existing = analysis.existing | length %} {% set num_invalid = analysis.invalid | length %} {% set num_parsing_errors = parsing_errors | length %} {# --- Display Parsing Errors First (if any) --- #} {% if parsing_errors %}
{{ server.server_type }}
{% if server.server_type == 'stdio' %}
terminalCmd: {{ server.command | truncate(35) }}
listArgs: {{ server.args | length }}
subtitlesEnv: {{ server.env_vars | length }}
{% else %}
linkURL: {{ server.url | truncate(45) }}
{% endif %}
{% if server.is_enabled %}toggle_on{% else %}toggle_off{% endif %}Enabled: {{ 'Yes' if server.is_enabled else 'No' }}
{{ item.data | tojson(indent=2) }}
#}
playlist_add_checkReady to add {{ num_valid }} new server definition(s). Review the lists above.
{# Form to confirm and actually add the servers #} {% elif not parsing_errors %} {# Show message only if no parsing errors prevented analysis #}info_outlineNo valid new server definitions found to add. Check the 'Already Exist' or 'Invalid Entries' lists above, or verify your input JSON format.
{% else %}errorCannot proceed due to JSON parsing/extraction errors listed above. Please fix the JSON and analyze again.
{% endif %}