From dd2e6382d4ed8ea192038a714444a3d028ad7576 Mon Sep 17 00:00:00 2001 From: Pedro de Oliveira Date: Wed, 19 Feb 2020 23:16:22 +0000 Subject: [PATCH] Fix current/total - v2 --- Metal/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Metal/plugin.py b/Metal/plugin.py index 4695353..c4f9931 100644 --- a/Metal/plugin.py +++ b/Metal/plugin.py @@ -85,6 +85,8 @@ class Metal(callbacks.Plugin): ) result = json.loads(response.content.decode('utf-8')) + if position < 1: + position = 1 position = position - 1 total = result['iTotalRecords'] @@ -98,6 +100,9 @@ class Metal(callbacks.Plugin): irc.error('NO HACKZ', prefixNick=False) return + if total > 200: + total = "200+" + irc.reply(self.__format_message(item, position + 1, total), prefixNick=False) find = wrap(find, ['anything', optional('int', default=1)])