Skip to content

Commit

Permalink
Merge pull request #207 from DuckBoss/incorrect-sound_board-pathing
Browse files Browse the repository at this point in the history
Update sound_board_helper.py
  • Loading branch information
Jason [제이슨 제롬] authored Jun 4, 2020
2 parents f3f6ab1 + 258479b commit 2a747c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
2 changes: 1 addition & 1 deletion plugins/sound_board/sound_board_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_cur_audio_length():
def download_clip(url, name):
ydl_opts = {
'format': 'bestaudio/best',
'outtmpl': utils.get_permanent_media_dir() + f'sound_board/{name}.wav',
'outtmpl': utils.get_permanent_media_dir() + f'/sound_board/{name}.wav',
'noplaylist': True,
'continue_dl': True,
'postprocessors': [{
Expand Down

0 comments on commit 2a747c1

Please sign in to comment.