From 1f5444e86baaa604fe1a60997efc08342ad01e56 Mon Sep 17 00:00:00 2001 From: OrangeTien <834818935alger@gmail.com> Date: Sun, 27 Mar 2022 17:15:11 +0800 Subject: [PATCH] JavDB: add User Rating for Emby&Jellyfin --- WebCrawler/javdb.py | 3 +++ core.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/WebCrawler/javdb.py b/WebCrawler/javdb.py index 7bb6f3a..b10688e 100755 --- a/WebCrawler/javdb.py +++ b/WebCrawler/javdb.py @@ -304,6 +304,9 @@ def main(number): userrating = getUserRating(lx) if userrating: dic['userrating'] = userrating + dic['rating'] = userrating + rating_score = float(userrating) * 20.0 + dic['criticrating'] = '{:.1f}'.format(rating_score) # 保存小数点后1位即可 if not dic['actor'] and re.match(r'FC2-[\d]+', number, re.A): dic['actor'].append('素人') if not dic['series']: diff --git a/core.py b/core.py index 7a6bfea..9ba1ae7 100644 --- a/core.py +++ b/core.py @@ -356,6 +356,10 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" " + release + "", file=code) if 'userrating' in json_data: print(" " + json_data['userrating'] + "", file=code) + if 'rating' in json_data: + print(" " + json_data['rating'] + "", file=code) + if 'criticrating' in json_data: + print(" " + json_data['criticrating'] + "", file=code) print(" " + cover + "", file=code) if config.getInstance().is_trailer(): print(" " + trailer + "", file=code)