diff --git a/YoutubeExplode/Playlists/PlaylistClient.cs b/YoutubeExplode/Playlists/PlaylistClient.cs index 1e328583..cfa25c67 100644 --- a/YoutubeExplode/Playlists/PlaylistClient.cs +++ b/YoutubeExplode/Playlists/PlaylistClient.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -8,6 +7,7 @@ using YoutubeExplode.Bridge; using YoutubeExplode.Common; using YoutubeExplode.Exceptions; +using YoutubeExplode.Videos; namespace YoutubeExplode.Playlists; @@ -94,10 +94,10 @@ public async IAsyncEnumerable> GetVideoBatchesAsync( PlaylistId playlistId, [EnumeratorCancellation] CancellationToken cancellationToken = default) { - var encounteredIds = new HashSet(StringComparer.Ordinal); - var visitorData = default(string?); - var lastVideoId = default(string?); + var encounteredIds = new HashSet(); + var lastVideoId = default(VideoId?); var lastVideoIndex = 0; + var visitorData = default(string?); do { diff --git a/YoutubeExplode/Playlists/PlaylistController.cs b/YoutubeExplode/Playlists/PlaylistController.cs index 3d96016a..19c10c88 100644 --- a/YoutubeExplode/Playlists/PlaylistController.cs +++ b/YoutubeExplode/Playlists/PlaylistController.cs @@ -5,6 +5,7 @@ using YoutubeExplode.Bridge; using YoutubeExplode.Exceptions; using YoutubeExplode.Utils; +using YoutubeExplode.Videos; namespace YoutubeExplode.Playlists; @@ -55,7 +56,7 @@ public async ValueTask GetPlaylistBrowseRespons public async ValueTask GetPlaylistNextResponseAsync( PlaylistId playlistId, - string? videoId = null, + VideoId? videoId = null, int index = 0, string? visitorData = null, CancellationToken cancellationToken = default) @@ -65,7 +66,7 @@ public async ValueTask GetPlaylistNextResponseAsy var payload = new Dictionary { ["playlistId"] = playlistId.Value, - ["videoId"] = videoId, + ["videoId"] = videoId?.Value, ["playlistIndex"] = index, ["context"] = new Dictionary { diff --git a/YoutubeExplode/Search/SearchClient.cs b/YoutubeExplode/Search/SearchClient.cs index febfd35e..e6448dad 100644 --- a/YoutubeExplode/Search/SearchClient.cs +++ b/YoutubeExplode/Search/SearchClient.cs @@ -132,7 +132,6 @@ public async IAsyncEnumerable> GetResultBatchesAsync( // System playlists have no author var channelId = playlistExtractor.TryGetPlaylistChannelId(); var channelTitle = playlistExtractor.TryGetPlaylistAuthor(); - var author = channelId is not null && channelTitle is not null ? new Author(channelId, channelTitle) : null;