avallete / yt-playlists-delete-enhancer

Add a button to remove videos watched with more than X percent from watch later playlist.
MIT License
17 stars 3 forks source link

[BUG] Videos are ignored in playlists with more than 100 videos #290

Open dnicolson opened 3 months ago

dnicolson commented 3 months ago

Steps to reproduce:

  1. Load a YouTube playlist with 100+ videos.

Expected results: Buttons to be visible and video removal functionality.

Actual results: No buttons or removal functionality.

Notes: Initially, the additional videos as continuations are fetched via the /browse endpoint but do not appear to be functional.

GaabluhnMowd commented 3 months ago

Out of curiosity, are the buttons and functionality visible and working for you in playlists under 100 videos that are NOT the default watch later list?

dnicolson commented 3 months ago

There are no issues in any playlists that contain less than 100 videos.

GaabluhnMowd commented 3 months ago

I wonder why it's working for some but not others.

OS/browser?

dnicolson commented 3 months ago

This issue occurs because Preact is initialized when the first 100 videos are in the DOM. As you scroll down the playlist, more videos are added, but they are outside of the Preact container.

I'm not sure if it's worth fixing, but it does mean that loading additional videos doesn’t seem to be needed:

https://github.com/avallete/yt-playlists-delete-enhancer/blob/c46835c/src/yt-api.ts#L81-L87

GaabluhnMowd commented 3 months ago

Not issue I'm having, as script itself fails to trigger at all on any custom playlists, only triggers on Watch Later, regardless of the number of videos.

GaabluhnMowd commented 3 months ago

Previous issue I had was due to brand account usage, which I have sorted out, but now also getting errors for playlists over 100 videos, error being:

responseJson.onResponseReceivedActions is undefined

(if this is of any help to anyone)