[CHANGE] Adding playlist functionality

This commit is contained in:
max
2025-11-02 21:43:06 +01:00
parent a849b7524d
commit 3d20c116da
4 changed files with 34 additions and 2 deletions

View File

@@ -13,5 +13,5 @@
<MudTextField Label="Video id" @bind-Value="@_videoId"/> <MudTextField Label="Video id" @bind-Value="@_videoId"/>
</MudStack> </MudStack>
<MudStack> <MudStack>
<MudButton OnClick="GetDataAsync">Get data</MudButton> <MudButton OnClick="NavigateToVideo">Get data</MudButton>
</MudStack> </MudStack>

View File

@@ -16,7 +16,7 @@ public partial class DevelopmentVideo : ComponentBase
return !searchResults.IsSuccess ? [] : searchResults.Value; return !searchResults.IsSuccess ? [] : searchResults.Value;
} }
private async Task GetDataAsync(MouseEventArgs obj) private void NavigateToVideo(MouseEventArgs obj)
{ {
if (_selectedClient == null) if (_selectedClient == null)
{ {

View File

@@ -0,0 +1,13 @@
using Manager.YouTube.Models.Innertube;
namespace Manager.YouTube.Models.Playlist;
public class PlaylistVideo
{
public required string VideoId { get; set; }
public List<WebImage> Thumbnails { get; set; } = [];
public required string Title { get; set; }
public required string Author { get; set; }
public long LengthSeconds { get; set; }
public bool IsPlayable { get; set; }
}

View File

@@ -0,0 +1,19 @@
using Manager.YouTube.Models.Playlist;
namespace Manager.YouTube.Models;
public class YouTubePlaylist
{
public required string Id { get; set; }
public required string Title { get; set; }
public required string Description { get; set; }
public required string Owner { get; set; }
public required string OwnerId { get; set; }
public bool NoIndex { get; set; }
public bool Unlisted { get; set; }
public bool CanReorder { get; set; }
public bool IsEditable { get; set; }
public List<PlaylistVideo> Videos { get; set; } = [];
public string? ContinuationToken { get; set; }
}