From df3b6bfd571c38aa7099838aa43bb3aff0eff2bf Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 14 May 2024 17:24:31 +0200 Subject: feat: add DownloadOptions importer (fetches pre-built options.json) --- internal/importer/importer.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'internal/importer/importer.go') diff --git a/internal/importer/importer.go b/internal/importer/importer.go index b66b6d3..c50a72b 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -42,6 +42,20 @@ func NewChannelImporter( } } +func NewDownloadOptionsImporter( + source *config.Source, + dataPath string, + logger *slog.Logger, +) *DownloadOptionsImporter { + fullpath := path.Join(dataPath, source.Channel) + + return &DownloadOptionsImporter{ + DataPath: fullpath, + Source: source, + Logger: logger, + } +} + type importConfig struct { Filename string Source *config.Source -- cgit 1.4.1