From 06120c6087cb733522b6bbdbed977917ee4c3d57 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Mon, 7 Nov 2022 16:28:53 -0500 Subject: [PATCH] Fix --- src/components/UILogic/VideoPlayerLogic.brs | 8 +++++++- src/source/services/Invidious.bs | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/UILogic/VideoPlayerLogic.brs b/src/components/UILogic/VideoPlayerLogic.brs index 5a1f9503..d923b4f8 100644 --- a/src/components/UILogic/VideoPlayerLogic.brs +++ b/src/components/UILogic/VideoPlayerLogic.brs @@ -51,8 +51,14 @@ end sub sub OnVideoPlayerStateChange() state = m.videoPlayer.state + ' If we successfully played the video, then any error that comes later is not due to rate limiting. + ' This is to reduce false positives, as we do not want retry another link if the first link is working fine. + if state = "playing" + m.videoPlayingSuccess = true + end if + ' A hack to see if we could use the proxy here - if state = "error" + if state = "error" and m.videoPlayingSuccess <> true errorInfo = m.videoPlayer.errorInfo if errorInfo.category = "http" url = m.videoPlayer.content.url diff --git a/src/source/services/Invidious.bs b/src/source/services/Invidious.bs index e00b4fa5..665942b4 100644 --- a/src/source/services/Invidious.bs +++ b/src/source/services/Invidious.bs @@ -85,6 +85,7 @@ namespace RokuYoutube.Services.Invidious url: videoUrl }) end if + return videoMetadata end function function SearchSuggestions(q as string) as SearchSuggestionResult