You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.TrashLib/Repo/ConfigTemplatesRepo.cs

27 lines
748 B

using System.IO.Abstractions;
using Recyclarr.Common.Extensions;
using Recyclarr.TrashLib.Settings;
using Recyclarr.TrashLib.Startup;
namespace Recyclarr.TrashLib.Repo;
public class ConfigTemplatesRepo : IConfigTemplatesRepo
{
private readonly IRepoUpdater _repoUpdater;
private readonly ISettingsProvider _settings;
public ConfigTemplatesRepo(IRepoUpdater repoUpdater, IAppPaths paths, ISettingsProvider settings)
{
_repoUpdater = repoUpdater;
_settings = settings;
Path = paths.ReposDirectory.SubDir("config-templates");
}
public IDirectoryInfo Path { get; }
public Task Update()
{
return _repoUpdater.UpdateRepo(Path, _settings.Settings.Repositories.ConfigTemplates);
}
}