invidious icon indicating copy to clipboard operation
invidious copied to clipboard

Update pagination logic when searching to add videos to a playlist

Open ChunkyProgrammer opened this issue 10 months ago • 5 comments

The old logic would filter the results and use the count of the filtered results to determine if a next page should be shown. If there were playlists or channels then the next page button would not be shown even if there was a next page.

ChunkyProgrammer avatar Apr 02 '24 17:04 ChunkyProgrammer

That's much simpler than what I had in mind ^^ (which involved returning the continuation token from very far in the call stack)

SamantazFox avatar Apr 10 '24 21:04 SamantazFox

Still doesn't work.

~~That's probably because we skip the categories (e.g "Latest (shorts) from [channel]" and "People also watched").~~ I'd bet it's caused by "Latest posts from [channel]", as this type of search result are not supported yet.

Here I tested searching for linus tech tips on the test instance, and there is no button:

image

SamantazFox avatar Apr 23 '24 16:04 SamantazFox

@SamantazFox yeah, looks like this PR isnt working because https://github.com/iv-org/invidious/issues/4583 is no longer working

ChunkyProgrammer avatar Apr 23 '24 17:04 ChunkyProgrammer

Also, I think you're using the search page in the screenshot (which was not modified by this code, I only modified the screen where you search videos to add to a playlist /add_playlist_items?q=SEARCH_QUERY)

ChunkyProgrammer avatar Apr 23 '24 17:04 ChunkyProgrammer

Also, I think you're using the search page in the screenshot (which was not modified by this code, I only modified the screen where you search videos to add to a playlist /add_playlist_items?q=SEARCH_QUERY)

You're right .-.

SamantazFox avatar Apr 28 '24 10:04 SamantazFox

That's much simpler than what I had in mind ^^ (which involved returning the continuation token from very far in the call stack)

Btw this will show the next page button even if there's no next page: https://github.com/iv-org/invidious/pull/4126/ which is why I closed this PR

ChunkyProgrammer avatar May 19 '24 14:05 ChunkyProgrammer

Closing as this might not be a proper fix (as long as regular search's pagination isn't working)

ChunkyProgrammer avatar May 19 '24 18:05 ChunkyProgrammer