Support for channel "Courses" in Playlet backend

This commit is contained in:
Brahim Hadriche committed 2025-01-16 17:44:56 -05:00
1 parent 28c10022bd
commit 2f8679bc1c
5 files changed
+24 -1

No files matched your search

@@ -215,6 +215,9 @@ function InitializeTabs()
"playlists": function(authorId as string, author as string, params as string) as object
return CreateChannelFeed("Playlists", "channel_playlists", authorId, author, params)
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
@@ -442,6 +442,14 @@ namespace Invidious
if response.StatusCode() = 200
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 {
items: json.playlists
continuation: json.continuation
@@ -496,7 +496,7 @@ namespace Http
return true
end if
if _tab = "playlists" or _tab = "podcasts" or _tab = "releases"
if _tab = "playlists" or _tab = "podcasts" or _tab = "releases" or _tab = "courses"
result = {
"playlists": channel.items
}