KohGeek / SortYoutubePlaylistByDuration

Proper repository for Greasyfork plugin Sort Youtube Playlist By Duration (formerly Sort Youtube Watch Later by Duration)
https://greasyfork.org/en/scripts/446741-sort-youtube-playlist-by-duration
GNU General Public License v2.0
19 stars 3 forks source link

[BUG] Unable to sort non-Watchlist playlists #7

Closed richardmtl closed 2 months ago

richardmtl commented 2 months ago

Describe the bug Now that #5 is fixed, I figured I'd bring up this other issue that I started having. As mentioned in that issue, I have to refresh the page in order to show the UI. If I do this on a playlist other than the Watchlist, and then hit the "Sort videos" button, it doesn't sort them. The thing is, sometimes it'll work fine for a week or more, and then it'll stop working. I suspect that things change depending the version of Chrome Canary I'm on

To Reproduce Steps to reproduce the behavior:

  1. Go to a private playist
  2. Make sure it's set to "Shortest First" and "Sort all"
  3. Hit "Sort Videos"

Expected behavior It will Sort the playlist by length

Actual Behaviour It gets stuck: "Loading more videos - 185 videos loaded" (I have tried with playlists of only 25 videos, so it's not a matter of the number of videos).

Platform (please complete the following information):

Additional context Like I mentioned, sometimes it will work as expected for a few days or a few weeks, and then one day, it just stops working and exhibits the same "stuck" behaviour.

KohGeek commented 2 months ago

I may have identified the root cause of this issue. The current script grabs the number of thumbnails, not draggable points. So it counts recommendations and stuff too. I'll see if fixing this will work

KohGeek commented 2 months ago

Should be fixed. Spinner detection is inconsistent so I went through grabbing the reported video count instead.