Feature: All bussiness units get a tile
🏗️ Build Plugin / build (push) Successful in 43s
Latest Release / latest-release (push) Successful in 42s
🧪 Test Plugin / test (push) Successful in 29s

This commit is contained in:
2026-06-27 11:00:07 +02:00
parent 5667c2e12f
commit 7a719ee4ac
20 changed files with 413 additions and 59 deletions
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.SRFPlay.Services.Interfaces;
using Jellyfin.Plugin.SRFPlay.Utilities;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
@@ -63,20 +64,25 @@ public class ContentRefreshTask : IScheduledTask
return;
}
// Refresh latest content
if (config.EnableLatestContent)
// Refresh content for every enabled business unit (one channel per unit).
var units = config.ResolveEnabledUnits();
foreach (var unit in units)
{
_logger.LogInformation("Refreshing latest content");
progress?.Report(25);
await _contentRefreshService.RefreshLatestContentAsync(cancellationToken).ConfigureAwait(false);
}
var businessUnit = unit.ToLowerString();
// Refresh trending content
if (config.EnableTrendingContent)
{
_logger.LogInformation("Refreshing trending content");
progress?.Report(75);
await _contentRefreshService.RefreshTrendingContentAsync(cancellationToken).ConfigureAwait(false);
if (config.EnableLatestContent)
{
_logger.LogInformation("Refreshing latest content for {BusinessUnit}", businessUnit);
progress?.Report(25);
await _contentRefreshService.RefreshLatestContentAsync(businessUnit, cancellationToken).ConfigureAwait(false);
}
if (config.EnableTrendingContent)
{
_logger.LogInformation("Refreshing trending content for {BusinessUnit}", businessUnit);
progress?.Report(75);
await _contentRefreshService.RefreshTrendingContentAsync(businessUnit, cancellationToken).ConfigureAwait(false);
}
}
progress?.Report(100);