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/TrashGuidesRepo.cs

27 lines
728 B

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