From 063d58edc311594e888db688909a35d08464f617 Mon Sep 17 00:00:00 2001 From: lededev Date: Sun, 27 Mar 2022 18:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=84=E5=88=86=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core.py b/core.py index d3679f1..f7cb5ba 100644 --- a/core.py +++ b/core.py @@ -354,16 +354,16 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" " + release + "", file=code) print(" " + release + "", file=code) print(" " + release + "", file=code) - if 'userrating' in json_data: - try: - strrating = json_data['userrating'] - userrating = round(float(strrating) * 2.0) - print(f" {userrating}", file=code) - print(f" {userrating}", file=code) - rating_score = round(float(strrating) * 20.0, 1) - print(f" {rating_score:.1f}", file=code) - except: - pass + try: + strrating = json_data['userrating'] + userrating = round(float(strrating) * 2.0) + print(f" {userrating}", file=code) + rating = round(float(strrating) * 2.0, 1) + print(f" {rating}", file=code) + rating_score = round(float(strrating) * 20.0, 1) + print(f" {rating_score}", file=code) + except: + pass print(" " + cover + "", file=code) if config.getInstance().is_trailer(): print(" " + trailer + "", file=code)