Handle Popular disabled case (#162)
This commit is contained in:
1 parent
e8fd7ee35d
commit
6abd18ab85
2 files changed
+13
No files matched your search
@@ -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
|
- (potentionally) a bug where many dialogs could cause an execution timeout
|
||||||
- Mutltiple rare crashes when component content is set before component initialization
|
- 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
|
## [0.13.0] - 2023-10-02
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,18 @@ function VideoRowListRowContentTask(input as object) as object
|
|||||||
success: true
|
success: true
|
||||||
}
|
}
|
||||||
end if
|
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.loadState = FeedLoadState.Error
|
||||||
contentNode.title += " (Failed to load)"
|
contentNode.title += " (Failed to load)"
|
||||||
return response
|
return response
|
||||||
|
|||||||
Reference in new issue
Block a user