Skip to content

Commit

Permalink
Added notification.mp3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
DrakeRichards committed Apr 28, 2023
1 parent 3b6effe commit 64176bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ venv
/*.bat
/*.sh
/*.txt
/notification.mp3
!webui.bat
!webui.sh

Expand Down
3 changes: 3 additions & 0 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,9 @@ def reload_scripts():
with gr.TabItem(label, id=ifid, elem_id='tab_' + ifid):
interface.render()

if os.path.exists(os.path.join(script_path, "notification.mp3")):
audio_notification = gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)

text_settings = gr.Textbox(elem_id="settings_json", value=lambda: opts.dumpjson(), visible=False)
settings_submit.click(
fn=wrap_gradio_call(run_settings, extra_outputs=[gr.update()]),
Expand Down

0 comments on commit 64176bf

Please sign in to comment.