using ErsatzTV.Application.Emby; using ErsatzTV.Application.Jellyfin; using ErsatzTV.Application.Plex; namespace ErsatzTV.Controllers.Api.Requests; public record ReplacePathReplacementsRequest(List Items) { public UpdatePlexPathReplacements ToPlexCommand(int sourceId) => new( sourceId, (Items ?? []) .Select(item => new PlexPathReplacementItem(item.Id, item.RemotePath, item.LocalPath)) .ToList()); public UpdateJellyfinPathReplacements ToJellyfinCommand(int sourceId) => new( sourceId, (Items ?? []) .Select(item => new JellyfinPathReplacementItem(item.Id, item.RemotePath, item.LocalPath)) .ToList()); public UpdateEmbyPathReplacements ToEmbyCommand(int sourceId) => new( sourceId, (Items ?? []) .Select(item => new EmbyPathReplacementItem(item.Id, item.RemotePath, item.LocalPath)) .ToList()); }