Skip to content

Commit

Permalink
disable flightaware code
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcoombs2000 committed Sep 15, 2024
1 parent 91040d0 commit 7247f57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Features/Routes/Services/FlightAwareRouteService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task<AirportPairRouteSummary> FetchRoutesAsync(string departureIcao

// Open FlightAware IFR routing page
var client = httpClientFactory.CreateClient();
client.DefaultRequestHeaders.UserAgent.TryParseAdd("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36");//Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0");
client.DefaultRequestHeaders.UserAgent.TryParseAdd("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0");
await using var stream = await client.GetStreamAsync(MakeUrl(departureIcao, arrivalIcao));
var parser = new HtmlParser();
using var document = await parser.ParseDocumentAsync(stream);
Expand Down
12 changes: 6 additions & 6 deletions Features/Routes/UI/Pages/Routes.razor
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@
&& r.ArrivalAirportRegex.IsMatch(arrivalIcao));

_showFlightAwareLoading = true;
try
{
_displayedFlightAwareRoutes = await FlightAware.FetchRoutesAsync(departureIcao, arrivalIcao);
_isFlightAwareError = false;
}
catch (Exception)
//try
//{
//_displayedFlightAwareRoutes = await FlightAware.FetchRoutesAsync(departureIcao, arrivalIcao);
// _isFlightAwareError = false;
//}
//catch (Exception)
{
_displayedFlightAwareRoutes = null;
_isFlightAwareError = true;
Expand Down

0 comments on commit 7247f57

Please sign in to comment.