diff --git a/core.py b/core.py index f7cb5ba..befa3d5 100644 --- a/core.py +++ b/core.py @@ -355,13 +355,10 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" " + release + "", file=code) print(" " + release + "", file=code) 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) + f_rating = float(json_data['userrating']) + print(f" {round(f_rating * 2.0)}", file=code) + print(f" {round(f_rating * 2.0, 1)}", file=code) + print(f" {round(f_rating * 20.0, 1)}", file=code) except: pass print(" " + cover + "", file=code)