[CHANGE] Adding playlist functionality
This commit is contained in:
@@ -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>
|
||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
13
Manager.YouTube/Models/Playlist/PlaylistVideo.cs
Normal file
13
Manager.YouTube/Models/Playlist/PlaylistVideo.cs
Normal 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; }
|
||||||
|
}
|
||||||
19
Manager.YouTube/Models/YouTubePlaylist.cs
Normal file
19
Manager.YouTube/Models/YouTubePlaylist.cs
Normal 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; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user