Skip to content

Commit

Permalink
Fixed more path issues in sound_board plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason [제이슨 제롬] authored Jun 4, 2020
1 parent afb7eb4 commit 258479b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/sound_board/sound_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def process_command(self, text):
file_counter = 0
gather_list = []
internal_list = []
for file_item in os.listdir(utils.get_permanent_media_dir() + "sound_board/"):
for file_item in os.listdir(utils.get_permanent_media_dir() + "/sound_board/"):
if file_item.endswith(".wav"):
gather_list.append(f"{file_item}")
file_counter += 1
Expand Down Expand Up @@ -90,7 +90,7 @@ def process_command(self, text):
gather_list = []
internal_list = []

for file_item in os.listdir(utils.get_permanent_media_dir() + "sound_board/"):
for file_item in os.listdir(utils.get_permanent_media_dir() + "/sound_board/"):
if file_item.endswith(".wav"):
gather_list.append(f"{file_item}")
file_counter += 1
Expand Down Expand Up @@ -176,7 +176,7 @@ def process_command(self, text):
return
if len(all_messages) == 2:
if ".wav" in all_messages[1].strip():
utils.remove_file(all_messages[1].strip(), utils.get_permanent_media_dir() + "sound_board/")
utils.remove_file(all_messages[1].strip(), utils.get_permanent_media_dir() + "/sound_board/")
GM.gui.quick_gui(f"Deleted sound clip : {all_messages[1].strip()}", text_type='header',
box_align='left')

Expand All @@ -191,7 +191,7 @@ def process_command(self, text):
box_align='left')
return

if not os.path.isfile(utils.get_permanent_media_dir() + f"sound_board/{parameter}.wav"):
if not os.path.isfile(utils.get_permanent_media_dir() + f"/sound_board/{parameter}.wav"):
GM.gui.quick_gui(
"The sound clip does not exist.",
text_type='header',
Expand Down

0 comments on commit 258479b

Please sign in to comment.