Refactor Dockerfile and documentation for non-root user setup. Update CLAUDE.md and README.md to clarify media storage permissions and user requirements. Modify appsettings for local development database configuration. Enhance MediaEndpoints by removing unused regex and improving file resolution logic. Update BumperPreview to use SHA-256 for asset ID generation, ensuring better security practices.
ci / build-backend (push) Successful in 1m33s
ci / build-frontend (push) Successful in 1m2s
ci / tests (push) Successful in 1m52s
ci / sonar (push) Successful in 4m24s

This commit is contained in:
Leonid Pershin
2026-07-26 21:41:33 +03:00
parent e79769be81
commit b52080e026
9 changed files with 103 additions and 51 deletions
@@ -7,20 +7,28 @@ namespace TeleWave.Application.Library;
/// вытаскиваются из имён по мере надобности (сводка в списке шоу, метка в расписании админки).</summary>
public static class EpisodeName
{
/// <summary>Потолок на один Match. Шаблоны ниже линейные и в катастрофический бэктрекинг не уходят,
/// но имя файла приходит извне (загрузка, inbox), а разбор идёт в цикле по всей библиотеке —
/// страховка стоит ноль, а её отсутствие превращает любую будущую правку шаблона в риск.</summary>
private static readonly TimeSpan MatchTimeout = TimeSpan.FromSeconds(1);
private static readonly Regex SxxEyy = new(
@"[Ss](\d{1,2})[ ._-]*[Ee](\d{1,3})",
RegexOptions.Compiled
RegexOptions.Compiled,
MatchTimeout
);
private static readonly Regex NxNN = new(
@"(?:^|[^\d])(\d{1,2})x(\d{1,3})",
RegexOptions.Compiled | RegexOptions.IgnoreCase
RegexOptions.Compiled | RegexOptions.IgnoreCase,
MatchTimeout
);
// Ведущий номер серии: «01. Название», «02 - Название», «03_Название» — сезон считаем первым.
private static readonly Regex LeadingNumber = new(
@"^\s*(\d{1,3})[\s._)\]-]",
RegexOptions.Compiled
RegexOptions.Compiled,
MatchTimeout
);
public static (int Season, int Episode)? Parse(string? name)