passthrough not transcode
🚀 Release Plugin / build-and-release (push) Successful in 3m19s
🏗️ Build Plugin / build (push) Successful in 3m8s
🧪 Test Plugin / test (push) Successful in 1m43s

This commit is contained in:
2025-11-16 20:53:23 +01:00
parent cd0f680981
commit e26f2a2ab1
3 changed files with 41 additions and 8 deletions
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.SRFPlay.Services;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Channels;
@@ -27,6 +28,7 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
private readonly StreamUrlResolver _streamResolver;
private readonly StreamProxyService _proxyService;
private readonly CategoryService? _categoryService;
private readonly IServerApplicationHost _appHost;
/// <summary>
/// Initializes a new instance of the <see cref="SRFPlayChannel"/> class.
@@ -35,12 +37,14 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
/// <param name="contentRefreshService">The content refresh service.</param>
/// <param name="streamResolver">The stream resolver.</param>
/// <param name="proxyService">The stream proxy service.</param>
/// <param name="appHost">The server application host.</param>
/// <param name="categoryService">The category service (optional).</param>
public SRFPlayChannel(
ILoggerFactory loggerFactory,
ContentRefreshService contentRefreshService,
StreamUrlResolver streamResolver,
StreamProxyService proxyService,
IServerApplicationHost appHost,
CategoryService? categoryService = null)
{
_loggerFactory = loggerFactory;
@@ -48,6 +52,7 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
_contentRefreshService = contentRefreshService;
_streamResolver = streamResolver;
_proxyService = proxyService;
_appHost = appHost;
_categoryService = categoryService;
if (_categoryService == null)
@@ -471,9 +476,13 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
// Register stream with proxy service
_proxyService.RegisterStream(itemId, streamUrl);
// Get the server's local API URL so remote clients can access the proxy
// Use the published server address configured in Jellyfin's network settings
var serverUrl = _appHost.GetSmartApiUrl(string.Empty);
// Create proxy URL as absolute HTTP URL (required for ffmpeg)
// Use localhost as Jellyfin should be able to access its own endpoints
var proxyUrl = $"http://localhost:8096/Plugins/SRFPlay/Proxy/{itemId}/master.m3u8";
// Use the actual server URL so remote clients can access it
var proxyUrl = $"{serverUrl}/Plugins/SRFPlay/Proxy/{itemId}/master.m3u8";
// Build overview
var overview = chapter.Description ?? chapter.Lead;