Skip to content

Commit

Permalink
Handle Popular disabled case (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha authored Oct 4, 2023
1 parent e8fd7ee commit 6abd18a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- (potentionally) a bug where many dialogs could cause an execution timeout
- Mutltiple rare crashes when component content is set before component initialization
- Error dialog for loading "Popular" when "Popular" is disabled

## [0.13.0] - 2023-10-02

Expand Down
12 changes: 12 additions & 0 deletions playlet-lib/src/components/VideoFeed/VideoRowListRowContentTask.bs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ function VideoRowListRowContentTask(input as object) as object
success: true
}
end if

' Invidious returns 500 and "{"error":"Closed stream"}" when the Popular feed is disabled
' TODO:P2 check the endpoint.name instead of contentNode.title to avoid conflict with other feeds
if contentNode.title = "Popular" and response.error.instr("Closed stream") > 0
LogWarn("Deleting feed", contentNode.title, "-", response.error)
parent = contentNode.getParent()
parent.removeChild(contentNode)
return {
success: true
}
end if

contentNode.loadState = FeedLoadState.Error
contentNode.title += " (Failed to load)"
return response
Expand Down

0 comments on commit 6abd18a

Please sign in to comment.