From 48144b53f042c2705bb7972eec7d48dd58e6587a Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Fri, 17 Mar 2023 01:35:51 -0400 Subject: [PATCH] fix attend --- titles/diva/base.py | 4 ++-- titles/diva/index.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/titles/diva/base.py b/titles/diva/base.py index 02eb464..96315f2 100644 --- a/titles/diva/base.py +++ b/titles/diva/base.py @@ -39,7 +39,7 @@ class DivaBase: resp.atnd_prm1[i] = 0 resp.atnd_prm1[8] = 100 - resp.atnd_prm2[:5] = [30, 10, 100, 4, 1, 50] + resp.atnd_prm2[:6] = [30, 10, 100, 4, 1, 50] resp.atnd_prm3[0] = 100 resp.atnd_prm3[1] = 0 @@ -47,7 +47,7 @@ class DivaBase: resp.atnd_prm3[16: 19] = [3, 4, 5] resp.atnd_prm3[22: 25] = [4, 5, 6] resp.atnd_prm3[80:] = [0] * 20 - resp.atnd_prm3[28:78] = [5,6,7,4,4,4,9,10,14,5,10,10,25,20,50,30,90,5, + resp.atnd_prm3[28:79] = [5,6,7,4,4,4,9,10,14,5,10,10,25,20,50,30,90,5, 10,10,25,20,50,30,90,5,10,10,25,20,50,30,90,5,10,10,25,20,50,30,90, 5,10,10,25,20,50,30,90,10,30] diff --git a/titles/diva/index.py b/titles/diva/index.py index 0f19ea3..3edab7e 100644 --- a/titles/diva/index.py +++ b/titles/diva/index.py @@ -119,6 +119,9 @@ class DivaServlet: response = handler(req_cls.raw) if response is None or response == "": response = BaseResponse(req_cls.cmd, req_cls.req_id).make() - + + if not response.startswith("cmd="): + response = f"cmd={req_cls.cmd}&req_id={req_cls.req_id}&stat=ok&" + response + self.logger.debug(f"Response: {response}") return response.encode(errors="ignore")