Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Disabling playlist auto play next video no longer functional, YT removed the button #885

Closed
Kadah opened this issue Sep 1, 2014 · 17 comments

Comments

@Kadah
Copy link

Kadah commented Sep 1, 2014

It was very, very annoying when Google started forcing playlists on everything as well as forcing auto-play to always re-enabled on playlists. Now I've gotten hit with another Youtube update yesterday and Google has actually removed the auto-play button from playlists.

I was using Clst's script to disable the play-next's but it is unable to function now (clst/YouTubePlaylistAutoplayDisable#3). On his recommendation I've tried YouTubeCenter, which nice but also is unable to prevent auto-play next.

Tested on Pale Moon 24.7.1 with Greasemonkey 1.15 and Chrome 36 with Tampermonkey 3.8.52 using all combinations of "Playlist auto play" and "Playlist auto play freeze".

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 3, 2014

@Kadah The youtube center author is re-writting the code due to the youtube changes so for now the latest version is all there is.

But perhaps you might get lucky with the forced playlists thing because recently I have been tinkering with youtube code as a hobby and I have created this greasemonkey script which removes the forced playlists from the user/channel videos' page. I have only used Firefox 31 now Firefox 32 so I don't know if it will work with other browsers, but maybe it's worth a shot.

The script is located here: https://github.com/Yonezpt/Particle/blob/master/Dev/Workshop/User%20videos%20experiments.user.js

This isn't something that is properly built so the script update function is still not working which won't make it easy for auto-update whenever new changes are implemented, but the script works.

EDIT: @YePpHa I have located the problem, YTC is using this line to toggle the playlist auto-play setting

LIST_AUTO_PLAY_ON = toggled

but the new youtube update changed it to

LIST_AUTO_PLAY_VALUE = 1

I suspect 1 = auto-play, 0 = auto-play off, thought this info might help you out.

@Kadah
Copy link
Author

Kadah commented Sep 3, 2014

@Yonezpt I've was using another script to remove playlist links from channels, subs feed, etc for a couple weeks, which has saved a lot of sanity (YTC also achieves this still and is what I'm using for now). Next came that problem that I do sometimes manually watch a playlist and would like to control the auto-play-next instead of Google's always forced on. I did find a script for that, but now Google seems to be toying with removing that ability completely and forcing it in a completely new way.

Sometimes auto-play-next does not happen, I have a feeling that its a general failure on YT's part.

I will have to check later if either LIST_AUTO_PLAY_ON or LIST_AUTO_PLAY_VALUE is even still there, though I have a feeling they won't be since I can't remember seeing any similarly named variables when probing around the other night.

The stupid sad part is that if the playlist links on channels and subs had played forward from the current video to newest instead of the opposite, reverse-chronological, it would not have been such a massively negative and annoying feature. "Yes Google, I would totally like to watch episode 50 first, fallowed by 49 then 48..."

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 3, 2014

@Kadah I just confirmed it, that is indeed the new command that controls the playlist auto-play option, but I was incorrect before because the actual value to... "turn auto-play off" is 2, not 0 (perhaps 3 = off).

Just create a new script in greasemonkey for youtube and type this in:

yt.config_.LIST_AUTO_PLAY_VALUE = 2;

That's it, save the script, reload youtube and test the playlists.

As far as I could see on my end, this setting disables the forced auto-play function and instead memorizes whatever we select, which I think is what you want.

Let me know if that works for you too.

EDIT: Just found out that the old option is actually still present, but I didn't saw it due to too much code tinkering. My suspicion is that the Play value is somehow overriding the user choice, thus rendering any script that had this function useless.

@Kadah
Copy link
Author

Kadah commented Sep 3, 2014

@Yonezpt Since I know Google has a habit of testing new versions of TY at different people, do you still have the auto-play button showing on the playlist control?

I'll test that after work, I've only gotten this update of YT at home.

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 3, 2014

@Kadah Yes I have, it is still there and it won't be a problem if it goes away because there is a way to make it work as before.

Now I think I understand better what you were saying, that they have literally removed the button from the playlist. If that's something they have done then I might only see it in a couple of days (since that seems to be the trend for me), however it might also be a bug caused by an outdated add-on like YTC, in that case you can rule that out just by disabling any add-ons and see if the button reappears.

If the button is really gone for good then add this line to the one I mentioned before in your greasemonkey script:

yt.config_.LIST_AUTO_PLAY_ON = false;

I know that this isn't as great as a button, but it will stop the playlists from continue on its own, I hope.

@YePpHa
Copy link
Owner

YePpHa commented Sep 4, 2014

@Yonezpt I actually did some tests with the LIST_AUTO_PLAY_ON property and it seems like YouTube actually ignores what it says. So if you set it to false it would still continue playing, otherwise I would've used that option instead of have used a dirty workaround to disable the auto-playing. Though if the auto-play button doesn't exist anymore then I might have to find another method to prevent the auto-play.

@YePpHa YePpHa added bug labels Sep 4, 2014
@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 4, 2014

@YePpHa From what I have seen since the last time, that setting is actually the user setting variable, it is suppose to memorize if the user disabled or enabled the auto-play so that it retains the same option whenever the user or the list plays another video in the playlist. At least that is what happens on my end, whenever I click the button that value changes.

I still haven't lost my button so I can't fully test it, but I think it might be possible to hack a button out of event listeners [function onStateChange(state){if(state==0)config.playlist=toggle}] or even some dom trees that might hold similar functionalities which might enable this goal. That is if the button ends up getting removed.

@YePpHa
Copy link
Owner

YePpHa commented Sep 4, 2014

@Yonezpt I am aware that the option is changed when the auto-play button is toggled, but it does nothing when you visit the page.

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 4, 2014

@YePpHa On my end if I set

yt.config_.LIST_AUTO_PLAY_VALUE = 2;

The playlist remembers my auto-play choice whenever I change videos in the playlist, but it won't change the option in the playlist if I set

yt.config_.LIST_AUTO_PLAY_ON

to either true or false. You are correct, youtube is ignoring that option.

@Kadah
Copy link
Author

Kadah commented Sep 5, 2014

@Yonezpt Just checked with all gm scripts turned off. Google literally removed the button.

image

yt.config_.LIST_AUTO_PLAY_VALUE = 2;
Isn't have an affect, though that is the name of it now for me.

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 5, 2014

@Kadah I see, those are the youtube created playlists, not the user created playlists. I'm going to explore it when I can and see if there is anything that can recover the functionality.

@Kadah
Copy link
Author

Kadah commented Sep 5, 2014

@Yonezpt I'll check user created playlists later to see if they are different, but they weren't (for me) before the last round of changes.

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 6, 2014

@Kadah Good news, as I suspected there is at least one way to force auto-play off, as well as restoring the auto-play button on the youtube generated playlists. I have shared my findings with YePpHa in case he wants to implement them, if not then I will publish my script once it is finished.

@omperus
Copy link

omperus commented Sep 9, 2014

Same problem here, playlist doesn't obey the youtube center option to stop autoplaying.

@YePpHa YePpHa closed this as completed in 7b908c1 Sep 14, 2014
@ghost
Copy link

ghost commented Sep 14, 2014

I think this solves my problem also?

#937

@YePpHa
Copy link
Owner

YePpHa commented Sep 14, 2014

Okay, I found a way to fix this. YouTube have a function yt.www.watch.lists.getState which returns an object with a property named autoPlay. This property is used by YouTube to determine if it should go to the next video. So by wrapping the getState function with another function where it sets the property autoPlay to i.e. false and then returns the object the player will not go to the next video.

I also took the liberty to add the auto-play button to the playlist where the auto-play button isn't present

@Yonezpt
Copy link
Collaborator

Yonezpt commented Sep 14, 2014

That's much better than the hack that I proposed, glad that you managed to work it out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants