Part 1 - background box. TextGraphicsElement gains element-level background_color, background_opacity_percent, background_padding, background_corner_radius, border_color and border_width; TextElement draws a rounded rect behind the text block and insets the text into it. Element level rather than per-style because the engine lays the whole element out as one RichTextKit TextBlock and rasterises it into one bitmap, so one box per element is the only shape the renderer can express. width_percent keeps bounding the visible element, so the insets are subtracted from the text's wrap/scale budget. The seeded on-now-next.yml adopts it. The halo drops from 2px to 1px rather than to zero, and the box carries a low-alpha white border: rendered against real frames, a 65% black fill is legible on bright and midtone content but vanishes entirely into dark content, which is why the issue asked for an *outlined* box. The halo still matters because the fill is translucent. Because #74's seeder writes the template only when absent, an already-seeded install would never have seen any of this. GraphicsElementSeeder now keeps every default it has shipped as a verbatim fingerprint and rewrites the file only when it still matches one (line-endings normalised), so an untouched install upgrades and an operator-edited one is left alone. The V1 fingerprint was checked byte-for-byte against the live install before being trusted - a fingerprint that matches nothing in the field is a permanent silent no-op. Part 2 - on by default. New channels get the built-in element from CreateChannelHandler (CreateChannel carries no graphics field and the SPA's channel editor is update-only, so the server is the only place a create-time default can live). Pre-existing channels get a one-time AttachOnNowNextByDefault backfill. The marker is written on the first run even when nothing was attached: the tempting alternative - stay armed until the element row exists - would fire on a later boot and re-attach the overlay to a channel the operator had cleared in between. HLS Direct is excluded at both sites, where the overlay cannot render at all. Resolves the issue's open question: [vge] in a filter graph does not imply a graphics element is bound. Watermarks fall back onto the graphics engine whenever they cannot use ffmpeg's native overlay shortcut, so a watermark alone produces that stage. Tests assert rendered pixels, because every failure mode here is a silent no-op that a model-level test cannot see. 13 clause mutations were executed against them; each reddened only its own clause. Decisions-Edit: yes Refs: #732
82 lines
6.1 KiB
C#
82 lines
6.1 KiB
C#
namespace ErsatzTV.Core.Domain;
|
|
|
|
public class ConfigElementKey
|
|
{
|
|
private ConfigElementKey(string key) => Key = key;
|
|
|
|
public string Key { get; }
|
|
|
|
public static ConfigElementKey MinimumLogLevel => new("log.minimum_level");
|
|
public static ConfigElementKey MinimumLogLevelScanning => new("log.minimum_level.scanning");
|
|
public static ConfigElementKey MinimumLogLevelScheduling => new("log.minimum_level.scheduling");
|
|
public static ConfigElementKey MinimumLogLevelSearching => new("log.minimum_level.searching");
|
|
public static ConfigElementKey MinimumLogLevelStreaming => new("log.minimum_level.streaming");
|
|
public static ConfigElementKey MinimumLogLevelHttp => new("log.minimum_level.http");
|
|
public static ConfigElementKey FFmpegPath => new("ffmpeg.ffmpeg_path");
|
|
public static ConfigElementKey FFprobePath => new("ffmpeg.ffprobe_path");
|
|
public static ConfigElementKey FFmpegDefaultProfileId => new("ffmpeg.default_profile_id");
|
|
public static ConfigElementKey FFmpegDefaultResolutionId => new("ffmpeg.default_resolution_id");
|
|
public static ConfigElementKey FFmpegSaveReports => new("ffmpeg.save_reports");
|
|
public static ConfigElementKey FFmpegUseEmbeddedSubtitles => new("ffmpeg.use_embedded_subtitles");
|
|
public static ConfigElementKey FFmpegExtractEmbeddedSubtitles => new("ffmpeg.extract_embedded_subtitles");
|
|
public static ConfigElementKey FFmpegProbeForInterlacedFrames => new("ffmpeg.probe_for_interlaced_frames");
|
|
public static ConfigElementKey FFmpegPreferredLanguageCode => new("ffmpeg.preferred_language_code");
|
|
public static ConfigElementKey FFmpegGlobalWatermarkId => new("ffmpeg.global_watermark_id");
|
|
public static ConfigElementKey FFmpegGlobalFallbackFillerId => new("ffmpeg.global_fallback_filler_id");
|
|
public static ConfigElementKey ChannelTemplatesDefaultTemplateId => new("channel_templates.default_template_id");
|
|
public static ConfigElementKey WatermarkChannelBugSeeded => new("watermark.channel_bug_seeded");
|
|
public static ConfigElementKey GraphicsOnNowNextSeeded => new("graphics.on_now_next_seeded");
|
|
|
|
public static ConfigElementKey GraphicsOnNowNextDefaultAttached =>
|
|
new("graphics.on_now_next_default_attached");
|
|
public static ConfigElementKey FFmpegSegmenterTimeout => new("ffmpeg.segmenter.timeout_seconds");
|
|
public static ConfigElementKey FFmpegWorkAheadSegmenters => new("ffmpeg.segmenter.work_ahead_limit");
|
|
public static ConfigElementKey FFmpegInitialSegmentCount => new("ffmpeg.segmenter.initial_segment_count");
|
|
public static ConfigElementKey FFmpegHlsDirectOutputFormat => new("ffmpeg.hls_direct.output_format");
|
|
public static ConfigElementKey FFmpegDefaultMpegTsScript => new("ffmpeg.default_mpegts_script");
|
|
public static ConfigElementKey SearchIndexVersion => new("search_index.version");
|
|
public static ConfigElementKey HDHRTunerCount => new("hdhr.tuner_count");
|
|
public static ConfigElementKey HDHRUUID => new("hdhr.uuid");
|
|
public static ConfigElementKey PagesIsDarkMode => new("pages.is_dark_mode");
|
|
public static ConfigElementKey PagesLanguage => new("pages.language");
|
|
public static ConfigElementKey ChannelsPageSize => new("pages.channels.page_size");
|
|
public static ConfigElementKey ChannelsShowDisabled => new("pages.channels.show_disabled");
|
|
public static ConfigElementKey CollectionsPageSize => new("pages.collections.page_size");
|
|
public static ConfigElementKey MultiCollectionsPageSize => new("pages.multi_collections.page_size");
|
|
public static ConfigElementKey SmartCollectionsPageSize => new("pages.smart_collections.page_size");
|
|
public static ConfigElementKey RerunCollectionsPageSize => new("pages.rerun_collections.page_size");
|
|
public static ConfigElementKey SchedulesPageSize => new("pages.schedules.page_size");
|
|
public static ConfigElementKey SchedulesDetailPageSize => new("pages.schedules.detail_page_size");
|
|
public static ConfigElementKey PlayoutsPageSize => new("pages.playouts.page_size");
|
|
public static ConfigElementKey PlayoutsDetailPageSize => new("pages.playouts.detail_page_size");
|
|
public static ConfigElementKey PlayoutsDetailShowFiller => new("pages.playouts.detail_show_filler");
|
|
public static ConfigElementKey LogsPageSize => new("pages.logs.page_size");
|
|
public static ConfigElementKey TraktListsPageSize => new("pages.trakt.lists_page_size");
|
|
public static ConfigElementKey FillerPresetsPageSize => new("pages.filler_presets.page_size");
|
|
public static ConfigElementKey LibraryRefreshInterval => new("scanner.library_refresh_interval");
|
|
public static ConfigElementKey PlayoutDaysToBuild => new("playout.days_to_build");
|
|
public static ConfigElementKey PlayoutSkipMissingItems => new("playout.skip_missing_items");
|
|
|
|
public static ConfigElementKey TroubleshootingBlockPlayoutHistoryPageSize =>
|
|
new("pages.troubleshooting.block_playout_history.page_size");
|
|
|
|
public static ConfigElementKey PlayoutScriptedScheduleTimeoutSeconds =>
|
|
new("playout.scripted_schedule_timeout_seconds");
|
|
|
|
public static ConfigElementKey XmltvTimeZone => new("xmltv.time_zone");
|
|
public static ConfigElementKey XmltvDaysToBuild => new("xmltv.days_to_build");
|
|
public static ConfigElementKey XmltvBlockBehavior => new("xmltv.block_behavior");
|
|
|
|
// Optional advertised IPTV base URL (issue #340). When set, overrides the request-derived
|
|
// scheme/host/PathBase used to build absolute M3U + XMLTV URLs; when blank/unset, request-derived
|
|
// values are used (today's behavior). Distinct from ETV_BASE_URL, which only sets ASP.NET PathBase.
|
|
public static ConfigElementKey IptvBaseUrl => new("iptv.base_url");
|
|
|
|
// Browser SPA authentication (issue #295). The single local-admin credential lives in ConfigElement
|
|
// rows (no DB migration): a username, a PBKDF2 password hash, and a security stamp that is rotated on
|
|
// every password change so a stamp mismatch in OnValidatePrincipal revokes all outstanding sessions.
|
|
public static ConfigElementKey AuthLocalAdminUsername => new("auth.local_admin.username");
|
|
public static ConfigElementKey AuthLocalAdminPasswordHash => new("auth.local_admin.password_hash");
|
|
public static ConfigElementKey AuthSecurityStamp => new("auth.security_stamp");
|
|
}
|