Trigger the Plex Job when we clear the data out to resync

This commit is contained in:
tidusjar 2021-02-01 22:14:22 +00:00
parent 296ceeb762
commit f63f74ef13

View file

@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Ombi.Core.Settings; using Ombi.Core.Settings;
@ -106,6 +107,9 @@ namespace Ombi.Schedule.Jobs.Ombi
await _plexRepo.ExecuteSql(episodeSQL); await _plexRepo.ExecuteSql(episodeSQL);
await _plexRepo.ExecuteSql(seasonsSql); await _plexRepo.ExecuteSql(seasonsSql);
await _plexRepo.ExecuteSql(mainSql); await _plexRepo.ExecuteSql(mainSql);
await OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IPlexContentSync), "Plex"), new JobDataMap(new Dictionary<string, string> { { "recentlyAddedSearch", "false" } }));
} }
catch (Exception e) catch (Exception e)
{ {