dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.35k stars 96 forks source link

stale app identifier, skips not restricted to app.identifier == "com.google.ios.youtube" #6

Closed sejmann closed 2 years ago

sejmann commented 2 years ago

I get attempted ad skips when using the non-YouTube apps on the Apple TV.

For instance, when watching FBI S04E14 Pride and Prejudice in the Apple TV's "Computers" app, the script searched YouTube and found 4jwUXV4QaTw (which is a YouTube video on FBI body language analysis,) and executed both of the skips despite not watching YouTube.

I see in the source: playstatus.device_state == playstatus.device_state.Playing and app.identifier == "com.google.ios.youtube" which seems like it should prevent that, so now I'm wondering if the app identifier is stale.

When I originally launched the script, I was in the YouTube app, but later switched to other apps. I haven't tested to verify, but I have noticed behavior possibly consistent with the identifier being cached at launch, and not updated. For instance, I think I've noticed the script continues to not work if the Apple TV isn't in the YouTube app at script launch.

dmunozv04 commented 2 years ago

Thanks for reporting the bug, that would solve some weirdness regarding the script only working sometimes for me on a daemon. I’ll look into it when I’m able to

dmunozv04 commented 2 years ago

@sejmann are you able to confirm that this issue is fixed on the latest docker image?

sejmann commented 2 years ago

Yeah, that seemed to do the trick. Thanks! Now just to make it multi threaded for multiple Apple TVs. =)

dmunozv04 commented 2 years ago

Yeah, that seemed to do the trick. Thanks! Now just to make it multi threaded for multiple Apple TVs. =)

This has been implemented on the latest version.