Intercept non-implemented getChannelPlaylists

This commit is contained in:
Kelvin 2024-05-27 01:15:37 +02:00
parent a3070d8d08
commit 152b9b23cd

View file

@ -409,6 +409,8 @@ open class JSClient : IPlatformClient {
@JSDocsParameter("channelUrl", "A channel url (this platform)")
override fun getChannelPlaylists(channelUrl: String): IPager<IPlatformPlaylist> = isBusyWith("getChannelPlaylists") {
ensureEnabled();
if(!capabilities.hasGetChannelPlaylists)
return@isBusyWith EmptyPager();
return@isBusyWith JSPlaylistPager(config, this,
plugin.executeTyped("source.getChannelPlaylists(${Json.encodeToString(channelUrl)})"));
}