From afb7eb41f8e2789b077720ba5a39f09683363f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20=5B=EC=A0=9C=EC=9D=B4=EC=8A=A8=20=EC=A0=9C?= =?UTF-8?q?=EB=A1=AC=5D?= Date: Wed, 3 Jun 2020 20:12:33 -0400 Subject: [PATCH 1/2] Update sound_board_helper.py --- plugins/sound_board/sound_board_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sound_board/sound_board_helper.py b/plugins/sound_board/sound_board_helper.py index ed371251..db402fe6 100644 --- a/plugins/sound_board/sound_board_helper.py +++ b/plugins/sound_board/sound_board_helper.py @@ -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': [{ From 258479bf5e085c774f48c8179ff4b0f9f7719135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20=5B=EC=A0=9C=EC=9D=B4=EC=8A=A8=20=EC=A0=9C?= =?UTF-8?q?=EB=A1=AC=5D?= Date: Wed, 3 Jun 2020 20:20:28 -0400 Subject: [PATCH 2/2] Fixed more path issues in sound_board plugin --- plugins/sound_board/sound_board.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/sound_board/sound_board.py b/plugins/sound_board/sound_board.py index baf43384..66852020 100644 --- a/plugins/sound_board/sound_board.py +++ b/plugins/sound_board/sound_board.py @@ -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 @@ -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 @@ -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') @@ -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',