diff --git a/JJMumbleBot/lib/pgui.py b/JJMumbleBot/lib/pgui.py index 59b94551..a3589e14 100644 --- a/JJMumbleBot/lib/pgui.py +++ b/JJMumbleBot/lib/pgui.py @@ -34,7 +34,7 @@ def quick_gui(self, content, text_type="data", text_color=None, text_font='Calib self.display_box(channel=channel, user=user, ignore_whisper=ignore_whisper) self.clear_display() - def quick_gui_img(self, directory, img_data, format=False, caption=None, bgcolor="black", channel=None, user=None, img_size=65536, cellspacing="5"): + def quick_gui_img(self, directory, img_data, format_img=False, caption=None, bgcolor="black", channel=None, user=None, img_size=65536, cellspacing="5"): if self.box_open: return False if channel is None: @@ -42,7 +42,7 @@ def quick_gui_img(self, directory, img_data, format=False, caption=None, bgcolor self.open_box(align='left', bgcolor=bgcolor, cellspacing=cellspacing) - if format: + if format_img: formatted_string = IH.format_image(f"{img_data}", "jpg", directory, size_goal=img_size) content = self.make_content(formatted_string, image=True, text_align='center') if content is not None: diff --git a/JJMumbleBot/plugins/extensions/images/images.py b/JJMumbleBot/plugins/extensions/images/images.py index 382969d4..f3fe95ca 100644 --- a/JJMumbleBot/plugins/extensions/images/images.py +++ b/JJMumbleBot/plugins/extensions/images/images.py @@ -52,7 +52,7 @@ def process(self, text): GS.gui_service.quick_gui_img(f"{dir_utils.get_temp_med_dir()}/images", formatted_string, bgcolor=self.metadata[C_PLUGIN_SETTINGS][P_FRAME_COL], cellspacing=self.metadata[C_PLUGIN_SETTINGS][P_FRAME_SIZE], - format=False) + format_img=False) log(INFO, f"Posted an image to the mumble channel chat from: {message_parse[1]}.") dir_utils.remove_file("_image.jpg", f'{dir_utils.get_temp_med_dir()}/images') @@ -76,7 +76,7 @@ def process(self, text): GS.gui_service.quick_gui_img(f"{dir_utils.get_perm_med_dir()}/images/", formatted_string, bgcolor=self.metadata[C_PLUGIN_SETTINGS][P_FRAME_COL], cellspacing=self.metadata[C_PLUGIN_SETTINGS][P_FRAME_SIZE], - format=False) + format_img=False) log(INFO, "Posted an image to the mumble channel chat from local files.") elif command == "imglist": diff --git a/JJMumbleBot/plugins/extensions/youtube/utility/youtube_helper.py b/JJMumbleBot/plugins/extensions/youtube/utility/youtube_helper.py index aa9a6889..40ba6cb9 100644 --- a/JJMumbleBot/plugins/extensions/youtube/utility/youtube_helper.py +++ b/JJMumbleBot/plugins/extensions/youtube/utility/youtube_helper.py @@ -376,7 +376,7 @@ def play_audio(): GS.gui_service.quick_gui_img(f"{dir_utils.get_temp_med_dir()}/youtube", f"{YoutubeHelper.current_song_info['img_id']}", caption=f"Now playing: {YoutubeHelper.current_song_info['main_title']}", - format=True, + format_img=True, img_size=32768) while not YoutubeHelper.exit_flag and GS.mumble_inst.isAlive(): diff --git a/JJMumbleBot/plugins/extensions/youtube/youtube.py b/JJMumbleBot/plugins/extensions/youtube/youtube.py index 758b8b35..3bb67369 100644 --- a/JJMumbleBot/plugins/extensions/youtube/youtube.py +++ b/JJMumbleBot/plugins/extensions/youtube/youtube.py @@ -56,7 +56,7 @@ def process(self, text): GS.gui_service.quick_gui_img(f"{dir_utils.get_temp_med_dir()}/youtube", f"{YH.current_song_info['img_id']}", caption=f"Now playing: {YH.current_song_info['main_title']}", - format=True, + format_img=True, img_size=32768) log(INFO, "Displayed current song in the youtube plugin.", origin=L_COMMAND) else: