Skip to content

armgit / nota

Public Imported from GitHub
0

Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.

658 B
Raw Blame
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.

namespace Nota.Infrastructure;

/// <summary>IPresetLibrary over PresetService, mapping the on-disk DTO to the
/// browser-facing PresetInfo so callers never see the persistence model.</summary>
public sealed class PresetLibrary : IPresetLibrary
{
    public IReadOnlyList<PresetInfo> List(string folder)
    {
        var list = new List<PresetInfo>();
        foreach (var (path, doc) in PresetService.List(folder))
            list.Add(new PresetInfo(path, doc.DisplayName, doc.Type, doc.DeviceName));
        return list;
    }
}