mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-25 08:58:29 +03:00
Merge branch 'main' into close-properly-part-2
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Send out an M-SEARCH request and listening for responses."""
|
||||
|
||||
import asyncio
|
||||
import socket
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class DeviceListener:
|
||||
logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
)
|
||||
self.logger.addHandler(sh)
|
||||
self.logger.info(f"Starting device")
|
||||
self.logger.info("Starting device")
|
||||
self.lounge_controller = ytlounge.YtLoungeApi(
|
||||
device.screen_id, config, api_helper, self.logger, self.web_session
|
||||
)
|
||||
@@ -155,9 +155,11 @@ async def finish(devices, web_session, tcp_connector):
|
||||
await web_session.close()
|
||||
await tcp_connector.close()
|
||||
|
||||
|
||||
def handle_signal(signum, frame):
|
||||
raise KeyboardInterrupt()
|
||||
|
||||
|
||||
def main(config, debug):
|
||||
loop = asyncio.get_event_loop_policy().get_event_loop()
|
||||
tasks = [] # Save the tasks so the interpreter doesn't garbage collect them
|
||||
|
||||
@@ -328,9 +328,9 @@ class AddDevice(ModalWithClickExit):
|
||||
|
||||
@on(Input.Changed, "#pairing-code-input")
|
||||
def changed_pairing_code(self, event: Input.Changed):
|
||||
self.query_one("#add-device-pin-add-button").disabled = (
|
||||
not event.validation_result.is_valid
|
||||
)
|
||||
self.query_one(
|
||||
"#add-device-pin-add-button"
|
||||
).disabled = not event.validation_result.is_valid
|
||||
|
||||
@on(Input.Submitted, "#pairing-code-input")
|
||||
@on(Button.Pressed, "#add-device-pin-add-button")
|
||||
@@ -377,9 +377,9 @@ class AddDevice(ModalWithClickExit):
|
||||
|
||||
@on(SelectionList.SelectedChanged, "#dial-devices-list")
|
||||
def changed_device_list(self, event: SelectionList.SelectedChanged):
|
||||
self.query_one("#add-device-dial-add-button").disabled = (
|
||||
not event.selection_list.selected
|
||||
)
|
||||
self.query_one(
|
||||
"#add-device-dial-add-button"
|
||||
).disabled = not event.selection_list.selected
|
||||
|
||||
|
||||
class AddChannel(ModalWithClickExit):
|
||||
|
||||
Reference in New Issue
Block a user