Skip to content

Commit f16e54e

Browse files
committed
♻️ リファクタリング(main.py): 重複するコードを削除し、可読性を向上
💡 コメント(main.py): コードの可読性を向上させるためにコメントを追加
1 parent 4d3572b commit f16e54e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def main():
402402
oto_ini = utaupy.otoini.load(str(temp_dir / "oto.ini"))
403403
wav_files = list(temp_dir.glob("*.wav"))
404404
with tqdm.tqdm(total=len(wav_files)) as pbar:
405-
for wav_file in temp_dir.glob("*.wav"):
405+
for wav_file in wav_files:
406406
otos: list[utaupy.otoini.Oto] = remove_duplicate_otos(
407407
list(filter(lambda oto: oto.filename == wav_file.name, oto_ini))
408408
)
@@ -907,6 +907,7 @@ def main():
907907
print("Phase 3-1: Normalizing volume...")
908908
print()
909909

910+
wav_files = list(temp_dir.glob("*.wav"))
910911
with tqdm.tqdm(total=len(wav_files)) as pbar:
911912
for wav_file in wav_files:
912913
audio: AudioSegment = AudioSegment.from_file(wav_file)

0 commit comments

Comments
 (0)