Share decoder live sources and bound web playback startup

This commit is contained in:
2026-10-12 20:59:30 +02:00
parent 92052d588f
commit cecd5b5625
13 changed files with 579 additions and 37 deletions
@@ -50,7 +50,9 @@ public sealed class PreferencesController : ControllerBase
{
private readonly PreferencesStore store;
private readonly InternetEpg epg;
public PreferencesController(PreferencesStore store,InternetEpg epg) { this.store=store; this.epg=epg; }
private readonly LiveStreamRelay relay;
private readonly LiveStreamProbe probe;
public PreferencesController(PreferencesStore store,InternetEpg epg,LiveStreamRelay relay,LiveStreamProbe probe) { this.store=store; this.epg=epg; this.relay=relay; this.probe=probe; }
private Guid UserId => Guid.TryParse(User.FindFirst("Jellyfin-UserId")?.Value,out var id) ? id : Guid.Empty;
[HttpGet("Channels")]
[AllowAnonymous]
@@ -66,5 +68,5 @@ public sealed class PreferencesController : ControllerBase
{ if (UserId == Guid.Empty) return Unauthorized(); await store.Save(UserId,value,token); return NoContent(); }
[HttpGet("Status")]
[Authorize(Policy="RequiresElevation")]
public IActionResult Status() => Ok(new { epg.LastSuccess,epg.MatchedImages,epg.LastError, Source="https://epg.polishteam.one/guide.xml" });
public IActionResult Status() => Ok(new { epg.LastSuccess,epg.MatchedImages,epg.LastError, Source="https://epg.polishteam.one/guide.xml", Streams=relay.Status(), ProbeError=probe.LastError });
}