From a1ce7aa9fc593439486ee6b26ae3eb5193537887 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Wed, 12 Nov 2025 14:56:10 -0500 Subject: [PATCH] [skip ci] errors related to loading the trending feeds. --- CHANGELOG.md | 1 + .../VideoFeed/VideoRowListRowContentJob.bs | 53 ++++++++++--------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3117ed93..59b07a75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Small change in post-live dvr detection - Issue where recommended videos are all "UPCOMING" paid content +- Errors related to loading the trending feeds. Trending will be removed from Playlet in a future release. ## [0.44.0] - 2025-11-09 diff --git a/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs b/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs index 8f2ece2f..70db3084 100644 --- a/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs +++ b/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs @@ -65,31 +65,9 @@ function ExecuteJob() as void }) if not response.success - if response.error = Invidious.ERROR_NOT_AUTHENTICATED - if feedSources.Count() = 1 - parent = feedContentNode.getParent() - if parent <> invalid - parent.removeChild(feedContentNode) - end if - JobSuccess() - return - end if - - continue while - end if - - if response.error.instr("Administrator has disabled this endpoint.") > -1 - LogWarnNoTelemetry(feedSource.endpoint, "feedSource not available:", response.error) - if feedSources.Count() = 1 - parent = feedContentNode.getParent() - if parent <> invalid - parent.removeChild(feedContentNode) - end if - JobSuccess() - return - end if - - continue while + if RemoveSingleFailedRow(response.error, feedSource, feedSources, feedContentNode) + JobSuccess() + return end if feedSource.state.loadState = FeedLoadState.Error @@ -243,6 +221,31 @@ function DeduplicateAppendAuthPlaylists(feedContentNode as object, itemNodes as return nodesToAdd.Count() end function +function RemoveSingleFailedRow(error as dynamic, feedSource as object, feedSources as object, feedContentNode as object) as boolean + error = ValidString(error) + LogWarnNoTelemetry(feedSource.id, "feedSource not available:", error) + + if feedSources.Count() <> 1 + return false + end if + + isError = error = Invidious.ERROR_NOT_AUTHENTICATED + isError = isError or error.instr("Administrator has disabled this endpoint") <> -1 + isError = isError or error.instr("API disabled") <> -1 + isError = isError or feedSource.id.instr("inv_trending") <> -1 + isError = isError or feedSource.id.instr("inv_popular") <> -1 + if not isError + return false + end if + + parent = feedContentNode.getParent() + if parent <> invalid + parent.removeChild(feedContentNode) + end if + + return true +end function + function HandleFeedLoadErrorDialog(error as object, isCancelled as boolean, rowList as object) as void error = ErrorUtils.Format(error) if isCancelled