diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b904b5c..87618223b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Fixed - Fix HLS Direct playback with Jellyfin 10.11 +- Fix remote stream scripts (parsing issue with spaces and quotes) ## [25.8.0] - 2025-10-26 ### Added diff --git a/ErsatzTV/Controllers/InternalController.cs b/ErsatzTV/Controllers/InternalController.cs index 77f6c3845..5b2dbf44c 100644 --- a/ErsatzTV/Controllers/InternalController.cs +++ b/ErsatzTV/Controllers/InternalController.cs @@ -1,4 +1,5 @@ -using System.Diagnostics; +using System.CommandLine.Parsing; +using System.Diagnostics; using CliWrap; using ErsatzTV.Application.Emby; using ErsatzTV.Application.Jellyfin; @@ -59,13 +60,13 @@ public class InternalController : StreamingControllerBase if (!string.IsNullOrWhiteSpace(remoteStream.Script)) { - string[] split = remoteStream.Script.Split(" "); - if (split.Length > 0) + var split = CommandLineParser.SplitCommandLine(remoteStream.Script).ToList(); + if (split.Count > 0) { - _logger.LogDebug("Remote stream script: {Arguments}", split.ToList()); + _logger.LogDebug("Remote stream script: {Arguments}", split); Command command = Cli.Wrap(split.Head()); - if (split.Length > 1) + if (split.Count > 1) { command = command.WithArguments(split.Tail()); }