From d7bfd803dd84f41a10665300eef54350e6470511 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 4 Oct 2025 16:57:26 +0100 Subject: [PATCH 1/4] Fix showplan repairing --- src/showplanner/state.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/showplanner/state.ts b/src/showplanner/state.ts index 3c6b8e7..d22f0c3 100644 --- a/src/showplanner/state.ts +++ b/src/showplanner/state.ts @@ -668,9 +668,6 @@ export const getShowplan = (timeslotId: number): AppThunk => async ( } if (ops.length > 0) { - console.log("Is corrupt, repairing locally"); - dispatch(showplan.actions.applyOps(ops)); - console.log("Repairing showplan", ops); const updateResult = await api.updateShowplan(timeslotId, ops); if (!updateResult.every((x) => x.status)) { @@ -679,6 +676,7 @@ export const getShowplan = (timeslotId: number): AppThunk => async ( return; } } + // This is the fixed plan dispatch(showplan.actions.getShowplanSuccess(plan.flat(2))); } catch (e) { console.error(e); From 46b056bddac9a01db2cacc160d048b7132949e5b Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 4 Oct 2025 16:59:58 +0100 Subject: [PATCH 2/4] Bump actions/cache --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 329cad1..15e6e29 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - uses: actions/cache@v4 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} From 1969fffb64d94a775dc61af9a9a0adbac2a42434 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 4 Oct 2025 17:02:16 +0100 Subject: [PATCH 3/4] Stop Poetry complaining --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index a9656cf..7c0f081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ version = "1.6.0" description = "" authors = ["Marks Polakovs ", "Matthew Stratford "] readme = "README.md" +package-mode = false [tool.poetry.dependencies] python = "^3.9.2" From b0e91a95651c939fda6b51c09302e21e5a9ead5f Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 4 Oct 2025 17:05:25 +0100 Subject: [PATCH 4/4] Attempt to satisfy mypy --- shittyserver.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/shittyserver.py b/shittyserver.py index 1ab86b4..c2e39f1 100644 --- a/shittyserver.py +++ b/shittyserver.py @@ -10,12 +10,12 @@ from typing import Optional, Any, Type, Dict, List import aiohttp -import av # type: ignore +import av import jack as Jack from jack import OwnPort import websockets.exceptions, websockets.server, websockets.connection -from aiortc import MediaStreamTrack, RTCPeerConnection, RTCSessionDescription # type: ignore -from aiortc.mediastreams import MediaStreamError # type: ignore +from aiortc import MediaStreamTrack, RTCPeerConnection, RTCSessionDescription +from aiortc.mediastreams import MediaStreamError import sentry_sdk config = configparser.RawConfigParser() @@ -131,7 +131,7 @@ class NotReadyException(BaseException): class Session(object): - websocket: Optional[websockets.server.WebSocketServerProtocol] + websocket: Optional[websockets.server.WebSocketServerProtocol] # type: ignore connection_state: Optional[str] pc: Optional[Any] connection_id: str @@ -194,7 +194,7 @@ async def end(self) -> None: if ( self.websocket is not None - and self.websocket.state == websockets.connection.State.OPEN + and self.websocket.state == websockets.connection.State.OPEN # type: ignore ): try: await self.websocket.send(json.dumps({"kind": "DIED"})) @@ -225,7 +225,7 @@ def create_peerconnection(self) -> None: self.pc = RTCPeerConnection() assert self.pc is not None - @self.pc.on("signalingstatechange") # type: ignore + @self.pc.on("signalingstatechange") async def on_signalingstatechange() -> None: assert self.pc is not None print( @@ -233,7 +233,7 @@ async def on_signalingstatechange() -> None: "Signaling state is {}".format(self.pc.signalingState), ) - @self.pc.on("iceconnectionstatechange") # type: ignore + @self.pc.on("iceconnectionstatechange") async def on_iceconnectionstatechange() -> None: if self.pc is None: print( @@ -249,7 +249,7 @@ async def on_iceconnectionstatechange() -> None: print(self.connection_id, "Ending due to ICE connection failure") await self.end() - @self.pc.on("track") # type: ignore + @self.pc.on("track") async def on_track(track: MediaStreamTrack) -> None: global live_session, transfer_buffer1, transfer_buffer2 print(self.connection_id, "Received track") @@ -258,7 +258,7 @@ async def on_track(track: MediaStreamTrack) -> None: await notify_mattserver_about_sessions() - @track.on("ended") # type: ignore + @track.on("ended") async def on_ended() -> None: print( self.connection_id, @@ -325,7 +325,7 @@ async def process_ice(self, message: Any) -> None: ) async def connect( - self, websocket: websockets.server.WebSocketServerProtocol + self, websocket: websockets.server.WebSocketServerProtocol # type: ignore ) -> None: global active_sessions @@ -369,7 +369,7 @@ async def connect( async def serve( - websocket: websockets.server.WebSocketServerProtocol, path: str + websocket: websockets.server.WebSocketServerProtocol, path: str # type: ignore ) -> None: if path == "/stream": session = Session() @@ -378,7 +378,7 @@ async def serve( pass -start_server = websockets.server.serve( +start_server = websockets.server.serve( # type: ignore serve, host=None, port=int(config.get("shittyserver", "websocket_port")) )