JohnyP36 / YT-Nonstop

Extension to let YouTube run nonstop with autoplay, autoconfirm and automatic pressing the loopbutton.
GNU General Public License v2.0
14 stars 1 forks source link

Loop function doesn't work (see last comment for Warning) #8

Closed JohnyP36 closed 1 year ago

JohnyP36 commented 2 years ago

Prerequisites

I tried to reproduce the issue when...

Describe the issue

Since some weeks the function to loop your playlist doesn't work anymore.
So, it doesn't matter if I toggle on or off the loop button in the extension popup: it has no affect on www.youtube.com.

Screenshot(s)

No response

Browser & Extension version

MS Edge 94 & 1.6.4

Notes

I looked into your .js files, and into the source code of youtube.com, but for so far I didn't found the error. Maybe youtube has change their code.

JohnyP36 commented 2 years ago

It only works in the mini player, but not in the normal view.

But changing https://github.com/JohnyP36/YT-Nonstop/blob/c0ae89cf91a38ff3d4e2078a85aea461c194442e/1.6.0/js/autoplay%2Bloop.js#L17 in

{return[...document.querySelectorAll('div[id="header-contents"] div[id="playlist-action-menu"] button[aria-label="Loop playlist"]')].filter(t=>t.id=="button")}

also doesn't work - however it should work, because for some reason it only select the last query after the first one is selected. But because the first one can't be selected (is only available until div[id="playlist-action-menu"] if you don't load the miniplayer in YT), it will not selected the second query (just the button in main/normal view).

github-actions[bot] commented 2 years ago

"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."

JohnyP36 commented 1 year ago

Fixed by https://github.com/JohnyP36/YT-Nonstop/commit/5e8accb54e81772d5f349cc0d85f1cfa259cd1da & https://github.com/JohnyP36/YT-Nonstop/commit/e37357126eaf5346980f62ef54ce13c0d7b78fa9

JohnyP36 commented 8 months ago

Warnings

  1. Drawback: you can only loop a video in a playlist if you turn "loop playlist" on.
  2. The loop function for YouTube Music will only work if the language of YouTube is set to: English, German, French or Dutch. If you want this extension to support your language, please open an issue.