refactor to unify data fetching and define abstract API for re-use
🏗️ Build Plugin / build (push) Successful in 2m35s
🧪 Test Plugin / test (push) Successful in 1m14s

This commit is contained in:
2025-12-06 17:29:05 +01:00
parent 0fea57a4f9
commit a0e7663323
26 changed files with 595 additions and 254 deletions
@@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.SRFPlay.Services;
using Jellyfin.Plugin.SRFPlay.Services.Interfaces;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
@@ -14,7 +14,7 @@ namespace Jellyfin.Plugin.SRFPlay.ScheduledTasks;
public class ContentRefreshTask : IScheduledTask
{
private readonly ILogger<ContentRefreshTask> _logger;
private readonly ContentRefreshService _contentRefreshService;
private readonly IContentRefreshService _contentRefreshService;
/// <summary>
/// Initializes a new instance of the <see cref="ContentRefreshTask"/> class.
@@ -23,7 +23,7 @@ public class ContentRefreshTask : IScheduledTask
/// <param name="contentRefreshService">The content refresh service.</param>
public ContentRefreshTask(
ILogger<ContentRefreshTask> logger,
ContentRefreshService contentRefreshService)
IContentRefreshService contentRefreshService)
{
_logger = logger;
_contentRefreshService = contentRefreshService;
@@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.SRFPlay.Services;
using Jellyfin.Plugin.SRFPlay.Services.Interfaces;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
@@ -14,7 +14,7 @@ namespace Jellyfin.Plugin.SRFPlay.ScheduledTasks;
public class ExpirationCheckTask : IScheduledTask
{
private readonly ILogger<ExpirationCheckTask> _logger;
private readonly ContentExpirationService _expirationService;
private readonly IContentExpirationService _expirationService;
/// <summary>
/// Initializes a new instance of the <see cref="ExpirationCheckTask"/> class.
@@ -23,7 +23,7 @@ public class ExpirationCheckTask : IScheduledTask
/// <param name="expirationService">The content expiration service.</param>
public ExpirationCheckTask(
ILogger<ExpirationCheckTask> logger,
ContentExpirationService expirationService)
IContentExpirationService expirationService)
{
_logger = logger;
_expirationService = expirationService;