Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playlist loop bug: automatically turns on loop. #1768

Closed
Amazer526 opened this issue Sep 14, 2023 · 7 comments
Closed

Playlist loop bug: automatically turns on loop. #1768

Amazer526 opened this issue Sep 14, 2023 · 7 comments
Labels
Bug Bug or required update after YouTube changes good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@Amazer526
Copy link

Amazer526 commented Sep 14, 2023

Bug Report:

BUG: It always automatically turns on loop at the end of the third video in any playlist.

HOW: Even if I manually turn it off, it activates again after the third video ends. "Player > Repeat > Always Activate" is turned off, as are all loop-related settings in YouTube. Removing the extension resolves the issue.

EXPECTED (/preferred) behavior: Solve the bug

Screenshots:

Setup:

⚬ ImprovedTube Version: 4.339
⚬ Browser: Chrome Version 117.0.5938.63 (Official Build) (64-bit)
⚬ Settings: {"ads":"all_videos","below_player_loop":false,"below_player_pip":false,"below_player_screenshot":false,"channel_default_tab":"/","channel_play_all_button":true,"channel_trailer_autoplay":true,"language":"zh-CN","mark_watched_videos":true,"only_one_player_instance_playing":true,"player_60fps":true,"player_SDR":false,"player_autoplay":true,"player_forced_playback_speed":false,"player_quality":"hd2160","player_repeat_button":false,"player_rotate_button":true,"playlist_autoplay":true,"playlist_repeat":true,"playlist_up_next_autoplay":true,"theme":"night","theme_primary_color":[200,200,200],"theme_text_color":[25,25,25],"thumbnails_quality":"maxresdefault","track_watched_videos":false,"up_next_autoplay":true}

⚬ OS: Windows 11 Pro 22H2 22621.2283
⚬ Device: LAPTOP

@Amazer526 Amazer526 added Bug Bug or required update after YouTube changes good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Sep 14, 2023
@ImprovedTube
Copy link
Member

thank you! @Amazer526

@ImprovedTube
Copy link
Member

ImprovedTube commented Sep 15, 2023

can you try to disable the "playlist_repeat":true" feature? @Amazer526


Our code for playlist repeat & shuffle both needs to be rewritten.

Loop-button

selector for the button SVG:
#button.ytd-playlist-loop-button-renderer
or ytd-playlist-loop-button-renderer
path.attributes.d

( and the label: #tooltip.textContent )

grey-icon ( Loop Playlist )
M21 13h1v5l-18.07.03 2.62 2.62-.71.71-3.85-3.86 3.85-3.85.71.71-2.67 2.67L21 17v-4zM3 7l17.12-.03-2.67 2.67.71.71 3.85-3.85-3.85-3.85-.71.71 2.62 2.62L2 6v5h1V7z

white-icon ( Loop video )
M20 14h2v5l-16.16.02 1.77 1.77L6.2 22.2 1.99 18l4.21-4.21 1.41 1.41-1.82 1.82L20 17v-3zM4 7l14.21-.02-1.82 1.82 1.41 1.41L22.01 6 17.8 1.79 16.39 3.2l1.77 1.77L2 5v6h2V7z

(1)-icon ( Turn off loop )
M13 15h-1.37v-4.52l-1.3.38v-1l2.5-.86H13v6zm7 2-14.21.02 1.82-1.82-1.41-1.41L1.99 18l4.21 4.21 1.41-1.41-1.77-1.77L22 19v-5h-2v3zM4 7l14.21-.02-1.82 1.82 1.41 1.41L22.01 6 17.8 1.79 16.39 3.2l1.77 1.77L2 5v6h2V7z

Shuffle-button

#playlist-actions #playlist-action-menu ytd-toggle-button-renderer
path.attributes.d
tool tip doesnt change here
(grey:)
M18.15 13.65 22 17.5l-3.85 3.85-.71-.71L20.09 18H19c-2.84 0-5.53-1.23-7.39-3.38l.76-.65C14.03 15.89 16.45 17 19 17h1.09l-2.65-2.65.71-.7zM19 7h1.09l-2.65 2.65.71.71L22 6.51l-3.85-3.85-.71.71L20.09 6H19c-3.58 0-6.86 1.95-8.57 5.09l-.73 1.34C8.16 15.25 5.21 17 2 17v1c3.58 0 6.86-1.95 8.57-5.09l.73-1.34C12.84 8.75 15.79 7 19 7zM8.59 9.98l.75-.66C7.49 7.21 4.81 6 2 6v1c2.52 0 4.92 1.09 6.59 2.98z

(active:)
m18.51 13.29 4.21 4.21-4.21 4.21-1.41-1.41 1.8-1.8c-2.95-.03-5.73-1.32-7.66-3.55l1.51-1.31c1.54 1.79 3.77 2.82 6.13 2.85l-1.79-1.79 1.42-1.41zm.37-5.78L17.1 9.29l1.41 1.41 4.21-4.21-4.21-4.21-1.41 1.41 1.8 1.8c-3.72.04-7.12 2.07-8.9 5.34l-.73 1.34C7.81 14.85 5.03 17 2 17v2c3.76 0 7.21-2.55 9.01-5.85l.73-1.34c1.43-2.62 4.16-4.26 7.14-4.3zm-10.67 2.8 1.5-1.32C7.77 6.77 4.95 5 2 5v2c2.38 0 4.64 1.53 6.21 3.31z

@ImprovedTube
Copy link
Member

sometimes, when SVG pathes change, and there seem to be are no destinct IDs or classes, we could check the labels as a backup.
So im curious how you got the full-screen label in all languages @Lauviah0622 (not at all urgent, just looking forward)

@Lauviah0622
Copy link

The trick how I captured the full screen button just get the className, and there has the attribute "data-title-no-tooltip" display the full-screen label.

image

For capture of the loop from the list, it seems doesn't work. Another chance is we can capture the tooltip content from the HTML element and prevent the failure from the official SVG changes (locales may be more permanent than UI)
image

there are three state in English's locale

  • Turn off loop
  • Loop playlist
  • Loop video

But sadly it need a lot's of work to implement in different language, the tooltip's text it's all different 😭

@Amazer526
Copy link
Author

@ImprovedTube I'm not an expert in code, but disabling the "playlist_repeat:true" feature fixed the issue. I'm still confused, though, because I thought that feature was supposed to loop the whole playlist, not just the end of the third video. Thanks for your help!

@ImprovedTube
Copy link
Member

Thanks @Amazer526 , yes! you couldn't know, will fix the feature!

@ImprovedTube
Copy link
Member

if you like, please try if the repeat playlist feature works again @Amazer526
https://github.com/code-charity/youtube/archive/refs/heads/master.zip
also updating everybody with this.

ImprovedTube added a commit that referenced this issue Sep 29, 2023
ImprovedTube added a commit that referenced this issue Oct 1, 2023
ImprovedTube added a commit that referenced this issue Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug or required update after YouTube changes good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
None yet
Development

No branches or pull requests

3 participants