Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Jan 22, 2022
1 parent b7cdc56 commit 4ef7d50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions YoutubeExplode/Playlists/PlaylistClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
Expand All @@ -8,6 +7,7 @@
using YoutubeExplode.Bridge;
using YoutubeExplode.Common;
using YoutubeExplode.Exceptions;
using YoutubeExplode.Videos;

namespace YoutubeExplode.Playlists;

Expand Down Expand Up @@ -94,10 +94,10 @@ public async IAsyncEnumerable<Batch<PlaylistVideo>> GetVideoBatchesAsync(
PlaylistId playlistId,
[EnumeratorCancellation] CancellationToken cancellationToken = default)
{
var encounteredIds = new HashSet<string>(StringComparer.Ordinal);
var visitorData = default(string?);
var lastVideoId = default(string?);
var encounteredIds = new HashSet<VideoId>();
var lastVideoId = default(VideoId?);
var lastVideoIndex = 0;
var visitorData = default(string?);

do
{
Expand Down
5 changes: 3 additions & 2 deletions YoutubeExplode/Playlists/PlaylistController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using YoutubeExplode.Bridge;
using YoutubeExplode.Exceptions;
using YoutubeExplode.Utils;
using YoutubeExplode.Videos;

namespace YoutubeExplode.Playlists;

Expand Down Expand Up @@ -55,7 +56,7 @@ public async ValueTask<PlaylistBrowseResponseExtractor> GetPlaylistBrowseRespons

public async ValueTask<PlaylistNextResponseExtractor> GetPlaylistNextResponseAsync(
PlaylistId playlistId,
string? videoId = null,
VideoId? videoId = null,
int index = 0,
string? visitorData = null,
CancellationToken cancellationToken = default)
Expand All @@ -65,7 +66,7 @@ public async ValueTask<PlaylistNextResponseExtractor> GetPlaylistNextResponseAsy
var payload = new Dictionary<string, object?>
{
["playlistId"] = playlistId.Value,
["videoId"] = videoId,
["videoId"] = videoId?.Value,
["playlistIndex"] = index,
["context"] = new Dictionary<string, object?>
{
Expand Down
1 change: 0 additions & 1 deletion YoutubeExplode/Search/SearchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public async IAsyncEnumerable<Batch<ISearchResult>> 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;
Expand Down

0 comments on commit 4ef7d50

Please sign in to comment.