dmunozv04 / iSponsorBlockTV

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

[Chromecast] Ads not muted after last YT Ads update #116

Open adripo opened 7 months ago

adripo commented 7 months ago

Describe the bug Ads are not muted on Chromecast. They are still skipped, but are not muted and the warning that the volume is already maxed appears. The issue started to appear after the new interface of the ads was introduced (with the orange circle countdown). Everything works as expected on other devices.

To Reproduce Steps to reproduce the behavior:

  1. Play video on Chromecast
  2. isponsorblock connects successfully
  3. ad starts
  4. ad not muted & warning that volume is already maxed out appears on chromecast

Expected behavior Ads muted

iSponsorBlockTV server (please complete the following information):

Additional context Logs:

Getting segments for next video: vaMxTSm53UU
Ad has started, muting
Command failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pyytlounge/wrapper.py", line 547, in _command
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1062, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='RID_OUTSIDE_WINDOW', url=URL('https://www.youtube.com/api/lounge/bc/bind?device=REMOTE_CONTROL&name=iSponsorBlockTV&app=youtube-desktop&loungeIdToken=AGdO5p-o3JV0vyJJTEtUmtMhr-UXXjye6IjGWZvn0rSWFu13fijFx9IwbWkaiaz3d_gknGMyOVtlqP2wCCTpAy-0h5j9t85jfFyuDV7VIVcsE2CsY2OUd6w&VER=8&v=2&RID=15&SID=6E2986776727E7B6&AID=123&gsessionid=HvCkpNCKkx-e6FKNZZb_5hKnUZJMyVdt')
Connected to device YouTube on TV (Chromecast)
Playing vaMxTSm53UU with 2 segments
mscreations commented 6 months ago

I am getting the same issue with v2.0.4 with my LG webOS youtube app. It seems random as some ads get muted correctly and others do not. Also doesn't seem to skip the ads automatically when the option is available.

brknstrngz commented 6 months ago

I am seeing similar behaviour (and console messages) with the latest Youtube app on Apple TV. Some ads are not muted while others are not skipped.

jimbattun commented 6 months ago

me too Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/pyytlounge/wrapper.py", line 532, in _command resp.raise_for_status() File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1059, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 401, message='RID_OUTSIDE_WINDOW', url=URL('https://www.youtube.com/api/lounge/bc/bind?device=REMOTE_CONTROL&name=tvclick.app&app=youtube-desktop&loungeIdToken=AGdO5p9u51O-G-OXaPkeEVdfo7RaU_wTdL6j1nlq--imCYrkdHVWytoWp1rSHNxgQ99NtCCH68DCKV5fvYz-J1tYBu-zaz0KOYS0hLIej6XO9npNnMSWxxg&VER=8&v=2&RID=7&SID=6343AC185088A2F6&AID=28&gsessionid=BXSDs6jA9Q80LkPG9XrIk6YifPkuIrRt') 400, message='INVALID_REQUEST', url=URL('https://www.youtube.com/api/lounge/bc/bind?device=REMOTE_CONTROL&name=tvclick.app&app=youtube-desktop&loungeIdToken=AGdO5p9u51O-G-OXaPkeEVdfo7RaU_wTdL6j1nlq--imCYrkdHVWytoWp1rSHNxgQ99NtCCH68DCKV5fvYz-J1tYBu-zaz0KOYS0hLIej6XO9npNnMSWxxg&VER=8&v=2&RID=6&SID=6343AC185088A2F6&AID=25&gsessionid=BXSDs6jA9Q80LkPG9XrIk6YifPkuIrRt')

dmunozv04 commented 6 months ago

It seems like some times YouTube says a command is invalid, which causes the next command's RID to be "outside the window"; causing iSponsorBlockTV to disconnect. I'll release a new version too that removes the reconnect delay, making this error less noticeable