Add: image naming with number
This commit is contained in:
@@ -46,6 +46,7 @@ cacert_file=
|
||||
location_rule = actor+'/'+number
|
||||
naming_rule = number+'-'+title
|
||||
max_title_len = 50
|
||||
image_naming_with_number = 0
|
||||
|
||||
[update]
|
||||
update_check=1
|
||||
|
||||
@@ -328,6 +328,12 @@ class Config:
|
||||
except:
|
||||
return 50
|
||||
|
||||
def image_naming_with_number(self) -> bool:
|
||||
try:
|
||||
return self.conf.getboolean("Name_Rule", "image_naming_with_number")
|
||||
except:
|
||||
return False
|
||||
|
||||
def update_check(self) -> bool:
|
||||
try:
|
||||
return self.conf.getboolean("update", "update_check")
|
||||
|
||||
10
core.py
10
core.py
@@ -758,6 +758,10 @@ def core_main_no_net_op(movie_path, number):
|
||||
return
|
||||
else:
|
||||
return
|
||||
fanart_path = f"fanart{ext}"
|
||||
poster_path = f"poster{ext}"
|
||||
thumb_path = f"thumb{ext}"
|
||||
if config.getInstance().image_naming_with_number():
|
||||
fanart_path = f"{prestr}-fanart{ext}"
|
||||
poster_path = f"{prestr}-poster{ext}"
|
||||
thumb_path = f"{prestr}-thumb{ext}"
|
||||
@@ -850,9 +854,15 @@ def core_main(movie_path, number_th, oCC, specified_source=None, specified_url=N
|
||||
|
||||
cover = json_data.get('cover')
|
||||
ext = image_ext(cover)
|
||||
|
||||
fanart_path = f"fanart{ext}"
|
||||
poster_path = f"poster{ext}"
|
||||
thumb_path = f"thumb{ext}"
|
||||
if config.getInstance().image_naming_with_number():
|
||||
fanart_path = f"{number}{leak_word}{c_word}{hack_word}-fanart{ext}"
|
||||
poster_path = f"{number}{leak_word}{c_word}{hack_word}-poster{ext}"
|
||||
thumb_path = f"{number}{leak_word}{c_word}{hack_word}-thumb{ext}"
|
||||
|
||||
# main_mode
|
||||
# 1: 刮削模式 / Scraping mode
|
||||
# 2: 整理模式 / Organizing mode
|
||||
|
||||
Reference in New Issue
Block a user