[CHANGE] Added video info page

This commit is contained in:
max
2025-11-02 21:22:56 +01:00
parent bf957436f0
commit a849b7524d
5 changed files with 295 additions and 19 deletions

View File

@@ -35,22 +35,6 @@ public partial class DevelopmentVideo : ComponentBase
Snackbar.Add("Video ID needs to have an length of 11 chars!", Severity.Warning);
}
var clientResult = await ClientService.LoadClientByIdAsync(_selectedClient.Id);
if (!clientResult.IsSuccess)
{
Snackbar.Add(clientResult.Error?.Description ?? $"Failed to get client with id: {_selectedClient.Id}", Severity.Error);
return;
}
var ytClient = clientResult.Value;
var videoResult = await ytClient.GetVideoByIdAsync(_videoId);
if (!videoResult.IsSuccess)
{
Snackbar.Add(videoResult.Error?.Description ?? $"Failed to load video: {_videoId}", Severity.Error);
return;
}
var ytVideo = videoResult.Value;
Snackbar.Add($"Loaded video {ytVideo.Title}", Severity.Success);
NavigationManager.NavigateTo($"/video/{_videoId}?clientId={_selectedClient.Id}");
}
}