Support for channel "Courses" in Playlet backend
This commit is contained in:
1 parent
28c10022bd
commit
2f8679bc1c
5 files changed
+24
-1
No files matched your search
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Support for channel "Courses" in Playlet backend
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Web app tech refresh
|
- Web app tech refresh
|
||||||
|
|||||||
@@ -215,6 +215,9 @@ function InitializeTabs()
|
|||||||
"playlists": function(authorId as string, author as string, params as string) as object
|
"playlists": function(authorId as string, author as string, params as string) as object
|
||||||
return CreateChannelFeed("Playlists", "channel_playlists", authorId, author, params)
|
return CreateChannelFeed("Playlists", "channel_playlists", authorId, author, params)
|
||||||
end function
|
end function
|
||||||
|
"courses": function(authorId as string, author as string, params as string) as object
|
||||||
|
return CreateChannelFeed("Courses", "channel_courses", authorId, author, params)
|
||||||
|
end function
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -442,6 +442,14 @@ namespace Invidious
|
|||||||
|
|
||||||
if response.StatusCode() = 200
|
if response.StatusCode() = 200
|
||||||
json = response.Json()
|
json = response.Json()
|
||||||
|
' Courses are not yet implemented in Invidious.
|
||||||
|
' In this case, Invidious returns 200, but the response is empty.
|
||||||
|
if json = invalid
|
||||||
|
json = {
|
||||||
|
playlists: []
|
||||||
|
}
|
||||||
|
end if
|
||||||
|
|
||||||
return {
|
return {
|
||||||
items: json.playlists
|
items: json.playlists
|
||||||
continuation: json.continuation
|
continuation: json.continuation
|
||||||
|
|||||||
+1
-1
@@ -496,7 +496,7 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if _tab = "playlists" or _tab = "podcasts" or _tab = "releases"
|
if _tab = "playlists" or _tab = "podcasts" or _tab = "releases" or _tab = "courses"
|
||||||
result = {
|
result = {
|
||||||
"playlists": channel.items
|
"playlists": channel.items
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,6 +166,14 @@ channel_releases:
|
|||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
tryCount: 3
|
tryCount: 3
|
||||||
|
|
||||||
|
# This is implemented only by Playlet backend.
|
||||||
|
channel_courses:
|
||||||
|
title: Channel courses
|
||||||
|
url: /api/v1/channels/{ucid}/courses
|
||||||
|
responseHandler: ChannelPlaylistsHandler
|
||||||
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
|
|
||||||
# This is implemented only by Playlet backend.
|
# This is implemented only by Playlet backend.
|
||||||
# Created because auto-generated channels don't have tabs except for "featured"
|
# Created because auto-generated channels don't have tabs except for "featured"
|
||||||
channel_featured:
|
channel_featured:
|
||||||
|
|||||||
Reference in new issue
Block a user