mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-07 12:26:45 +03:00
Update ytlounge client
to be compatible with pyytlounge v2.1.1
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
|
from typing import Any, List
|
||||||
|
|
||||||
import pyytlounge
|
import pyytlounge
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
@@ -62,8 +63,8 @@ class YtLoungeApi(pyytlounge.YtLoungeApi):
|
|||||||
return self.subscribe_task
|
return self.subscribe_task
|
||||||
|
|
||||||
# Process a lounge subscription event
|
# Process a lounge subscription event
|
||||||
def _process_event(self, event_id: int, event_type: str, args):
|
def _process_event(self, event_type: str, args: List[Any]):
|
||||||
self.logger.debug(f"process_event({event_id}, {event_type}, {args})")
|
self.logger.debug(f"process_event({event_type}, {args})")
|
||||||
# (Re)start the watchdog
|
# (Re)start the watchdog
|
||||||
try:
|
try:
|
||||||
self.subscribe_task_watchdog.cancel()
|
self.subscribe_task_watchdog.cancel()
|
||||||
@@ -158,7 +159,7 @@ class YtLoungeApi(pyytlounge.YtLoungeApi):
|
|||||||
elif event_type == "onAutoplayModeChanged":
|
elif event_type == "onAutoplayModeChanged":
|
||||||
create_task(self.set_auto_play_mode(self.auto_play))
|
create_task(self.set_auto_play_mode(self.auto_play))
|
||||||
|
|
||||||
super()._process_event(event_id, event_type, args)
|
super()._process_event(event_type, args)
|
||||||
|
|
||||||
# Set the volume to a specific value (0-100)
|
# Set the volume to a specific value (0-100)
|
||||||
async def set_volume(self, volume: int) -> None:
|
async def set_volume(self, volume: int) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user