From c90f5115de343139fdd4fd69f03171f746fa8ad6 Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Fri, 10 Jul 2026 21:43:05 +0200 Subject: [PATCH] billing: improve playlimit calculation --- core/allnet.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/allnet.py b/core/allnet.py index 276f440..25581fd 100644 --- a/core/allnet.py +++ b/core/allnet.py @@ -711,7 +711,6 @@ class BillingServlet: "messages": [] } playhist = "000000/0:000000/0:000000/0" - total_playcount = req.playcnt if machine is not None: if self.config.allnet.save_billing: @@ -732,8 +731,6 @@ class BillingServlet: plays = await self.data.arcade.billing_get_playcount_3mo(machine['id'], req.gameid) if plays: - total_playcount = sum(p['playct'] for p in plays) - playhist = ":".join( f"{p['year']:04d}{p['month']:02d}/{p['playct']}" for p in reversed(plays) @@ -820,7 +817,7 @@ class BillingServlet: return PlainTextResponse("result=6&waittime=0&linelimit=20\r\n") playlimit = req.playlimit - while total_playcount > playlimit: + while req.playcnt >= playlimit - req.nearfull: playlimit += 1024 nearfull = req.nearfull | (req.billingtype.value << 16)