[REFACTOR] Rename response

This commit is contained in:
max
2025-10-23 21:36:16 +02:00
parent 25589d18d8
commit 264be8d529

View File

@@ -87,13 +87,13 @@ public sealed class YouTubeClient : IDisposable
var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"{NetworkService.Origin}/watch?v={videoId}")); var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"{NetworkService.Origin}/watch?v={videoId}"));
var response = await NetworkService.MakeRequestAsync(request, this, true, cancellationToken); var videoResponse = await NetworkService.MakeRequestAsync(request, this, true, cancellationToken);
if (!response.IsSuccess && !string.IsNullOrWhiteSpace(response.Value)) if (!videoResponse.IsSuccess && !string.IsNullOrWhiteSpace(videoResponse.Value))
{ {
return response.Error ?? ResultError.Fail("Request failed!"); return videoResponse.Error ?? ResultError.Fail("Request failed!");
} }
var html = response.Value; var html = videoResponse.Value;
var stateResult = GetClientStateFromHtml(html); var stateResult = GetClientStateFromHtml(html);
var state = stateResult.Value; var state = stateResult.Value;
@@ -102,7 +102,6 @@ public sealed class YouTubeClient : IDisposable
state = State; state = State;
} }
var htmlParseResult = HtmlParser.GetVideoDataFromHtml(html); var htmlParseResult = HtmlParser.GetVideoDataFromHtml(html);
if (!htmlParseResult.IsSuccess) if (!htmlParseResult.IsSuccess)
{ {