Skip to content
Snippets Groups Projects
Commit c2dce52a authored by Kelvin's avatar Kelvin
Browse files

Fix Twitch live streams on channel, hasMore can now be nullable defaulting to false

parent a2c63c59
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import com.futo.platformplayer.BuildConfig
import com.futo.platformplayer.api.media.platforms.js.SourcePluginConfig
import com.futo.platformplayer.api.media.structures.IPager
import com.futo.platformplayer.engine.V8Plugin
import com.futo.platformplayer.getOrDefault
import com.futo.platformplayer.getOrThrow
import com.futo.platformplayer.warnIfMainThread
......@@ -27,7 +28,7 @@ abstract class JSPager<T> : IPager<T> {
this.pager = pager;
this.config = config;
_hasMorePages = pager.getOrThrow(config, "hasMore", "Pager");
_hasMorePages = pager.getOrDefault(config, "hasMore", "Pager", false) ?: false;
getResults();
}
......@@ -45,7 +46,7 @@ abstract class JSPager<T> : IPager<T> {
pager = plugin.catchScriptErrors("[${plugin.config.name}] JSPager", "pager.nextPage()") {
pager.invoke("nextPage", arrayOf<Any>());
};
_hasMorePages = pager.getOrThrow(config, "hasMore", "Pager");
_hasMorePages = pager.getOrDefault(config, "hasMore", "Pager", false) ?: false;
_resultChanged = true;
/*
try {
......
Subproject commit 7645b88a768d1a1c1ea7e4a94abd97362bd5ce17
Subproject commit eb198a3d2095f0df28508e8481eebdccdd2a222a
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment