Support for auto-generated channels in Playlet backend
This commit is contained in:
1 parent
0f6266afa4
commit
889a502731
3 files changed
+19
No files matched your search
@@ -114,6 +114,13 @@ function CreateChannelFeeds(authorId as string, author as string, tabs as object
|
||||
feeds.Push(m.tabs[tabName](authorId, author, params))
|
||||
end if
|
||||
end for
|
||||
|
||||
' If we're dealing with an auto-generated channel, we might not have any tabs at all.
|
||||
' In this case, it's better to show "home" instead of nothing at all.
|
||||
if feeds.Count() = 0 and tabs.Count() > 0 and tabsParams <> invalid and tabsParams["featured"] <> invalid
|
||||
feeds.Push(CreateChannelFeed("Home", "channel_featured", authorId, author, tabsParams["featured"]))
|
||||
end if
|
||||
|
||||
return feeds
|
||||
end function
|
||||
|
||||
|
||||
@@ -165,6 +165,14 @@ channel_releases:
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
|
||||
# This is implemented only by Playlet backend.
|
||||
# Created because auto-generated channels don't have tabs except for "featured"
|
||||
channel_featured:
|
||||
title: Channel Home
|
||||
url: /api/v1/channels/{ucid}/featured
|
||||
responseHandler: ChannelVideosHandler
|
||||
paginationType: Continuation
|
||||
|
||||
watch_history:
|
||||
title: Watch history
|
||||
url: /api/v1/auth/history
|
||||
|
||||
Reference in new issue
Block a user