soft_link mode .nfo check loop fix

This commit is contained in:
lededev
2021-09-30 08:31:01 +08:00
parent 0aa4c7d76c
commit ccf187245c
2 changed files with 9 additions and 6 deletions

View File

@@ -182,18 +182,21 @@ def movie_lists(root, conf, regexstr):
success_folder = conf.success_folder()
for current_dir, subdirs, files in os.walk(success_folder, topdown=False):
for f in files:
if not os.path.splitext(f)[1].upper() in file_type:
f_obj = Path(f)
if f_obj.suffix.lower() != '.nfo':
continue
nfo_file = os.path.join(current_dir, str(Path(f).with_suffix('.nfo')))
if file_modification_days(nfo_file) > nfo_skip_days:
if file_modification_days(Path(current_dir) / f_obj) > nfo_skip_days:
continue
number = get_number(False, os.path.basename(f))
number = get_number(False, f_obj.stem)
if number:
skip_numbers.add(number.upper())
rm_list = []
for f in total:
n_number = get_number(False, os.path.basename(f))
if n_number and n_number.upper() in skip_numbers:
total.pop(total.index(f))
rm_list.append(f)
for f in rm_list:
total.remove(f)
return total

View File

@@ -4,7 +4,7 @@ from core import *
G_spat = re.compile(
"(^22-sht\.me|-fhd|_fhd|^fhd_|^fhd-|-hd|_hd|^hd_|^hd-|-sd|_sd|-1080p|_1080p|-720p|_720p)",
"^22-sht\.me|-fhd|_fhd|^fhd_|^fhd-|-hd|_hd|^hd_|^hd-|-sd|_sd|-1080p|_1080p|-720p|_720p|^hhd800\.com@",
re.IGNORECASE)