Innertube continuations (#522)

* Search continuations

* add another type of playlists

* Continuation for search and channels working

* Playlist continuation

* Fix pagination - what a fucking mess I've created

* web app fix

* Changelog
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2024-12-25 14:07:48 -05:00
1 parent f6e23ad7d9
commit e23da56b37
15 files changed
+293 -96

No files matched your search

@@ -7,7 +7,8 @@
<field id="loadState" type="string" />
<!-- index in a feed -->
<field id="feedSourcesIndex" type="integer" value="-1" />
<!--
<field id="continuation" type="string" />
<!--
For some strange reason, the "author" field can only be set once.
If you try to set it again, it will not be updated, with type mismatch warning:
@@ -18,7 +18,10 @@ function PlaylistContentTask(input as object) as object
while true
index = contentNode.getChildCount()
response = service.GetPlaylist(contentNode.playlistId, index, m.top.cancellation)
continuation = contentNode.continuation
hadContinuation = not StringUtils.IsNullOrEmpty(continuation)
response = service.GetPlaylist(contentNode.playlistId, index, continuation, m.top.cancellation)
if m.top.cancel
contentNode.loadState = FeedLoadState.None
@@ -59,7 +62,8 @@ function PlaylistContentTask(input as object) as object
videoCount = ValidInt(metadata.videoCount)
if metadata.videos.Count() = 0 or childCount >= videoCount
hasContinuation = not StringUtils.IsNullOrEmpty(metadata.continuation)
if (hadContinuation and not hasContinuation) or (metadata.videos.Count() = 0 or childCount >= videoCount)
contentNode.loadState = FeedLoadState.Loaded
return {
success: true