Browse Source

fix: sessions api with next engine (#3009)

* fix: sessions api with next engine

* regen openapi
pull/3010/head
Jason Dove 1 week ago committed by GitHub
parent
commit
2989faeb08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 12
      ErsatzTV.Application/Streaming/NextSessionWorker.cs
  3. 2
      ErsatzTV.Core/FFmpeg/HlsSessionModel.cs
  4. 2
      ErsatzTV/wwwroot/openapi/scripted-schedule-tagged.json
  5. 2
      ErsatzTV/wwwroot/openapi/scripted-schedule.json
  6. 5
      ErsatzTV/wwwroot/openapi/v1.json

1
CHANGELOG.md

@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Fix health checks causing a flood of (harmless) logged errors when quickly navigating away from home page
- Health check results will now be cached for 5 minutes by default; a refresh button has been added to immediately re-run all checks
- Fix `/api/sessions` response when channels use Next streaming engine
## [26.9.0] - 2026-09-06
### Fixed

12
ErsatzTV.Application/Streaming/NextSessionWorker.cs

@ -87,15 +87,21 @@ public class NextSessionWorker( @@ -87,15 +87,21 @@ public class NextSessionWorker(
public Task<Option<TrimPlaylistResult>> TrimPlaylist(
DateTimeOffset filterBefore,
CancellationToken cancellationToken) =>
throw new NotSupportedException();
CancellationToken cancellationToken)
{
logger.LogWarning(
"Legacy path called for next session worker on channel {Number}; this is NOT supported",
_channelNumber);
return Task.FromResult(Option<TrimPlaylistResult>.None);
}
public void PlayoutUpdated()
{
// nothing to do here; channel binary should detect that by itself
}
public HlsSessionModel GetModel() => throw new NotSupportedException();
public HlsSessionModel GetModel() => new(_channelNumber, "next", null, _lastTouch);
public async Task Run(
string channelNumber,

2
ErsatzTV.Core/FFmpeg/HlsSessionModel.cs

@ -3,5 +3,5 @@ namespace ErsatzTV.Core.FFmpeg; @@ -3,5 +3,5 @@ namespace ErsatzTV.Core.FFmpeg;
public record HlsSessionModel(
string ChannelNumber,
string State,
DateTimeOffset TranscodedUntil,
DateTimeOffset? TranscodedUntil,
DateTimeOffset LastAccess);

2
ErsatzTV/wwwroot/openapi/scripted-schedule-tagged.json

@ -1569,7 +1569,7 @@ @@ -1569,7 +1569,7 @@
},
"groupBy": {
"type": "string",
"description": "Tells the scheduler how to group the combined content (returned from all guids and searches). Valid values are show, season, artist and album."
"description": "Tells the scheduler how to group the combined content (returned from all guids and searches). Valid values are show, season, artist, album and director."
},
"itemOrder": {
"type": "string",

2
ErsatzTV/wwwroot/openapi/scripted-schedule.json

@ -1569,7 +1569,7 @@ @@ -1569,7 +1569,7 @@
},
"groupBy": {
"type": "string",
"description": "Tells the scheduler how to group the combined content (returned from all guids and searches). Valid values are show, season, artist and album."
"description": "Tells the scheduler how to group the combined content (returned from all guids and searches). Valid values are show, season, artist, album and director."
},
"itemOrder": {
"type": "string",

5
ErsatzTV/wwwroot/openapi/v1.json

@ -1074,7 +1074,10 @@ @@ -1074,7 +1074,10 @@
]
},
"transcodedUntil": {
"type": "string",
"type": [
"null",
"string"
],
"format": "date-time"
},
"lastAccess": {

Loading…
Cancel
Save