Fix for removing invalid playlists from bookmarks (#422)
This commit is contained in:
1 parent
d915efd2b1
commit
65509298a3
3 files changed
+33
-5
No files matched your search
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- A bug where a the right video will not play if selected too quickly
|
- A bug where a the right video will not play if selected too quickly
|
||||||
|
- A bug where a bookmarked but deleted playlist can't be removed from bookmarks
|
||||||
|
|
||||||
## [0.24.5] - 2024-07-03
|
## [0.24.5] - 2024-07-03
|
||||||
|
|
||||||
|
|||||||
@@ -354,7 +354,20 @@ namespace Invidious
|
|||||||
function PlaylistHandler(context as object) as object
|
function PlaylistHandler(context as object) as object
|
||||||
response = context.response
|
response = context.response
|
||||||
|
|
||||||
if response.StatusCode() = 200
|
statusCode = response.StatusCode()
|
||||||
|
if statusCode = 404
|
||||||
|
response.OverrideStatusCode(200)
|
||||||
|
return {
|
||||||
|
isLastPage: true
|
||||||
|
items: [{
|
||||||
|
"type": "playlist"
|
||||||
|
"playlistId": context.feedSource.pathParams.plid
|
||||||
|
"title": "[Playlist not found]"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
end if
|
||||||
|
|
||||||
|
if statusCode = 200
|
||||||
json = response.Json()
|
json = response.Json()
|
||||||
return {
|
return {
|
||||||
items: json.videos
|
items: json.videos
|
||||||
@@ -391,7 +404,6 @@ namespace Invidious
|
|||||||
|
|
||||||
function VideoInfoHandler(context as object) as object
|
function VideoInfoHandler(context as object) as object
|
||||||
response = context.response
|
response = context.response
|
||||||
feedSource = context.feedSource
|
|
||||||
|
|
||||||
statusCode = response.StatusCode()
|
statusCode = response.StatusCode()
|
||||||
if statusCode >= 500
|
if statusCode >= 500
|
||||||
@@ -403,8 +415,9 @@ namespace Invidious
|
|||||||
response.OverrideStatusCode(200)
|
response.OverrideStatusCode(200)
|
||||||
return {
|
return {
|
||||||
items: [{
|
items: [{
|
||||||
"videoId": feedSource.pathParams.id
|
|
||||||
"type": "video"
|
"type": "video"
|
||||||
|
"videoId": context.feedSource.pathParams.id
|
||||||
|
"title": "[Video not available]"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
@@ -423,7 +436,19 @@ namespace Invidious
|
|||||||
function PlaylistInfoHandler(context as object) as object
|
function PlaylistInfoHandler(context as object) as object
|
||||||
response = context.response
|
response = context.response
|
||||||
|
|
||||||
if response.StatusCode() = 200
|
statusCode = response.StatusCode()
|
||||||
|
if statusCode = 404
|
||||||
|
response.OverrideStatusCode(200)
|
||||||
|
return {
|
||||||
|
items: [{
|
||||||
|
"type": "playlist"
|
||||||
|
"playlistId": context.feedSource.pathParams.plid
|
||||||
|
"title": "[Playlist not found]"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
end if
|
||||||
|
|
||||||
|
if statusCode = 200
|
||||||
json = response.Json()
|
json = response.Json()
|
||||||
json.type = "playlist"
|
json.type = "playlist"
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -116,7 +116,9 @@ function VideoRowListRowContentTask(input as object) as object
|
|||||||
|
|
||||||
if response.result.items.Count() > 0
|
if response.result.items.Count() > 0
|
||||||
pageType = feedSource.state.paginationType
|
pageType = feedSource.state.paginationType
|
||||||
if pageType = PaginationType.Continuation and hasContinuation
|
if response.result.isLastPage = true
|
||||||
|
feedSource.state.loadState = FeedLoadState.Loaded
|
||||||
|
else if pageType = PaginationType.Continuation and hasContinuation
|
||||||
feedSource.state.loadState = FeedLoadState.LoadedPage
|
feedSource.state.loadState = FeedLoadState.LoadedPage
|
||||||
else if pageType = PaginationType.Pages
|
else if pageType = PaginationType.Pages
|
||||||
feedSource.state.loadState = FeedLoadState.LoadedPage
|
feedSource.state.loadState = FeedLoadState.LoadedPage
|
||||||
|
|||||||
Reference in new issue
Block a user