Add repo manifest
🏗️ Build Plugin / build (push) Successful in 2m49s
🧪 Test Plugin / test (push) Successful in 1m21s
🚀 Release Plugin / build-and-release (push) Successful in 2m46s

Use title cards when non provided or is livestream
This commit is contained in:
2025-12-20 14:28:39 +01:00
parent dbbdd7eb6d
commit 7f71d3419c
10 changed files with 243 additions and 14 deletions
@@ -461,4 +461,38 @@ public class StreamProxyController : ControllerBase
return StatusCode(StatusCodes.Status502BadGateway);
}
}
/// <summary>
/// Generates a placeholder image with the given text centered.
/// </summary>
/// <param name="text">The text to display (base64 encoded).</param>
/// <returns>A PNG image with the text centered.</returns>
[HttpGet("Placeholder")]
[AllowAnonymous]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public IActionResult GetPlaceholder([FromQuery] string text)
{
if (string.IsNullOrEmpty(text))
{
return BadRequest("Text parameter is required");
}
string decodedText;
try
{
var bytes = Convert.FromBase64String(text);
decodedText = System.Text.Encoding.UTF8.GetString(bytes);
}
catch (FormatException)
{
_logger.LogWarning("Invalid base64 text parameter: {Text}", text);
return BadRequest("Invalid text encoding");
}
_logger.LogDebug("Generating placeholder image for: {Text}", decodedText);
var imageStream = PlaceholderImageGenerator.GeneratePlaceholder(decodedText);
return File(imageStream, "image/png");
}
}