17 lines
651 B
Python
17 lines
651 B
Python
import os
|
|
from data.path_constant import DOWNLOAD_DIR, NETWORK_DIR
|
|
from prerequisite import rename_episodes
|
|
|
|
rename_episodes(DOWNLOAD_DIR)
|
|
rename_episodes(NETWORK_DIR)
|
|
|
|
for first_level_path in NETWORK_DIR.iterdir():
|
|
if first_level_path.name == '怪力亂神':
|
|
for second_level_path in first_level_path.iterdir():
|
|
if "話." in second_level_path.name:
|
|
episode_name = second_level_path.name.replace("話.", "話 ")
|
|
|
|
new_path = first_level_path / episode_name
|
|
print(second_level_path)
|
|
print(new_path)
|
|
os.rename(second_level_path, new_path) |