pylerSM / YouTubeBackgroundPlayback

[Xposed module] Enable background playback in YouTube

Home Page:http://repo.xposed.info/module/com.pyler.youtubebackgroundplayback

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No backward compatibility

Cypher01 opened this issue · comments

v2.0.2 doesn't work with YouTube <12.19.* anymore. The YouTube version should be checked and the old code should stay for backward compatibility.
(I intentionally use an older YouTube version)

But why tho? 2.0.1 and 2.0.2 are exactly the same. There is no change in code apart from pointing to the second .json file...

Are you sure? I didn't study the source code in detail, but I realized that I get Ads with v2.0.2, but not with v2.0.1.

The hooks-2.json file does not have the versions that the hooks-1.json has. I will try and get around to feeding in two JSON files so that we can do the <= 12.17.54 versions the old file has.

@Cypher01, in the meantime, keep using the 2.0.1.

Pushed 20eb10e but I don't have any devices running on anything older than N right now and I do not want to mess around with testing this on an emulator, so @th3an7 will have to test it out.

I was planning on going the route of reading in two JSON files, but the main issue I faced was deciding how to deal with the fallback key of the JSONs. Most notably, whether differences in those should be handled in some fancy way or just one of them should be picked or whatever else should happen. So instead, we have one massive JSON which has all the multipliers and then under them the version codes the way they were prior to this change.

@Cypher01 can you please test if this works?
https://drive.google.com/file/d/0B8j7vCsf6RXcNFpGdXU0ZUxweFE/view?usp=sharing

Ideally it would be if you could test this in both YouTube app versions - old one which is working on 2.0.1 and latest one which is working on 2.0.2

Also, if this apk for some reason cannot be installed (system shows errors or sth), try uninstalling previous module version (I may or may not fucked up apk signature... again)

@th3an7 I'm going to test it on Genymotion, when I have time. Is this based on the actual state of your fork?

This apk is build with changes that @sigv pushed...

Also my fork is just a copy of this one and this one is a master - modules apks are made from sources from this fork...
My fork has only one extra branch with modified json file that can make playback controls visible only when app is in background and not all the time. But apart from that, it's exact the same :)

Might want to do a rebuild which includes 4a4c1cb for testing since I realized today that I forgot to traverse into the multiplier keys of the hooks-3.json file when I wrote the code yesterday. 🙂

And 685a5e5.. sigh

@th3an7: works

So if it works, I'm adding that apk to xposed repo