@page "/ffmpeg" @using ErsatzTV.Application.FFmpegProfiles @using ErsatzTV.Application.FFmpegProfiles.Commands @using ErsatzTV.Application.FFmpegProfiles.Queries @inject IDialogService _dialog @inject IMediator _mediator @inject ILogger _logger @inject ISnackbar _snackbar @inject NavigationManager _navigationManager FFmpeg Profiles Colored settings will be normalized Name Transcode Resolution Video Codec Audio Codec @context.Name @(context.Transcode ? "Yes" : "No") @context.Resolution.Name @context.VideoCodec @context.AudioCodec
Add Profile
@code { private List _ffmpegProfiles; protected override async Task OnParametersSetAsync() => await LoadFFmpegProfilesAsync(); private async Task LoadFFmpegProfilesAsync() => _ffmpegProfiles = await _mediator.Send(new GetAllFFmpegProfiles()); private async Task DeleteProfileAsync(FFmpegProfileViewModel ffmpegProfile) { var parameters = new DialogParameters { { "EntityType", "ffmpeg profile" }, { "EntityName", ffmpegProfile.Name } }; var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall }; IDialogReference dialog = _dialog.Show("Delete FFmpeg Profile", parameters, options); DialogResult result = await dialog.Result; if (!result.Cancelled) { await _mediator.Send(new DeleteFFmpegProfile(ffmpegProfile.Id)); await LoadFFmpegProfilesAsync(); } } private async Task CopyProfileAsync(FFmpegProfileViewModel ffmpegProfile) { var parameters = new DialogParameters { { "FFmpegProfileId", ffmpegProfile.Id } }; var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall }; IDialogReference dialog = _dialog.Show("Copy FFmpeg Profile", parameters, options); DialogResult dialogResult = await dialog.Result; if (!dialogResult.Cancelled && dialogResult.Data is FFmpegProfileViewModel data) { _navigationManager.NavigateTo($"/ffmpeg/{data.Id}"); } } }