diff --git a/core.py b/core.py index a2e7b3d..a0ac1bd 100644 --- a/core.py +++ b/core.py @@ -382,7 +382,22 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f """, file=code) except: - pass + if old_nfo: + try: + for rtag in ('rating', 'criticrating'): + xur = old_nfo.xpath(f'//{rtag}/text()')[0] + if isinstance(xur, str) and re.match('\d+\.\d+|\d+', xur.strip()): + print(f" <{rtag}>{xur.strip()}", file=code) + f_rating = old_nfo.xpath(f"//ratings/rating[@name='javdb']/value/text()")[0] + uc = old_nfo.xpath(f"//ratings/rating[@name='javdb']/votes/text()")[0] + print(f""" + + {f_rating} + {uc} + + """, file=code) + except: + pass print(" " + cover + "", file=code) if config.getInstance().is_trailer(): print(" " + trailer + "", file=code)