Fix: Organize mode (main mode 2)
This commit is contained in:
15
core.py
15
core.py
@@ -630,6 +630,8 @@ def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_wo
|
|||||||
create_softlink = False
|
create_softlink = False
|
||||||
if link_mode not in (1, 2):
|
if link_mode not in (1, 2):
|
||||||
shutil.move(filepath, targetpath)
|
shutil.move(filepath, targetpath)
|
||||||
|
print("[!]Move => ", path)
|
||||||
|
return
|
||||||
elif link_mode == 2:
|
elif link_mode == 2:
|
||||||
try:
|
try:
|
||||||
os.link(filepath, targetpath, follow_symlinks=False)
|
os.link(filepath, targetpath, follow_symlinks=False)
|
||||||
@@ -641,16 +643,13 @@ def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_wo
|
|||||||
os.symlink(filerelpath, targetpath)
|
os.symlink(filerelpath, targetpath)
|
||||||
except:
|
except:
|
||||||
os.symlink(str(filepath_obj.resolve()), targetpath)
|
os.symlink(str(filepath_obj.resolve()), targetpath)
|
||||||
return
|
print("[!]Link => ", path)
|
||||||
except FileExistsError as fee:
|
except FileExistsError as fee:
|
||||||
print(f'[-]FileExistsError: {fee}')
|
print(f'[-]FileExistsError: {fee}')
|
||||||
return
|
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
print('[-]Error! Please run as administrator!')
|
print('[-]Error! Please run as administrator!')
|
||||||
return
|
|
||||||
except OSError as oserr:
|
except OSError as oserr:
|
||||||
print(f'[-]OS Error errno {oserr.errno}')
|
print(f'[-]OS Error errno {oserr.errno}')
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def linkImage(path, number, part, leak_word, c_word, hack_word, ext):
|
def linkImage(path, number, part, leak_word, c_word, hack_word, ext):
|
||||||
@@ -968,13 +967,9 @@ def core_main(movie_path, number_th, oCC, specified_source=None, specified_url=N
|
|||||||
path = create_folder(json_data)
|
path = create_folder(json_data)
|
||||||
# 移动文件
|
# 移动文件
|
||||||
paste_file_to_folder_mode2(movie_path, path, multi_part, number, part, leak_word, c_word, hack_word)
|
paste_file_to_folder_mode2(movie_path, path, multi_part, number, part, leak_word, c_word, hack_word)
|
||||||
|
|
||||||
# Move subtitles
|
# Move subtitles
|
||||||
move_status = move_subtitles(movie_path, path, multi_part, number, part, leak_word, c_word, hack_word)
|
move_subtitles(movie_path, path, multi_part, number, part, leak_word, c_word, hack_word)
|
||||||
if move_status:
|
|
||||||
cn_sub = True
|
|
||||||
if conf.is_watermark():
|
|
||||||
add_mark(os.path.join(path, poster_path), os.path.join(path, thumb_path), cn_sub, leak, uncensored, hack,
|
|
||||||
_4k)
|
|
||||||
|
|
||||||
elif conf.main_mode() == 3:
|
elif conf.main_mode() == 3:
|
||||||
path = str(Path(movie_path).parent)
|
path = str(Path(movie_path).parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user