Skip to content

Commit

Permalink
Merge pull request #6 from XiaoLu-Ling/master
Browse files Browse the repository at this point in the history
fix File xxx already exists
  • Loading branch information
MightyZanark authored Aug 2, 2024
2 parents ef2d134 + 32b3f2c commit 8c4a702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def download_file(name: str, hash: str):
nameCheck = re.compile(f'{realFileName.split(".")[0]}.+?m4a')
checked = check_file(nameCheck, dirName)

if not os.path.isfile(name) and checked is None:
if not os.path.isfile(name) and checked is False:
print(f'Downloading {name}...')
r = requests.get(f'{Constants.SOUND_URL}/{hash[:2]}/{hash}').content
with open(name, 'wb') as f:
Expand Down Expand Up @@ -129,4 +129,4 @@ def sound() -> None:


if __name__ == '__main__':
sound()
sound()

0 comments on commit 8c4a702

Please sign in to comment.