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)