Skip to content

Commit ef9340f

Browse files
author
nanocode38
committed
prepare V1.0.0
1 parent 96cf7ad commit ef9340f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

main.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,11 @@ def get_message():
257257
global get, language
258258
get = True
259259
from tkinter import filedialog
260-
f_path = filedialog.askopenfilename(title='Open Sounds File')
260+
f_path = filedialog.askopenfilename(title='Open Sounds File', filetypes=[('Sounds', '*.mp3 *.wav')])
261261
if f_path != '':
262-
if os.path.splitext(f_path)[1] not in ('.mp3', '.wav'):
263-
from tkinter import messagebox
264-
messagebox.showerror(title='File Error', message=LANGUAGE_LIST[language]['not sounds'])
265-
else:
266-
sounds_path = f_path
267-
path_entry.delete(0, tk.END)
268-
path_entry.insert(0, f_path)
262+
sounds_path = f_path
263+
path_entry.delete(0, tk.END)
264+
path_entry.insert(0, f_path)
269265

270266
old_language = language
271267
newlanguage = tk.StringVar()

0 commit comments

Comments
 (0)