Skip to content

Commit

Permalink
Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry08 committed Sep 2, 2023
1 parent 4995306 commit 8a7f8d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Yosu.Youtube.Core/Resolving/QueryResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Yosu.Youtube.Core.Resolving;

public class QueryResolver
{
private readonly YoutubeClient _youtube = new(Http.Client);
private YoutubeClient _youtube = new(Http.Client);

public async Task<QueryResult> ResolveAsync(
string query,
Expand Down Expand Up @@ -74,6 +74,8 @@ public async Task<QueryResult> ResolveAsync(

// Search
{
_youtube = new();

var videos = await _youtube.Search.GetVideosAsync(query, cancellationToken).CollectAsync(20);
return new QueryResult(QueryResultKind.Search, $"Search: {query}", videos);
}
Expand Down

0 comments on commit 8a7f8d6

Please sign in to comment.