cache data for xmltv (#1228)
* cache channel list for xmltv * used cached channel data for xmltv * fixes * update changelog
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Threading.Channels;
|
||||
using Bugsnag;
|
||||
using ErsatzTV.Application;
|
||||
using ErsatzTV.Application.Channels;
|
||||
using ErsatzTV.Application.Emby;
|
||||
using ErsatzTV.Application.Jellyfin;
|
||||
using ErsatzTV.Application.Maintenance;
|
||||
@@ -91,6 +92,7 @@ public class SchedulerService : BackgroundService
|
||||
try
|
||||
{
|
||||
await DeleteOrphanedArtwork(cancellationToken);
|
||||
await RefreshChannelGuideChannelList(cancellationToken);
|
||||
await BuildPlayouts(cancellationToken);
|
||||
#if !DEBUG_NO_SYNC
|
||||
await ScanLocalMediaSources(cancellationToken);
|
||||
@@ -185,6 +187,9 @@ public class SchedulerService : BackgroundService
|
||||
}
|
||||
}
|
||||
|
||||
private ValueTask RefreshChannelGuideChannelList(CancellationToken cancellationToken) =>
|
||||
_workerChannel.WriteAsync(new RefreshChannelList(), cancellationToken);
|
||||
|
||||
private async Task ScanLocalMediaSources(CancellationToken cancellationToken)
|
||||
{
|
||||
using IServiceScope scope = _serviceScopeFactory.CreateScope();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Threading.Channels;
|
||||
using Bugsnag;
|
||||
using ErsatzTV.Application;
|
||||
using ErsatzTV.Application.Channels;
|
||||
using ErsatzTV.Application.Maintenance;
|
||||
using ErsatzTV.Application.MediaCollections;
|
||||
using ErsatzTV.Application.Playouts;
|
||||
@@ -47,6 +48,12 @@ public class WorkerService : BackgroundService
|
||||
|
||||
switch (request)
|
||||
{
|
||||
case RefreshChannelList refreshChannelList:
|
||||
await mediator.Send(refreshChannelList, cancellationToken);
|
||||
break;
|
||||
case RefreshChannelData refreshChannelData:
|
||||
await mediator.Send(refreshChannelData, cancellationToken);
|
||||
break;
|
||||
case BuildPlayout buildPlayout:
|
||||
Either<BaseError, Unit> buildPlayoutResult = await mediator.Send(
|
||||
buildPlayout,
|
||||
|
||||
Reference in New Issue
Block a user